diff --git a/build.gradle b/build.gradle index 88ee90b0a..50d8b11e8 100644 --- a/build.gradle +++ b/build.gradle @@ -58,6 +58,7 @@ dependencies { compile "com.android.support:support-v4:20.+" compile "com.android.support:support-v13:20.+" compile "com.crashlytics.android:crashlytics:1.+" + compile "com.github.dmytrodanylyk.android-process-button:library:1.0.+" compile "com.jakewharton.timber:timber:2.3.+" compile "com.squareup.dagger:dagger:1.2.+" compile "com.squareup.okhttp:okhttp:1.5.+" diff --git a/src/main/java/org/amahi/anywhere/activity/AuthenticationActivity.java b/src/main/java/org/amahi/anywhere/activity/AuthenticationActivity.java index 10c62067f..b2312d35c 100644 --- a/src/main/java/org/amahi/anywhere/activity/AuthenticationActivity.java +++ b/src/main/java/org/amahi/anywhere/activity/AuthenticationActivity.java @@ -33,6 +33,7 @@ import android.widget.TextView; import android.widget.ViewAnimator; +import com.dd.processbutton.iml.ActionProcessButton; import com.squareup.otto.Subscribe; import org.amahi.anywhere.AmahiApplication; @@ -83,8 +84,8 @@ private String getPassword() { return getPasswordEdit().getText().toString(); } - private Button getAuthenticationButton() { - return (Button) findViewById(R.id.button_authentication); + private ActionProcessButton getAuthenticationButton() { + return (ActionProcessButton) findViewById(R.id.button_authentication); } private void setUpAuthenticationMessages() { @@ -158,8 +159,10 @@ private void hideAuthenticationText() { } private void showProgress() { - ViewAnimator animator = (ViewAnimator) findViewById(R.id.animator_button); - animator.setDisplayedChild(animator.indexOfChild(findViewById(android.R.id.progress))); + ActionProcessButton authenticationButton = getAuthenticationButton(); + + authenticationButton.setMode(ActionProcessButton.Mode.ENDLESS); + authenticationButton.setProgress(1); } private void startAuthentication() { @@ -185,8 +188,7 @@ private void showAuthenticationText() { } private void hideProgress() { - ViewAnimator animator = (ViewAnimator) findViewById(R.id.animator_button); - animator.setDisplayedChild(animator.indexOfChild(findViewById(R.id.button_authentication))); + getAuthenticationButton().setProgress(0); } private void showAuthenticationFailureMessage() { diff --git a/src/main/res/drawable-nodpi/ic_banner.png b/src/main/res/drawable-nodpi/ic_banner.png new file mode 100644 index 000000000..52a23fd56 Binary files /dev/null and b/src/main/res/drawable-nodpi/ic_banner.png differ diff --git a/src/main/res/layout/layout_authentication.xml b/src/main/res/layout/layout_authentication.xml index c7e578794..7c3e4f84d 100644 --- a/src/main/res/layout/layout_authentication.xml +++ b/src/main/res/layout/layout_authentication.xml @@ -26,11 +26,21 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> + + + + @@ -43,7 +53,6 @@ android:hint="Password" android:inputType="textPassword" android:fontFamily="sans-serif" - android:background="@android:drawable/editbox_background_normal" android:layout_width="match_parent" android:layout_height="wrap_content"/> @@ -51,27 +60,12 @@ android:layout_width="match_parent" android:layout_height="16dp"/> - - -