Skip textview added and onclick implemented

This commit is contained in:
Ujjwal Agrawal 2018-05-01 15:58:40 +05:30
parent 35f05be8df
commit 6e9331b892
3 changed files with 19 additions and 0 deletions

View file

@ -37,6 +37,7 @@ import javax.inject.Named;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import fr.free.nrw.commons.AboutActivity;
import fr.free.nrw.commons.BuildConfig;
import fr.free.nrw.commons.PageTitle;
import fr.free.nrw.commons.R;
@ -78,6 +79,7 @@ public class LoginActivity extends AccountAuthenticatorActivity {
@BindView(R.id.login_credentials) TextView loginCredentials;
@BindView(R.id.two_factor_container) TextInputLayout twoFactorContainer;
@BindView(R.id.forgotPassword) HtmlTextView forgotPasswordText;
@BindView(R.id.skipLogin) HtmlTextView skipLoginText;
ProgressDialog progressDialog;
private AppCompatDelegate delegate;
@ -127,6 +129,7 @@ public class LoginActivity extends AccountAuthenticatorActivity {
signupButton.setOnClickListener(view -> signUp());
forgotPasswordText.setOnClickListener(view -> forgotPassword());
skipLoginText.setOnClickListener(view -> skipLogin());
if(BuildConfig.FLAVOR.equals("beta")){
loginCredentials.setText(getString(R.string.login_credential));
@ -135,6 +138,11 @@ public class LoginActivity extends AccountAuthenticatorActivity {
}
}
private void skipLogin() {
NavigationBaseActivity.startActivityWithFlags(this, AboutActivity.class, Intent.FLAG_ACTIVITY_CLEAR_TOP);
finish();
}
private void forgotPassword() {
Utils.handleWebUrl(this, Uri.parse(BuildConfig.FORGOT_PASSWORD_URL));
}

View file

@ -207,6 +207,16 @@
android:layout_marginBottom="@dimen/standard_gap"
android:text="@string/forgot_password" />
<fr.free.nrw.commons.ui.widget.HtmlTextView
android:visibility="visible"
android:id="@+id/skipLogin"
android:layout_width="match_parent"
android:gravity="center_horizontal"
android:layout_height="wrap_content"
android:layout_below="@id/forgotPassword"
android:layout_marginBottom="@dimen/standard_gap"
android:text="@string/skip_login" />
</RelativeLayout>
</android.support.v7.widget.CardView>

View file

@ -270,4 +270,5 @@
<string name="about_translate_proceed">Proceed</string>
<string name="about_translate_cancel">Cancel</string>
<string name="retry">Retry</string>
<string name="skip_login">Skip </string>
</resources>