mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Merge remote-tracking branch 'refs/remotes/nicolas-raoul/master'
This commit is contained in:
commit
f0eb6a795b
3 changed files with 17 additions and 2 deletions
|
|
@ -63,8 +63,14 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:text="@string/login" />
|
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>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
<string name="username">Username</string>
|
<string name="username">Username</string>
|
||||||
<string name="password">Password</string>
|
<string name="password">Password</string>
|
||||||
<string name="login">Log in</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_title">Logging in</string>
|
||||||
<string name="logging_in_message">Please wait...</string>
|
<string name="logging_in_message">Please wait...</string>
|
||||||
<string name="login_success">Login success!</string>
|
<string name="login_success">Login success!</string>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package fr.free.nrw.commons.auth;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import android.content.*;
|
import android.content.*;
|
||||||
|
import android.net.Uri;
|
||||||
import android.text.*;
|
import android.text.*;
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
import de.keyboardsurfer.android.widget.crouton.*;
|
import de.keyboardsurfer.android.widget.crouton.*;
|
||||||
|
|
@ -30,6 +31,7 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
||||||
private CommonsApplication app;
|
private CommonsApplication app;
|
||||||
|
|
||||||
Button loginButton;
|
Button loginButton;
|
||||||
|
Button signupButton;
|
||||||
EditText usernameEdit;
|
EditText usernameEdit;
|
||||||
EditText passwordEdit;
|
EditText passwordEdit;
|
||||||
|
|
||||||
|
|
@ -131,6 +133,7 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
||||||
app = (CommonsApplication) this.getApplicationContext();
|
app = (CommonsApplication) this.getApplicationContext();
|
||||||
setContentView(R.layout.activity_login);
|
setContentView(R.layout.activity_login);
|
||||||
loginButton = (Button) findViewById(R.id.loginButton);
|
loginButton = (Button) findViewById(R.id.loginButton);
|
||||||
|
signupButton = (Button) findViewById(R.id.signupButton);
|
||||||
usernameEdit = (EditText) findViewById(R.id.loginUsername);
|
usernameEdit = (EditText) findViewById(R.id.loginUsername);
|
||||||
passwordEdit = (EditText) findViewById(R.id.loginPassword);
|
passwordEdit = (EditText) findViewById(R.id.loginPassword);
|
||||||
final LoginActivity that = this;
|
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() {
|
loginButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
that.performLogin();
|
that.performLogin();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue