Skip to content

Commit

Permalink
small design changes, adding arrow as vector (thus bumping gradle plu…
Browse files Browse the repository at this point in the history
…gin to 1.5.0!), changing check icon and adding circle background for finish action
  • Loading branch information
AndyScherzinger authored and przybylski committed Jan 6, 2016
1 parent 5a0bd7d commit 4a2e548
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'com.android.tools.build:gradle:1.5.0'
}
}

Expand Down
Binary file added res/drawable-hdpi/ic_done_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed res/drawable-hdpi/ic_menu_forward.png
Binary file not shown.
Binary file added res/drawable-mdpi/ic_done_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed res/drawable-mdpi/ic_menu_forward.png
Binary file not shown.
Binary file added res/drawable-xhdpi/ic_done_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed res/drawable-xhdpi/ic_menu_forward.png
Binary file not shown.
Binary file added res/drawable-xxhdpi/ic_done_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed res/drawable-xxhdpi/ic_menu_forward.png
Binary file not shown.
8 changes: 8 additions & 0 deletions res/drawable/arrow_right.xml
Original file line number Diff line number Diff line change
@@ -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 changes: 5 additions & 0 deletions res/drawable/round_button.xml
Original file line number Diff line number Diff line change
@@ -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>
27 changes: 19 additions & 8 deletions res/layout/whats_new_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,42 @@
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"
style="@style/Button.Borderless"
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>
2 changes: 1 addition & 1 deletion res/layout/whats_new_element.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>
Expand Down
20 changes: 16 additions & 4 deletions src/com/owncloud/android/ui/activity/WhatsNewActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
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;
Expand Down Expand Up @@ -152,10 +153,21 @@ public void onBackPressed() {


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() {
Expand Down

0 comments on commit 4a2e548

Please sign in to comment.