mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
commit
3e2cef56cc
3 changed files with 17 additions and 2 deletions
|
|
@ -63,8 +63,14 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:enabled="false"
|
||||
android:text="@string/login" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/signupButton"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/signup"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
<string name="username">Username</string>
|
||||
<string name="password">Password</string>
|
||||
<string name="login">Log in</string>
|
||||
<string name="signup">Sign up</string>
|
||||
<string name="logging_in_title">Logging in</string>
|
||||
<string name="logging_in_message">Please wait...</string>
|
||||
<string name="login_success">Login success!</string>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package fr.free.nrw.commons.auth;
|
|||
import java.io.IOException;
|
||||
|
||||
import android.content.*;
|
||||
import android.net.Uri;
|
||||
import android.text.*;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import de.keyboardsurfer.android.widget.crouton.*;
|
||||
|
|
@ -30,6 +31,7 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
|||
private CommonsApplication app;
|
||||
|
||||
Button loginButton;
|
||||
Button signupButton;
|
||||
EditText usernameEdit;
|
||||
EditText passwordEdit;
|
||||
|
||||
|
|
@ -131,6 +133,7 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
|||
app = (CommonsApplication) this.getApplicationContext();
|
||||
setContentView(R.layout.activity_login);
|
||||
loginButton = (Button) findViewById(R.id.loginButton);
|
||||
signupButton = (Button) findViewById(R.id.signupButton);
|
||||
usernameEdit = (EditText) findViewById(R.id.loginUsername);
|
||||
passwordEdit = (EditText) findViewById(R.id.loginPassword);
|
||||
final LoginActivity that = this;
|
||||
|
|
@ -166,8 +169,13 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
|||
}
|
||||
});
|
||||
|
||||
signupButton.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW).setData(Uri.parse("https://commons.wikimedia.org/wiki/Special:UserLogin/signup")));
|
||||
}
|
||||
});
|
||||
|
||||
loginButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
that.performLogin();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue