Revision 6b8dad86 src/com/rackspacecloud/android/AddAccountActivity.java
b/src/com/rackspacecloud/android/AddAccountActivity.java | ||
---|---|---|
1 | 1 |
package com.rackspacecloud.android; |
2 | 2 |
|
3 |
import android.app.AlertDialog; |
|
4 |
import android.content.DialogInterface; |
|
5 | 3 |
import android.content.Intent; |
6 | 4 |
import android.os.Bundle; |
7 | 5 |
import android.text.method.PasswordTransformationMethod; |
... | ... | |
15 | 13 |
import android.widget.EditText; |
16 | 14 |
import android.widget.Spinner; |
17 | 15 |
|
18 |
public class AddAccountActivity extends GaActivity implements OnClickListener{
|
|
16 |
public class AddAccountActivity extends CloudActivity implements OnClickListener{
|
|
19 | 17 |
|
20 | 18 |
private final String[] PROVIDERS = {"Rackspace Cloud (US)", "Rackspace Cloud (UK)", "Custom"}; |
21 | 19 |
private EditText usernameText; |
... | ... | |
129 | 127 |
return authServer; |
130 | 128 |
} |
131 | 129 |
|
132 |
private void showAlert(String title, String message) { |
|
133 |
try { |
|
134 |
AlertDialog alert = new AlertDialog.Builder(this).create(); |
|
135 |
alert.setTitle(title); |
|
136 |
alert.setMessage(message); |
|
137 |
alert.setButton("OK", new DialogInterface.OnClickListener() { |
|
138 |
public void onClick(DialogInterface dialog, int which) { |
|
139 |
return; |
|
140 |
} }); |
|
141 |
alert.show(); |
|
142 |
} catch (Exception e) { |
|
143 |
e.printStackTrace(); |
|
144 |
} |
|
145 |
} |
|
146 |
|
|
147 | 130 |
private boolean hasValidInput() { |
148 | 131 |
String username = usernameText.getText().toString(); |
149 | 132 |
String apiKey = apiKeyText.getText().toString(); |
Also available in: Unified diff