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,6 +58,24 @@ 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); + } + + ViewHolder holder = (ViewHolder) rowView.getTag(); + + holder.name.setText(pass.toString()); + holder.back_name.setText(pass.toString()); + + if (pass.getType() == PasswordItem.TYPE_CATEGORY) { + holder.name.setTextColor(this.activity.getResources().getColor(android.R.color.holo_blue_dark)); + holder.name.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD)); + holder.type.setText("Category: "); + } else { + holder.type.setText("Password: "); + holder.name.setTextColor(this.activity.getResources().getColor(android.R.color.holo_orange_dark)); + holder.name.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.NORMAL)); + + 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() { @@ -78,24 +96,6 @@ public class PasswordAdapter extends ArrayAdapter{ ((ImageButton) rowView.findViewById(R.id.crypto_delete_button)).setOnClickListener(onClickListener); } - ViewHolder holder = (ViewHolder) rowView.getTag(); - - holder.name.setText(pass.toString()); - holder.back_name.setText(pass.toString()); - - if (pass.getType() == PasswordItem.TYPE_CATEGORY) { - holder.name.setTextColor(this.activity.getResources().getColor(android.R.color.holo_blue_dark)); - holder.name.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD)); - holder.type.setText("Category: "); - } else { - holder.type.setText("Password: "); - holder.name.setTextColor(this.activity.getResources().getColor(android.R.color.holo_orange_dark)); - holder.name.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.NORMAL)); - - holder.back_name.setTextColor(this.activity.getResources().getColor(android.R.color.white)); - holder.back_name.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD_ITALIC)); - } - return rowView; } } \ No newline at end of file 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:layout_height="wrap_content" + android:background="@drawable/rectangle" + android:orientation="horizontal" + android:layout_row="1" + android:layout_column="0"> - - + 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_width="wrap_content" + android:src="@drawable/ico_check" + android:background="@drawable/oval" + android:id="@+id/crypto_confirm_add" + android:onClick="handleClick" + android:layout_alignParentTop="true" + android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" /> - - + + - - + \ 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"/>