Skip to content

Commit 6e9331b

Browse files
Skip textview added and onclick implemented
1 parent 35f05be commit 6e9331b

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

app/src/main/java/fr/free/nrw/commons/auth/LoginActivity.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import butterknife.BindView;
3838
import butterknife.ButterKnife;
3939
import butterknife.OnClick;
40+
import fr.free.nrw.commons.AboutActivity;
4041
import fr.free.nrw.commons.BuildConfig;
4142
import fr.free.nrw.commons.PageTitle;
4243
import fr.free.nrw.commons.R;
@@ -78,6 +79,7 @@ public class LoginActivity extends AccountAuthenticatorActivity {
7879
@BindView(R.id.login_credentials) TextView loginCredentials;
7980
@BindView(R.id.two_factor_container) TextInputLayout twoFactorContainer;
8081
@BindView(R.id.forgotPassword) HtmlTextView forgotPasswordText;
82+
@BindView(R.id.skipLogin) HtmlTextView skipLoginText;
8183

8284
ProgressDialog progressDialog;
8385
private AppCompatDelegate delegate;
@@ -127,6 +129,7 @@ public void onCreate(Bundle savedInstanceState) {
127129
signupButton.setOnClickListener(view -> signUp());
128130

129131
forgotPasswordText.setOnClickListener(view -> forgotPassword());
132+
skipLoginText.setOnClickListener(view -> skipLogin());
130133

131134
if(BuildConfig.FLAVOR.equals("beta")){
132135
loginCredentials.setText(getString(R.string.login_credential));
@@ -135,6 +138,11 @@ public void onCreate(Bundle savedInstanceState) {
135138
}
136139
}
137140

141+
private void skipLogin() {
142+
NavigationBaseActivity.startActivityWithFlags(this, AboutActivity.class, Intent.FLAG_ACTIVITY_CLEAR_TOP);
143+
finish();
144+
}
145+
138146
private void forgotPassword() {
139147
Utils.handleWebUrl(this, Uri.parse(BuildConfig.FORGOT_PASSWORD_URL));
140148
}

app/src/main/res/layout/activity_login.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,16 @@
207207
android:layout_marginBottom="@dimen/standard_gap"
208208
android:text="@string/forgot_password" />
209209

210+
<fr.free.nrw.commons.ui.widget.HtmlTextView
211+
android:visibility="visible"
212+
android:id="@+id/skipLogin"
213+
android:layout_width="match_parent"
214+
android:gravity="center_horizontal"
215+
android:layout_height="wrap_content"
216+
android:layout_below="@id/forgotPassword"
217+
android:layout_marginBottom="@dimen/standard_gap"
218+
android:text="@string/skip_login" />
219+
210220
</RelativeLayout>
211221

212222
</android.support.v7.widget.CardView>

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,4 +270,5 @@
270270
<string name="about_translate_proceed">Proceed</string>
271271
<string name="about_translate_cancel">Cancel</string>
272272
<string name="retry">Retry</string>
273+
<string name="skip_login">Skip </string>
273274
</resources>

0 commit comments

Comments
 (0)