0
Делаю дизайн как следующий снимок экрана, но я не могу получить точно так же, как показано на снимке экрана.Граница списка просмотров каждой строки в android
Вот мой список вид
<ListView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="60dp"
android:id="@+id/list"
android:divider="@drawable/redemption_request_list_border"
android:dividerHeight="5px"
/>
Все это элемент я отображение в виде списка
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="15dp"
android:paddingRight="15dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/lblRedemptionDate"
android:text="Redemption Date"
android:textSize="20sp"
android:textColor="@color/text_color_white"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/lblTrackingId"
android:text="Tracking ID"
android:textSize="20sp"
android:textColor="@color/text_color_white"
android:layout_alignParentRight="true"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Loyalty ID :"
android:textSize="20sp"
android:id="@+id/lblLoyaltyId"
android:layout_below="@+id/lblRedemptionDate"
android:textColor="@color/text_color_white"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/txtLoyaltyId"
android:text="Loyalty ID"
android:textSize="20sp"
android:layout_below="@+id/lblTrackingId"
android:layout_alignParentRight="true"
android:textColor="@color/text_color_white"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Status :"
android:id="@+id/lblRedemptionStatus"
android:textSize="20sp"
android:layout_below="@+id/lblLoyaltyId"
android:textColor="@color/text_color_white"
/>
<Spinner
android:layout_width="190dp"
android:layout_height="35dp"
style="@style/spinner_style"
android:textSize="@dimen/small_button_font_size"
android:id="@+id/spnRdmStatus"
android:layout_below="@+id/txtLoyaltyId"
android:layout_toLeftOf="@+id/imgStatusEdit"
android:layout_toRightOf="@+id/lblRedemptionStatus"
android:spinnerMode="dropdown"
android:visibility="gone"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:id="@+id/txtRdmStatus"
android:layout_below="@+id/txtLoyaltyId"
android:layout_toLeftOf="@+id/imgStatusEdit"
android:layout_toRightOf="@+id/lblRedemptionStatus"
android:textColor="@color/text_color_white"
android:visibility="visible"
/>
<ImageView
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:src="@drawable/ic_charge_card_edit_view"
android:id="@+id/imgStatusEdit"
android:layout_below="@+id/txtLoyaltyId"
/>
<ImageView
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:src="@drawable/ic_status_success"
android:id="@+id/imgStatusSave"
android:layout_below="@+id/txtLoyaltyId"
android:visibility="gone"
/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:id="@+id/btnViewItems"
android:text="View Items"
android:textAllCaps="true"
android:textSize="20sp"
android:layout_below="@+id/lblRedemptionStatus"/>
</RelativeLayout>
Вот моя граница списке, но границы не показывая.
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="#FFF" />
<stroke android:width="1dip"
android:color="#FFFFFF" />
</shape>
и я получаю эту конструкцию
Любой может помочь в этом, спасибо!
использования cardview с recyclerview InstEd из ListView вы получите точное расположение, как вы хотите – siddhesh
но карты мнения я могу заполнить Список_массивы значения как в виде списка – Raju
вы нужно использовать recyclerview вместо listview и использовать cardview для каждой строки, используя эту ссылку http://www.androidhive.info/2016/05/android-working-with-card-view-and-recycler-view/ – siddhesh