diff --git a/app/build.gradle b/app/build.gradle index e41437dff..23c31bb89 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -67,8 +67,8 @@ android { } dependencies { - compile 'com.android.support:appcompat-v7:24.1.1' - compile 'com.android.support:design:24.1.1' + compile 'com.android.support:appcompat-v7:24.2.0' + compile 'com.android.support:design:24.2.0' compile 'com.android.support:recyclerview-v7:24.1.1' compile 'com.google.android.gms:play-services-gcm:8.4.0' compile 'com.google.android.gms:play-services-auth:8.4.0' @@ -102,7 +102,7 @@ dependencies { androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.2') { exclude group: 'com.android.support' } - androidTestCompile('com.android.support:support-annotations:24.1.1') { + androidTestCompile('com.android.support:support-annotations:24.2.0') { exclude group: 'com.android.support' } diff --git a/app/src/main/java/com/zulip/android/activities/LoginActivity.java b/app/src/main/java/com/zulip/android/activities/LoginActivity.java index 57e33f748..7746f7424 100644 --- a/app/src/main/java/com/zulip/android/activities/LoginActivity.java +++ b/app/src/main/java/com/zulip/android/activities/LoginActivity.java @@ -11,10 +11,6 @@ import android.os.Bundle; import android.support.customtabs.CustomTabsIntent; import android.support.v7.app.AlertDialog; -import android.support.v7.widget.Toolbar; -import android.text.Editable; -import android.text.InputType; -import android.text.TextWatcher; import android.util.Log; import android.util.Patterns; import android.view.View; @@ -70,7 +66,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener, private EditText mServerEditText; private EditText mUserName; private EditText mPassword; - private ImageView mShowPassword; + private ImageView logo; private EditText serverIn; private boolean skipAnimations = false; //endregion @@ -83,10 +79,6 @@ protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.login); - Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); - toolbar.setTitle(R.string.title_login); - setSupportActionBar(toolbar); - // Progress bar to be displayed if the connection failure is not resolved. commonProgressDialog = new CommonProgressDialog(this); mServerEditText = (EditText) findViewById(R.id.server_url); @@ -95,7 +87,7 @@ protected void onCreate(Bundle savedInstanceState) { findViewById(R.id.zulip_login).setOnClickListener(this); mUserName = (EditText) findViewById(R.id.username); mPassword = (EditText) findViewById(R.id.password); - mShowPassword = (ImageView) findViewById(R.id.showPassword); + logo = (ImageView) findViewById(R.id.logo); serverIn = (EditText) findViewById(R.id.server_url_in); String serverUrl = getIntent().getStringExtra(Constants.SERVER_URL); if (serverUrl != null) { @@ -118,6 +110,8 @@ public void onClick(View view) { findViewById(R.id.passwordAuthLayout).setVisibility(View.GONE); findViewById(R.id.google_sign_in_button).setVisibility(View.GONE); findViewById(R.id.local_server_button).setVisibility(View.GONE); + findViewById(R.id.forgotRegister).setVisibility(View.GONE); + findViewById(R.id.logo).setVisibility(View.VISIBLE); //remove error from all editText as user now corrected serverUrl mPassword.setError(null); mUserName.setError(null); @@ -134,49 +128,6 @@ public void onClick(View view) { mPassword.setText(savedInstanceState.getString(PASSWORD)); } - mShowPassword.setVisibility(View.GONE); - mPassword.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD); - mPassword.addTextChangedListener(new TextWatcher() { - @Override - public void beforeTextChanged(CharSequence s, int start, int count, int after) { - - } - - @Override - public void onTextChanged(CharSequence s, int start, int before, int count) { - - if (mPassword.getText().length() > 0) { - mShowPassword.setVisibility(View.VISIBLE); - } else { - mShowPassword.setVisibility(View.GONE); - } - - } - - @Override - public void afterTextChanged(Editable s) { - - } - }); - - - mShowPassword.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - - if (mShowPassword.getTag().toString().equals("visible")) { - mShowPassword.setTag("hide"); - mShowPassword.setImageResource(R.drawable.ic_visibility_off_black_24dp); - mPassword.setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD); - mPassword.setSelection(mPassword.length()); - } else { - mShowPassword.setTag("visible"); - mShowPassword.setImageResource(R.drawable.ic_visibility_black_24dp); - mPassword.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD); - mPassword.setSelection(mPassword.length()); - } - } - }); } private void showLoginFields() { @@ -314,6 +265,9 @@ public void onSuccess(Call call, Response + + + \ No newline at end of file diff --git a/app/src/main/res/anim/slide_in_right.xml b/app/src/main/res/anim/slide_in_right.xml new file mode 100644 index 000000000..891682ac1 --- /dev/null +++ b/app/src/main/res/anim/slide_in_right.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/anim/slide_out_left.xml b/app/src/main/res/anim/slide_out_left.xml new file mode 100644 index 000000000..048a18b9d --- /dev/null +++ b/app/src/main/res/anim/slide_out_left.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/anim/slide_out_right.xml b/app/src/main/res/anim/slide_out_right.xml new file mode 100644 index 000000000..c7fe2e4a0 --- /dev/null +++ b/app/src/main/res/anim/slide_out_right.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/animator-v21/appbar_always_elevated.xml b/app/src/main/res/animator-v21/appbar_always_elevated.xml deleted file mode 100644 index 0b0c90800..000000000 --- a/app/src/main/res/animator-v21/appbar_always_elevated.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable-hdpi/ic_visibility_black_24dp.png b/app/src/main/res/drawable-hdpi/ic_visibility_black_24dp.png deleted file mode 100644 index 329e617e9..000000000 Binary files a/app/src/main/res/drawable-hdpi/ic_visibility_black_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/ic_visibility_off_black_24dp.png b/app/src/main/res/drawable-hdpi/ic_visibility_off_black_24dp.png deleted file mode 100644 index b21a68629..000000000 Binary files a/app/src/main/res/drawable-hdpi/ic_visibility_off_black_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/logo.png b/app/src/main/res/drawable-hdpi/logo.png new file mode 100644 index 000000000..efc466ab6 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/logo.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_visibility_black_24dp.png b/app/src/main/res/drawable-mdpi/ic_visibility_black_24dp.png deleted file mode 100644 index 58597e91b..000000000 Binary files a/app/src/main/res/drawable-mdpi/ic_visibility_black_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/ic_visibility_off_black_24dp.png b/app/src/main/res/drawable-mdpi/ic_visibility_off_black_24dp.png deleted file mode 100644 index 3efdf4922..000000000 Binary files a/app/src/main/res/drawable-mdpi/ic_visibility_off_black_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_visibility_black_24dp.png b/app/src/main/res/drawable-xhdpi/ic_visibility_black_24dp.png deleted file mode 100644 index 1f7b4cc8f..000000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_visibility_black_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_visibility_off_black_24dp.png b/app/src/main/res/drawable-xhdpi/ic_visibility_off_black_24dp.png deleted file mode 100644 index 46bf0c931..000000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_visibility_off_black_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_visibility_black_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_visibility_black_24dp.png deleted file mode 100644 index c816ab49d..000000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_visibility_black_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_visibility_off_black_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_visibility_off_black_24dp.png deleted file mode 100644 index 13eb65df3..000000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_visibility_off_black_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_visibility_black_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_visibility_black_24dp.png deleted file mode 100644 index e005b976c..000000000 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_visibility_black_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_visibility_off_black_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_visibility_off_black_24dp.png deleted file mode 100644 index ce3c9d84d..000000000 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_visibility_off_black_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable/login_button.xml b/app/src/main/res/drawable/login_button.xml new file mode 100644 index 000000000..fbe2776f6 --- /dev/null +++ b/app/src/main/res/drawable/login_button.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-large-v21/login.xml b/app/src/main/res/layout-large-v21/login.xml new file mode 100644 index 000000000..8247b3877 --- /dev/null +++ b/app/src/main/res/layout-large-v21/login.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +