목록의 모든 열에 동일한 레이아웃 높이를 적용하고 싶습니다. 나는 GridLayoutManager 열 높이 문제
RecyclerView.LayoutManager layoutManager = new GridLayoutManager(mCon,2);
recyclerView.setLayoutManager(layoutManager);
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>
모두 열 같은 높이하지만 항목 이름이 더 큰 경우 가 바닥 틱 다르게 배치지고있다 열 XML 파일입니다. 누구든지이 문제를 해결할 수있는 방법을 제안 해 줄 수 있습니까? 덕분에
에 대한 sory? 그리고 스크린 샷을 IDE가 없습니다. – sumandas
초 열 녹색 눈금이 위쪽으로 –