Я добавил андроид-recyclerview в моем приложении, которое работает нормально. Согласно моему расположению, мне нужно удалить разделитель между ячейками. В виде списка это можно легко достичь, установив свойство divider равным null, как показано ниже в коде, но я не могу найти такого свойства в android-recyclerview. Как я могу достичь этого в андроид-recyclerview.Как удалить разделитель по умолчанию из recylerview
getListView().setDivider(null);
getListView().setDividerHeight(0);
OR
android:divider="@null"
android:dividerHeight="0dp"
Recylerview XML ниже:
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view_contact_list_frag"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.8"
android:clickable="true"
android:focusable="true"
android:scrollbars="vertical" />
Адаптер XML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/recyclerview_item_borders"
android:padding="10dp">
<LinearLayout
android:id="@+id/section_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:paddingBottom="30dp"
>
<TextView
android:id="@+id/textview_section_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<de.hdodenhof.circleimageview.CircleImageView xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/circular_image_contact"
android:layout_width="@dimen/auto_complete_circular_image_dimen"
android:layout_height="@dimen/auto_complete_circular_image_dimen"
app:civ_border_color="#FF000000"
android:layout_weight="0.2"
android:src="@mipmap/ic_default_contact"
app:civ_border_width="0dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.8"
android:orientation="vertical">
<TextView
android:id="@+id/textView_contact_name"
android:layout_width="match_parent"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:textColor="@color/textDarkColor"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" />
<TextView
android:id="@+id/textView_contact_number"
android:layout_width="match_parent"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:textColor="@color/textDarkColor"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" />
</LinearLayout>
</LinearLayout>
Recyclerview не имеет делителей по умолчанию – raktale
множества андроида: dividerHeight = "0dp" в файле XML. –
@SorathiyaPayal В Recylerview нет разделителей !!! обратитесь к этой ссылке https://developer.android.com/reference/android/support/v7/widget/RecyclerView.html – raktale