From 2c680cab593b6c58988e058c1c775fa9c1476b28 Mon Sep 17 00:00:00 2001 From: zeapo Date: Sun, 17 Aug 2014 14:08:56 +0200 Subject: ui improvements and fixed a slight bug due to ui --- .../com/zeapo/pwdstore/utils/PasswordAdapter.java | 36 ++--- app/src/main/res/drawable-hdpi/ico_add.png | Bin 213 -> 368 bytes app/src/main/res/drawable-hdpi/ico_eye.png | Bin 0 -> 472 bytes app/src/main/res/drawable-hdpi/ico_sync.png | Bin 0 -> 919 bytes app/src/main/res/drawable-mdpi/ico_add.png | Bin 157 -> 266 bytes app/src/main/res/drawable-mdpi/ico_eye.png | Bin 0 -> 291 bytes app/src/main/res/drawable-mdpi/ico_sync.png | Bin 0 -> 583 bytes app/src/main/res/drawable-xhdpi/ico_add.png | Bin 207 -> 521 bytes app/src/main/res/drawable-xhdpi/ico_eye.png | Bin 0 -> 624 bytes app/src/main/res/drawable-xhdpi/ico_sync.png | Bin 0 -> 1224 bytes app/src/main/res/drawable-xxhdpi/ico_add.png | Bin 262 -> 840 bytes app/src/main/res/drawable-xxhdpi/ico_eye.png | Bin 0 -> 970 bytes app/src/main/res/drawable-xxhdpi/ico_sync.png | Bin 0 -> 1895 bytes app/src/main/res/layout/activity_pwdstore.xml | 13 -- app/src/main/res/layout/encrypt_layout.xml | 177 ++++++++++----------- app/src/main/res/layout/password_row_layout.xml | 2 +- app/src/main/res/menu/pwdstore.xml | 5 +- 17 files changed, 106 insertions(+), 127 deletions(-) create mode 100644 app/src/main/res/drawable-hdpi/ico_eye.png create mode 100644 app/src/main/res/drawable-hdpi/ico_sync.png create mode 100644 app/src/main/res/drawable-mdpi/ico_eye.png create mode 100644 app/src/main/res/drawable-mdpi/ico_sync.png create mode 100644 app/src/main/res/drawable-xhdpi/ico_eye.png create mode 100644 app/src/main/res/drawable-xhdpi/ico_sync.png create mode 100644 app/src/main/res/drawable-xxhdpi/ico_eye.png create mode 100644 app/src/main/res/drawable-xxhdpi/ico_sync.png (limited to 'app/src') diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordAdapter.java b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordAdapter.java index 2aaa0bf5..fb9442fb 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordAdapter.java +++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordAdapter.java @@ -58,24 +58,6 @@ public class PasswordAdapter extends ArrayAdapter{ viewHolder.back_name = (TextView) rowView.findViewById(R.id.label_back); viewHolder.type = (TextView) rowView.findViewById(R.id.type); rowView.setTag(viewHolder); - - - View.OnClickListener onClickListener = new View.OnClickListener() { - @Override - public void onClick(View view) { - switch (view.getId()) { - case R.id.crypto_show_button: - activity.decryptPassword(pass); - break; - case R.id.crypto_delete_button: - activity.deletePassword(pass); - break; - } - } - }; - - ((ImageButton) rowView.findViewById(R.id.crypto_show_button)).setOnClickListener(onClickListener); - ((ImageButton) rowView.findViewById(R.id.crypto_delete_button)).setOnClickListener(onClickListener); } ViewHolder holder = (ViewHolder) rowView.getTag(); @@ -94,6 +76,24 @@ public class PasswordAdapter extends ArrayAdapter{ holder.back_name.setTextColor(this.activity.getResources().getColor(android.R.color.white)); holder.back_name.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD_ITALIC)); + + + View.OnClickListener onClickListener = new View.OnClickListener() { + @Override + public void onClick(View view) { + switch (view.getId()) { + case R.id.crypto_show_button: + activity.decryptPassword(pass); + break; + case R.id.crypto_delete_button: + activity.deletePassword(pass); + break; + } + } + }; + + ((ImageButton) rowView.findViewById(R.id.crypto_show_button)).setOnClickListener(onClickListener); + ((ImageButton) rowView.findViewById(R.id.crypto_delete_button)).setOnClickListener(onClickListener); } return rowView; diff --git a/app/src/main/res/drawable-hdpi/ico_add.png b/app/src/main/res/drawable-hdpi/ico_add.png index fbbf25aa..b5544aaa 100644 Binary files a/app/src/main/res/drawable-hdpi/ico_add.png and b/app/src/main/res/drawable-hdpi/ico_add.png differ diff --git a/app/src/main/res/drawable-hdpi/ico_eye.png b/app/src/main/res/drawable-hdpi/ico_eye.png new file mode 100644 index 00000000..a7604ac4 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ico_eye.png differ diff --git a/app/src/main/res/drawable-hdpi/ico_sync.png b/app/src/main/res/drawable-hdpi/ico_sync.png new file mode 100644 index 00000000..16f1f00d Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ico_sync.png differ diff --git a/app/src/main/res/drawable-mdpi/ico_add.png b/app/src/main/res/drawable-mdpi/ico_add.png index c35e0c91..eec9dafc 100644 Binary files a/app/src/main/res/drawable-mdpi/ico_add.png and b/app/src/main/res/drawable-mdpi/ico_add.png differ diff --git a/app/src/main/res/drawable-mdpi/ico_eye.png b/app/src/main/res/drawable-mdpi/ico_eye.png new file mode 100644 index 00000000..84325f9a Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ico_eye.png differ diff --git a/app/src/main/res/drawable-mdpi/ico_sync.png b/app/src/main/res/drawable-mdpi/ico_sync.png new file mode 100644 index 00000000..6c69bce0 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ico_sync.png differ diff --git a/app/src/main/res/drawable-xhdpi/ico_add.png b/app/src/main/res/drawable-xhdpi/ico_add.png index 4bd0d714..598647f0 100644 Binary files a/app/src/main/res/drawable-xhdpi/ico_add.png and b/app/src/main/res/drawable-xhdpi/ico_add.png differ diff --git a/app/src/main/res/drawable-xhdpi/ico_eye.png b/app/src/main/res/drawable-xhdpi/ico_eye.png new file mode 100644 index 00000000..517360ba Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ico_eye.png differ diff --git a/app/src/main/res/drawable-xhdpi/ico_sync.png b/app/src/main/res/drawable-xhdpi/ico_sync.png new file mode 100644 index 00000000..80346dd3 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ico_sync.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ico_add.png b/app/src/main/res/drawable-xxhdpi/ico_add.png index 6ecf9567..b617b81e 100644 Binary files a/app/src/main/res/drawable-xxhdpi/ico_add.png and b/app/src/main/res/drawable-xxhdpi/ico_add.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ico_eye.png b/app/src/main/res/drawable-xxhdpi/ico_eye.png new file mode 100644 index 00000000..8dec5464 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ico_eye.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ico_sync.png b/app/src/main/res/drawable-xxhdpi/ico_sync.png new file mode 100644 index 00000000..c0b7dd9d Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ico_sync.png differ diff --git a/app/src/main/res/layout/activity_pwdstore.xml b/app/src/main/res/layout/activity_pwdstore.xml index 08dcf2ad..89a4c122 100644 --- a/app/src/main/res/layout/activity_pwdstore.xml +++ b/app/src/main/res/layout/activity_pwdstore.xml @@ -16,17 +16,4 @@ android:layout_height="wrap_content" android:orientation="vertical"> - - - diff --git a/app/src/main/res/layout/encrypt_layout.xml b/app/src/main/res/layout/encrypt_layout.xml index 3abfd7d6..1b89b0df 100644 --- a/app/src/main/res/layout/encrypt_layout.xml +++ b/app/src/main/res/layout/encrypt_layout.xml @@ -1,127 +1,116 @@ - - - - - + + - - + android:textStyle="bold" + android:textColor="@android:color/holo_blue_dark" + android:textAppearance="?android:attr/textAppearanceMedium" + android:text="CATEGORY/"/> - + - + + + android:paddingLeft="@dimen/activity_horizontal_margin" + android:paddingRight="@dimen/activity_horizontal_margin"> - - - - - - + android:orientation="horizontal"> - + android:text="@string/crypto_pass_label"/> - - - - - - + android:layout_marginTop="8dp" + android:textStyle="bold" + android:text="@string/crypto_extra_label"/> + + + - - + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/password_row_layout.xml b/app/src/main/res/layout/password_row_layout.xml index 641f4f85..05bf3457 100644 --- a/app/src/main/res/layout/password_row_layout.xml +++ b/app/src/main/res/layout/password_row_layout.xml @@ -35,7 +35,7 @@ android:id="@+id/crypto_show_button" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:src="@drawable/ico_key" + android:src="@drawable/ico_eye" android:background="@drawable/blue_rectangle" android:layout_gravity="center_vertical" android:layout_marginLeft="8dp" diff --git a/app/src/main/res/menu/pwdstore.xml b/app/src/main/res/menu/pwdstore.xml index facca6c4..65bc0272 100644 --- a/app/src/main/res/menu/pwdstore.xml +++ b/app/src/main/res/menu/pwdstore.xml @@ -1,7 +1,10 @@ + @@ -15,7 +18,7 @@ + android:icon="@drawable/ico_sync"/>