Rename password fields.

This commit is contained in:
Brian Pellin
2009-10-29 23:45:52 -05:00
parent ac1c684ea9
commit 7271de9fab
2 changed files with 9 additions and 10 deletions

View File

@@ -30,7 +30,7 @@
android:layout_below="@id/filename_label" android:layout_below="@id/filename_label"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@android:drawable/divider_horizontal_dark"/> android:src="@android:drawable/divider_horizontal_dark"/>
<TextView android:id="@+id/pass_filename" <TextView android:id="@+id/filename"
style="@style/GroupText" style="@style/GroupText"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -39,7 +39,7 @@
<ImageView android:id="@+id/divider2" <ImageView android:id="@+id/divider2"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/pass_filename" android:layout_below="@id/filename"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@android:drawable/divider_horizontal_dark"/> android:src="@android:drawable/divider_horizontal_dark"/>
<TextView android:id="@+id/password_label" <TextView android:id="@+id/password_label"
@@ -47,7 +47,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/divider2" android:layout_below="@id/divider2"
android:text="@string/entry_and_or" /> android:text="@string/entry_and_or" />
<EditText android:id="@+id/pass_password" <EditText android:id="@+id/password"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/password_label" android:layout_below="@id/password_label"
@@ -57,7 +57,7 @@
<EditText android:id="@+id/pass_keyfile" <EditText android:id="@+id/pass_keyfile"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/pass_password" android:layout_below="@id/password"
android:singleLine="true" android:singleLine="true"
android:hint="@string/entry_keyfile"/> android:hint="@string/entry_keyfile"/>
<Button android:id="@+id/pass_ok" <Button android:id="@+id/pass_ok"

View File

@@ -43,7 +43,6 @@ import com.keepassdroid.app.App;
import com.keepassdroid.database.LoadDB; import com.keepassdroid.database.LoadDB;
import com.keepassdroid.database.OnFinish; import com.keepassdroid.database.OnFinish;
import com.keepassdroid.fileselect.FileDbHelper; import com.keepassdroid.fileselect.FileDbHelper;
import com.keepassdroid.intents.TimeoutIntents;
public class PasswordActivity extends Activity { public class PasswordActivity extends Activity {
@@ -138,7 +137,7 @@ public class PasswordActivity extends Activity {
@Override @Override
public void onCheckedChanged(CompoundButton buttonView, public void onCheckedChanged(CompoundButton buttonView,
boolean isChecked) { boolean isChecked) {
TextView password = (TextView) findViewById(R.id.pass_password); TextView password = (TextView) findViewById(R.id.password);
if ( isChecked ) { if ( isChecked ) {
password.setTransformationMethod(null); password.setTransformationMethod(null);
@@ -162,7 +161,7 @@ public class PasswordActivity extends Activity {
} }
private void populateView() { private void populateView() {
setEditText(R.id.pass_filename, mFileName); setEditText(R.id.filename, mFileName);
setEditText(R.id.pass_keyfile, mKeyFile); setEditText(R.id.pass_keyfile, mKeyFile);
} }
@@ -171,7 +170,7 @@ public class PasswordActivity extends Activity {
super.onResume(); super.onResume();
// Clear password on Database state // Clear password on Database state
setEditText(R.id.pass_password, ""); setEditText(R.id.password, "");
sendBroadcast(new Intent(TimeoutIntents.CANCEL)); sendBroadcast(new Intent(TimeoutIntents.CANCEL));
} }
@@ -204,14 +203,14 @@ public class PasswordActivity extends Activity {
private class ClickHandler implements View.OnClickListener { private class ClickHandler implements View.OnClickListener {
public void onClick(View view) { public void onClick(View view) {
String pass = getEditText(R.id.pass_password); String pass = getEditText(R.id.password);
String key = getEditText(R.id.pass_keyfile); String key = getEditText(R.id.pass_keyfile);
if ( pass.length() == 0 && key.length() == 0 ) { if ( pass.length() == 0 && key.length() == 0 ) {
errorMessage(R.string.error_nopass); errorMessage(R.string.error_nopass);
return; return;
} }
String fileName = getEditText(R.id.pass_filename); String fileName = getEditText(R.id.filename);
// Clear before we load // Clear before we load