Skip to content
Snippets Groups Projects
Commit f126dade authored by Alexandre Lision's avatar Alexandre Lision
Browse files

* Added shortcut wizard for dev

parent 67817199
Branches
No related tags found
No related merge requests found
...@@ -59,6 +59,13 @@ ...@@ -59,6 +59,13 @@
android:paddingLeft="32dp" android:paddingLeft="32dp"
android:paddingRight="32dp" android:paddingRight="32dp"
android:text="@string/action_create" /> android:text="@string/action_create" />
<Button
android:id="@+id/dev_account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Dev Account" />
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
\ No newline at end of file
...@@ -55,9 +55,36 @@ public class AccountCreationFragment extends Fragment { ...@@ -55,9 +55,36 @@ public class AccountCreationFragment extends Fragment {
inflatedView.findViewById(R.id.create_button).setOnClickListener(new View.OnClickListener() { inflatedView.findViewById(R.id.create_button).setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
mAlias = mAliasView.getText().toString();
mHostname = mHostnameView.getText().toString();
mUsername = mUsernameView.getText().toString();
mPassword = mPasswordView.getText().toString();
attemptCreation(); attemptCreation();
} }
}); });
inflatedView.findViewById(R.id.dev_account).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
createDevAccount();
}
private void createDevAccount() {
mUsername = mUsernameView.getText().toString();
if (TextUtils.isEmpty(mUsername)) {
mUsernameView.setError(getString(R.string.error_field_required));
mUsernameView.requestFocus();
return;
} else {
mAlias = mUsername;
mHostname = "192.95.9.63";
mPassword = "sfl_u"+mUsername;
attemptCreation();
}
}
});
return inflatedView; return inflatedView;
} }
...@@ -84,10 +111,7 @@ public class AccountCreationFragment extends Fragment { ...@@ -84,10 +111,7 @@ public class AccountCreationFragment extends Fragment {
mPasswordView.setError(null); mPasswordView.setError(null);
// Store values at the time of the login attempt. // Store values at the time of the login attempt.
mAlias = mAliasView.getText().toString();
mHostname = mHostnameView.getText().toString();
mUsername = mUsernameView.getText().toString();
mPassword = mPasswordView.getText().toString();
boolean cancel = false; boolean cancel = false;
View focusView = null; View focusView = null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment