Przeglądaj źródła

redesign the contacts header/contact items

AndyScherzinger 7 lat temu
rodzic
commit
66e6e89f65

+ 0 - 6
app/src/main/java/com/nextcloud/talk/controllers/ContactsController.java

@@ -31,7 +31,6 @@ import android.support.design.widget.BottomNavigationView;
 import android.support.design.widget.CoordinatorLayout;
 import android.support.v4.view.MenuItemCompat;
 import android.support.v4.widget.SwipeRefreshLayout;
-import android.support.v7.widget.DividerItemDecoration;
 import android.support.v7.widget.RecyclerView;
 import android.support.v7.widget.SearchView;
 import android.text.InputType;
@@ -518,11 +517,6 @@ public class ContactsController extends BaseController implements SearchView.OnQ
         recyclerView.setHasFixedSize(true);
         recyclerView.setAdapter(adapter);
 
-        recyclerView.addItemDecoration(new DividerItemDecoration(
-                recyclerView.getContext(),
-                layoutManager.getOrientation()
-        ));
-
         swipeRefreshLayout.setOnRefreshListener(this::fetchData);
         swipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary);
 

+ 1 - 1
app/src/main/res/layout/rv_item_contact.xml

@@ -35,7 +35,7 @@
         android:layout_height="@dimen/avatar_size"
         android:layout_centerVertical="true"
         android:layout_marginEnd="@dimen/activity_horizontal_margin"
-        android:layout_marginStart="@dimen/activity_horizontal_margin"
+        android:layout_marginStart="48dp"
         app:animationDuration="170"
         app:enableInitialAnimation="true"
         app:rearBackgroundColor="@color/colorPrimary"/>

+ 16 - 11
app/src/main/res/layout/rv_item_title_header.xml

@@ -19,21 +19,26 @@
   ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.
   -->
 
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:alpha="0.7"
-                android:background="@color/colorPrimary"
-                android:elevation="5dp">
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1px"
+        android:background="?android:attr/listDivider"/>
 
     <TextView
         android:id="@+id/title_text_view"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginBottom="8dp"
-        android:layout_marginEnd="24dp"
-        android:layout_marginStart="12dp"
+        android:layout_marginEnd="16dp"
+        android:layout_marginStart="16dp"
         android:layout_marginTop="8dp"
-        android:textColor="@color/nc_white_color_complete"/>
+        android:layout_marginBottom="8dp"
+        android:textColor="@color/colorPrimary"
+        tools:text="A"/>
 
-</RelativeLayout>
+</LinearLayout>