aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorzeapo <mohamed@zenadi.com>2014-08-17 14:08:56 +0200
committerzeapo <mohamed@zenadi.com>2014-08-17 14:08:56 +0200
commit2c680cab593b6c58988e058c1c775fa9c1476b28 (patch)
tree1e0886e164bc7bb027a798c7dd2bea72ab932ff8 /app/src
parentc2fb1a3ee2f4fa4721186df012f4a381d40f96af (diff)
ui improvements and fixed a slight bug due to ui
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/utils/PasswordAdapter.java36
-rw-r--r--app/src/main/res/drawable-hdpi/ico_add.pngbin213 -> 368 bytes
-rw-r--r--app/src/main/res/drawable-hdpi/ico_eye.pngbin0 -> 472 bytes
-rw-r--r--app/src/main/res/drawable-hdpi/ico_sync.pngbin0 -> 919 bytes
-rw-r--r--app/src/main/res/drawable-mdpi/ico_add.pngbin157 -> 266 bytes
-rw-r--r--app/src/main/res/drawable-mdpi/ico_eye.pngbin0 -> 291 bytes
-rw-r--r--app/src/main/res/drawable-mdpi/ico_sync.pngbin0 -> 583 bytes
-rw-r--r--app/src/main/res/drawable-xhdpi/ico_add.pngbin207 -> 521 bytes
-rw-r--r--app/src/main/res/drawable-xhdpi/ico_eye.pngbin0 -> 624 bytes
-rw-r--r--app/src/main/res/drawable-xhdpi/ico_sync.pngbin0 -> 1224 bytes
-rw-r--r--app/src/main/res/drawable-xxhdpi/ico_add.pngbin262 -> 840 bytes
-rw-r--r--app/src/main/res/drawable-xxhdpi/ico_eye.pngbin0 -> 970 bytes
-rw-r--r--app/src/main/res/drawable-xxhdpi/ico_sync.pngbin0 -> 1895 bytes
-rw-r--r--app/src/main/res/layout/activity_pwdstore.xml13
-rw-r--r--app/src/main/res/layout/encrypt_layout.xml177
-rw-r--r--app/src/main/res/layout/password_row_layout.xml2
-rw-r--r--app/src/main/res/menu/pwdstore.xml5
17 files changed, 106 insertions, 127 deletions
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<PasswordItem>{
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<PasswordItem>{
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
--- a/app/src/main/res/drawable-hdpi/ico_add.png
+++ b/app/src/main/res/drawable-hdpi/ico_add.png
Binary files 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
--- /dev/null
+++ b/app/src/main/res/drawable-hdpi/ico_eye.png
Binary files 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
--- /dev/null
+++ b/app/src/main/res/drawable-hdpi/ico_sync.png
Binary files 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
--- a/app/src/main/res/drawable-mdpi/ico_add.png
+++ b/app/src/main/res/drawable-mdpi/ico_add.png
Binary files 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
--- /dev/null
+++ b/app/src/main/res/drawable-mdpi/ico_eye.png
Binary files 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
--- /dev/null
+++ b/app/src/main/res/drawable-mdpi/ico_sync.png
Binary files 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
--- a/app/src/main/res/drawable-xhdpi/ico_add.png
+++ b/app/src/main/res/drawable-xhdpi/ico_add.png
Binary files 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
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/ico_eye.png
Binary files 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
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/ico_sync.png
Binary files 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
--- a/app/src/main/res/drawable-xxhdpi/ico_add.png
+++ b/app/src/main/res/drawable-xxhdpi/ico_add.png
Binary files 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
--- /dev/null
+++ b/app/src/main/res/drawable-xxhdpi/ico_eye.png
Binary files 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
--- /dev/null
+++ b/app/src/main/res/drawable-xxhdpi/ico_sync.png
Binary files 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"></LinearLayout>
-
- <ImageButton
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/ico_add"
- android:background="@drawable/oval"
- android:layout_gravity="center_vertical"
- android:onClick="createPassword"
- android:layout_column="2"
- android:layout_alignParentBottom="true"
- android:layout_alignRight="@+id/main_layout"
- android:layout_alignEnd="@+id/main_layout" />
-
</RelativeLayout>
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 @@
<?xml version="1.0" encoding="utf-8"?>
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:paddingLeft="@dimen/activity_horizontal_margin"
- android:paddingRight="@dimen/activity_horizontal_margin"
- android:paddingTop="@dimen/activity_vertical_margin"
- android:paddingBottom="@dimen/activity_vertical_margin"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ tools:context="com.zeapo.pwdstore.crypto.PgpHandler"
android:background="#eee">
- <GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
+ <LinearLayout
android:layout_width="match_parent"
- android:layout_height="fill_parent"
- tools:context="com.zeapo.pwdstore.crypto.PgpHandler">
-
-
- <LinearLayout
- android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@drawable/rectangle"
+ android:orientation="horizontal"
+ android:layout_row="1"
+ android:layout_column="0">
+
+ <TextView
+ android:id="@+id/crypto_password_category"
+ android:layout_gravity="center_vertical"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:background="@drawable/rectangle"
- android:orientation="horizontal"
- android:layout_row="1"
- android:layout_column="0">
-
- <TextView
- android:id="@+id/crypto_password_category"
- android:layout_gravity="center_vertical"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textStyle="bold"
- android:textColor="@android:color/holo_blue_dark"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:text="CATEGORY/"/>
+ android:textStyle="bold"
+ android:textColor="@android:color/holo_blue_dark"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:text="CATEGORY/"/>
- <EditText
- android:layout_gravity="center_vertical"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:id="@+id/crypto_password_file_edit"
- android:hint="@string/crypto_name_hint"
- android:textColor="@android:color/holo_orange_dark"/>
+ <EditText
+ android:layout_gravity="center_vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/crypto_password_file_edit"
+ android:hint="@string/crypto_name_hint"
+ android:textColor="@android:color/holo_orange_dark"/>
- </LinearLayout>
+ </LinearLayout>
+ <ScrollView android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_marginTop="@dimen/activity_vertical_margin"
+ android:layout_marginBottom="@dimen/activity_vertical_margin"
+ android:background="@drawable/rectangle"
+ android:layout_weight="1">
<LinearLayout
android:id="@+id/crypto_container"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_marginTop="@dimen/activity_vertical_margin"
- android:background="@drawable/rectangle"
android:layout_height="wrap_content"
- android:layout_row="2"
- android:layout_column="0">
+ android:paddingLeft="@dimen/activity_horizontal_margin"
+ android:paddingRight="@dimen/activity_horizontal_margin">
<LinearLayout
- android:id="@+id/crypto_password_edit_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textStyle="bold"
- android:text="@string/crypto_pass_label"/>
- <EditText
- android:id="@+id/crypto_password_edit"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:typeface="monospace"/>
- </LinearLayout>
-
+ android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
android:textStyle="bold"
- android:text="@string/crypto_extra_label"/>
-
+ android:text="@string/crypto_pass_label"/>
<EditText
- android:id="@+id/crypto_extra_edit"
- android:layout_width="match_parent"
+ android:id="@+id/crypto_password_edit"
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:enabled="true"
- android:visibility="visible"
android:typeface="monospace"/>
</LinearLayout>
- </LinearLayout>
- <RelativeLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_row="3"
- android:layout_column="0">
- <ImageButton
- android:layout_height="wrap_content"
+ <TextView
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" />
-
- <ImageButton
android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:src="@drawable/ico_cancel"
- android:background="@drawable/oval"
- android:id="@+id/crypto_cancel_add"
- android:onClick="handleClick"
- android:layout_alignParentTop="true"
- android:layout_alignParentLeft="true"
- android:layout_alignParentStart="true" />
- </RelativeLayout>
+ android:layout_marginTop="8dp"
+ android:textStyle="bold"
+ android:text="@string/crypto_extra_label"/>
+
+ <EditText
+ android:id="@+id/crypto_extra_edit"
+ android:layout_width="match_parent"
+ android:layout_height="fill_parent"
+ android:enabled="true"
+ android:visibility="visible"
+ android:typeface="monospace"/>
+ </LinearLayout>
- </GridLayout>
-</ScrollView>
+ </ScrollView>
+ <RelativeLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="0">
+ <ImageButton
+ android:layout_height="wrap_content"
+ 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" />
+
+ <ImageButton
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:src="@drawable/ico_cancel"
+ android:background="@drawable/oval"
+ android:id="@+id/crypto_cancel_add"
+ android:onClick="handleClick"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true" />
+ </RelativeLayout>
+
+
+</LinearLayout> \ 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 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".pwdstore" >
+
<item android:id="@+id/menu_add_password"
+ android:icon="@drawable/ico_add"
+ android:showAsAction="always"
android:title="New password"/>
<!--<item android:id="@+id/menu_add_category"-->
@@ -15,7 +18,7 @@
<item android:id="@+id/referesh"
android:title="Refresh list"
android:showAsAction="ifRoom"
- android:icon="@android:drawable/ic_popup_sync"/>
+ android:icon="@drawable/ico_sync"/>
<item android:id="@+id/user_pref"
android:title="Settings"