Эх сурвалжийг харах

small design changes, adding arrow as vector (thus bumping gradle plugin to 1.5.0!), changing check icon and adding circle background for finish action

Andy Scherzinger 9 жил өмнө
parent
commit
0b9a1d0855

BIN
res/drawable-hdpi/ic_done_white.png


BIN
res/drawable-hdpi/ic_menu_forward.png


BIN
res/drawable-mdpi/ic_done_white.png


BIN
res/drawable-mdpi/ic_menu_forward.png


BIN
res/drawable-xhdpi/ic_done_white.png


BIN
res/drawable-xhdpi/ic_menu_forward.png


BIN
res/drawable-xxhdpi/ic_done_white.png


BIN
res/drawable-xxhdpi/ic_menu_forward.png


+ 8 - 0
res/drawable/arrow_right.xml

@@ -0,0 +1,8 @@
+<!-- drawable/arrow_right.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+    <path android:fillColor="#35537A" android:pathData="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z" />
+</vector>

+ 5 - 0
res/drawable/round_button.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="oval">
+    <solid android:color="@color/owncloud_blue_accent"/>
+</shape>

+ 19 - 8
res/layout/whats_new_activity.xml

@@ -29,7 +29,10 @@
         android:layout_width="match_parent"
         android:layout_height="0dp"
         android:layout_weight="10"
-        android:weightSum="3">
+        android:weightSum="3"
+        android:layout_marginBottom="16dp"
+        android:layout_marginLeft="16dp"
+        android:layout_marginRight="16dp">
 
         <android.support.v7.widget.AppCompatButton
             android:id="@+id/skip"
@@ -37,23 +40,31 @@
             android:layout_width="0dp"
             android:layout_height="wrap_content"
             android:layout_weight="1"
-            android:text="Skip" />
+            android:text="Skip"
+            android:layout_gravity="center_vertical|center_horizontal"/>
 
         <com.owncloud.android.ui.whatsnew.ProgressIndicator
             android:id="@+id/progressIndicator"
             android:layout_width="0dp"
             android:layout_height="match_parent"
-            android:layout_weight="1">
+            android:layout_weight="1"
+            android:layout_gravity="center_vertical|center_horizontal">
         </com.owncloud.android.ui.whatsnew.ProgressIndicator>
 
-        <ImageButton
-            android:id="@+id/forward"
-            android:src="@drawable/ic_menu_forward"
-            style="@style/Button.Borderless"
+        <LinearLayout
             android:layout_width="0dp"
             android:layout_height="wrap_content"
             android:layout_weight="1"
-            android:text="@string/folder_picker_choose_button_text" />
+            android:orientation="vertical"
+            android:layout_gravity="center">
+            <ImageButton
+                android:id="@+id/forward"
+                android:src="@drawable/arrow_right"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:padding="16dp"/>
+        </LinearLayout>
     </LinearLayout>
 
 </LinearLayout>

+ 1 - 1
res/layout/whats_new_element.xml

@@ -16,7 +16,7 @@
     <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:textAppearance="?android:attr/textAppearanceSmall"
+        android:textAppearance="?android:attr/textAppearanceLarge"
         android:textStyle="bold"
         android:id="@+id/whatsNewTitle"
         android:layout_gravity="center_horizontal"/>

+ 16 - 4
src/com/owncloud/android/ui/activity/WhatsNewActivity.java

@@ -25,6 +25,7 @@ import android.app.Activity;
 import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
+import android.os.Build;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
 import android.util.DisplayMetrics;
@@ -152,10 +153,21 @@ public class WhatsNewActivity extends Activity {
 
 
     private void updateNextButtonIfNeeded() {
-        if (!mProgress.hasNextStep())
-            mForwardFinishButton.setImageResource(R.drawable.ic_ok);
-        else
-            mForwardFinishButton.setImageResource(R.drawable.ic_menu_forward);
+        if (!mProgress.hasNextStep()) {
+            mForwardFinishButton.setImageResource(R.drawable.ic_done_white);
+            if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
+                mForwardFinishButton.setBackground(getResources().getDrawable(R.drawable.round_button));
+            } else {
+                mForwardFinishButton.setBackgroundDrawable(getResources().getDrawable(R.drawable.round_button));
+            }
+        } else {
+            mForwardFinishButton.setImageResource(R.drawable.arrow_right);
+            if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
+                mForwardFinishButton.setBackground(null);
+            } else {
+                mForwardFinishButton.setBackgroundDrawable(null);
+            }
+        }
     }
 
     private void handleMoveToNext() {