Selaa lähdekoodia

Merge pull request #152 from nextcloud/callMenuColors

Optimize bottom sheet menu
Mario Đanić 7 vuotta sitten
vanhempi
commit
395a3b0db1

+ 1 - 1
app/src/main/java/com/nextcloud/talk/adapters/items/AppItem.java

@@ -95,7 +95,7 @@ public class AppItem extends AbstractFlexibleItem<AppItem.AppItemViewHolder> {
         if (position == 0) {
             Spannable spannableString = new SpannableString(title);
             spannableString.setSpan(new ForegroundColorSpan(NextcloudTalkApplication.getSharedApplication()
-                            .getResources().getColor(R.color.colorPrimary)), 0,
+                            .getResources().getColor(R.color.grey_600)), 0,
                     spannableString.length(),
                     Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
             holder.appTitleTextView.setText(spannableString);

+ 1 - 1
app/src/main/java/com/nextcloud/talk/adapters/items/MenuItem.java

@@ -85,7 +85,7 @@ public class MenuItem extends AbstractFlexibleItem<MenuItem.MenuItemViewHolder>
             Spannable spannableString = new SpannableString(NextcloudTalkApplication.getSharedApplication()
                     .getString(R.string.nc_what));
             spannableString.setSpan(new ForegroundColorSpan(NextcloudTalkApplication.getSharedApplication()
-                            .getResources().getColor(R.color.colorPrimary)), 0,
+                            .getResources().getColor(R.color.grey_600)), 0,
                     spannableString.length(),
                     Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
             holder.menuTitle.setText(spannableString);

+ 0 - 5
app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/CallMenuController.java

@@ -111,11 +111,6 @@ public class CallMenuController extends BaseController implements FlexibleAdapte
 
         adapter.addListener(this);
         recyclerView.setAdapter(adapter);
-
-        recyclerView.addItemDecoration(new DividerItemDecoration(
-                recyclerView.getContext(),
-                layoutManager.getOrientation()
-        ));
     }
 
     private void prepareIntent() {

+ 7 - 7
app/src/main/res/layout/rv_item_app.xml

@@ -24,8 +24,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginBottom="16dp"
-                android:layout_marginTop="16dp"
-                android:background="@color/nc_white_color">
+                android:layout_marginTop="16dp">
 
     <ImageView
         android:id="@+id/icon_image_view"
@@ -34,11 +33,12 @@
         android:layout_centerVertical="true"
         android:layout_marginStart="16dp"
         android:focusable="false"
-        android:focusableInTouchMode="false"/>
+        android:focusableInTouchMode="false"
+        tools:src="@drawable/ic_add_grey600_24px"/>
 
     <TextView
         android:id="@+id/app_title_text_view"
-        android:layout_width="wrap_content"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_centerVertical="true"
         android:layout_marginEnd="16dp"
@@ -46,8 +46,8 @@
         android:layout_toEndOf="@id/icon_image_view"
         android:focusable="false"
         android:focusableInTouchMode="false"
-        android:textAlignment="center"
-        android:textSize="18sp"
-        tools:text="App title"/>
+        android:textSize="16sp"
+        android:textColor="@color/black"
+        tools:text="Start a new conversation"/>
 
 </RelativeLayout>

+ 2 - 1
app/src/main/res/layout/rv_item_menu.xml

@@ -34,7 +34,8 @@
         android:focusable="false"
         android:focusableInTouchMode="false"
         android:gravity="center_vertical"
-        android:textSize="18sp"
+        android:textSize="16sp"
+        android:textColor="@color/black"
         tools:drawableLeft="@drawable/ic_add_grey600_24px"
         tools:drawablePadding="16dp"
         tools:text="Start a new conversation" />

+ 1 - 0
app/src/main/res/values/colors.xml

@@ -11,5 +11,6 @@
     <color name="nc_light_blue_color">#7FC0E3</color>
     <color name="nc_material_yellow">#FFEB3B</color>
     <color name="nc_light_grey">#E8E8E8</color>
+    <color name="grey_600">#757575</color>
 </resources>