リストのすべての列に対して同じレイアウトの高さを実現したい。どちらの列が同じ高さを持っていますが、アイテム名が大きいとき下ダニが異なっ置か取得され GridLayoutManagerの列の高さの問題
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/card_view"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/padding_8dp"
android:layout_marginLeft="@dimen/padding_4dp"
android:layout_marginRight="@dimen/padding_4dp"
android:clickable="true"
android:padding="1dp"
card_view:cardCornerRadius="@dimen/padding_2dp"
card_view:cardUseCompatPadding="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="0dp">
<RelativeLayout
android:id="@+id/rel_first"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/padding_8dp">
<ImageView
android:id="@+id/userimg"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginLeft="@dimen/padding_16dp"
android:layout_marginTop="@dimen/padding_8dp"
android:background="@drawable/user_profile_default" />
<RelativeLayout
android:id="@+id/nameRL"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/padding_4dp"
android:layout_toRightOf="@+id/userimg"
android:orientation="vertical">
<com.skcsllp.mutterfly.widgets.MfTextView
android:id="@+id/u_name"
style="@style/textview.bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/padding_16dp"
android:layout_marginStart="@dimen/padding_16dp"
android:layout_marginTop="@dimen/padding_8dp"
android:text="Akshay"
android:textColor="@color/new_text_grey"
android:textSize="@dimen/text_size_big_16"
/>
<ImageView
android:id="@+id/location1"
android:layout_width="7dp"
android:layout_height="10dp"
android:layout_below="@+id/u_name"
android:layout_marginBottom="@dimen/padding_4dp"
android:layout_marginLeft="@dimen/padding_16dp"
android:layout_marginStart="@dimen/padding_16dp"
android:layout_marginTop="@dimen/padding_8dp"
android:background="@drawable/location_pin"
/>
<com.skcsllp.mutterfly.widgets.MfTextView
android:id="@+id/location"
style="@style/textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/u_name"
android:layout_marginLeft="@dimen/padding_4dp"
android:layout_marginTop="@dimen/padding_8dp"
android:layout_toEndOf="@+id/location1"
android:layout_toRightOf="@+id/location1"
android:text="2.5km"
android:textSize="@dimen/text_size_extra_extra_small_10"
/>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@+id/nameRL"
android:layout_gravity="center"
android:layout_marginTop="@dimen/padding_8dp"
android:background="@color/grey_bottmon_tab"
/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/main_rl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/rel_first"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/padding_16dp"
android:layout_marginTop="@dimen/padding_4dp"
android:gravity="center"
android:minHeight="80dp">
<LinearLayout
android:id="@+id/ln_cart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/padding_16dp"
android:layout_marginRight="@dimen/padding_16dp"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/padding_24dp"
android:layout_height="@dimen/padding_24dp"
android:layout_marginTop="@dimen/padding_16dp"
android:background="@drawable/cart_icon"
android:padding="@dimen/padding_2dp"
/>
<com.skcsllp.mutterfly.widgets.MfTextView
android:id="@+id/item_name"
style="@style/textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/padding_8dp"
android:layout_marginLeft="@dimen/padding_8dp"
android:layout_marginTop="@dimen/padding_16dp"
android:text="Laptop "
android:textColor="@color/primary"
android:textSize="@dimen/text_size_big_16"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/ln_cal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/ln_cart"
android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/padding_16dp"
android:layout_marginRight="@dimen/padding_16dp"
android:layout_marginTop="@dimen/padding_4dp"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/padding_24dp"
android:layout_height="@dimen/padding_24dp"
android:background="@drawable/ic_cal"
/>
<com.skcsllp.mutterfly.widgets.MfTextView
android:id="@+id/date"
style="@style/textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/padding_16dp"
android:layout_marginLeft="@dimen/padding_8dp"
android:layout_marginTop="@dimen/padding_4dp"
android:text=" 7 july - 8 july"
android:textColor="@color/new_text_grey"
android:textSize="@dimen/text_size_small_14"
/>
</LinearLayout>
</RelativeLayout>
<View
android:id="@+id/view_second"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@+id/main_rl"
android:layout_marginTop="@dimen/padding_8dp"
android:background="@color/grey_bottmon_tab"
/>
<RelativeLayout
android:id="@+id/main_ln_sec"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/view_second"
android:layout_centerHorizontal="true"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="@+id/number_of_provider"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:gravity="center"
android:text="3"
android:visibility="gone"
/>
<TextView
android:id="@+id/offer_sent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:gravity="center"
android:text="offersent"
android:visibility="gone"
/>
<ImageView
android:id="@+id/accept_image"
android:layout_width="@dimen/padding_32dp"
android:layout_height="@dimen/padding_32dp"
android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/padding_16dp"
android:background="@drawable/check_mark"
android:gravity="center"
/>
</RelativeLayout>
</RelativeLayout>
</android.support.v7.widget.CardView>
を私はGridLayoutManager
RecyclerView.LayoutManager layoutManager = new GridLayoutManager(mCon,2);
recyclerView.setLayoutManager(layoutManager);
を使用していますが、これは、列のXMLファイルです。誰も私にこれを修正する方法を提案することができます。ありがとう
1が下ダニのですか?そして、いくつかのスクリーンショットである必要はありません。 – sumandas
第二カラム緑色のチェックマークが最初の1 –