diff options
author | Zeapo <mohamed@zenadi.com> | 2014-07-27 03:33:08 +0100 |
---|---|---|
committer | Zeapo <mohamed@zenadi.com> | 2014-07-27 03:33:08 +0100 |
commit | c75fd77fdf39328e41a2e23c26583ab745df44a3 (patch) | |
tree | 7afff75e12814185501521a6c3d9315ec87ce65c /app/src/main/res | |
parent | 784a474efb93f5c45fd24ed63ecfdd6f198ba51d (diff) |
Implemented the List view, a lot of work to do..
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable-xxhdpi/rectangle.xml | 23 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_pwdstore.xml | 7 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_password_grid.xml | 20 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_password_list.xml | 15 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_to_clone_or_not.xml | 37 | ||||
-rw-r--r-- | app/src/main/res/layout/password_row_layout.xml | 13 | ||||
-rw-r--r-- | app/src/main/res/menu/pwdstore.xml | 5 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 4 |
8 files changed, 117 insertions, 7 deletions
diff --git a/app/src/main/res/drawable-xxhdpi/rectangle.xml b/app/src/main/res/drawable-xxhdpi/rectangle.xml new file mode 100644 index 00000000..67e169df --- /dev/null +++ b/app/src/main/res/drawable-xxhdpi/rectangle.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> + +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item> + <shape android:shape="rectangle" + android:dither="true"> + <corners android:radius="2dp"/> + <solid android:color="#ccc" /> + </shape> + </item> + + <item android:bottom="2dp"> + <shape android:shape="rectangle" android:dither="true"> + <corners android:radius="2dp" /> + <solid android:color="@android:color/white" /> + + <padding android:bottom="8dp" + android:left="8dp" + android:right="8dp" + android:top="8dp" /> + </shape> + </item> +</layer-list>
\ No newline at end of file diff --git a/app/src/main/res/layout/activity_pwdstore.xml b/app/src/main/res/layout/activity_pwdstore.xml index a59ed394..0060cb78 100644 --- a/app/src/main/res/layout/activity_pwdstore.xml +++ b/app/src/main/res/layout/activity_pwdstore.xml @@ -6,6 +6,13 @@ android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin" + android:background="#eee" tools:context=".pwdstore"> + <LinearLayout + android:id="@+id/main_layout" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"></LinearLayout> + </RelativeLayout> diff --git a/app/src/main/res/layout/fragment_password_grid.xml b/app/src/main/res/layout/fragment_password_grid.xml new file mode 100644 index 00000000..b23aa4d3 --- /dev/null +++ b/app/src/main/res/layout/fragment_password_grid.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context="com.zeapo.pwdstore.PasswordFragment"> + + <GridView + android:id="@android:id/list" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:numColumns="2" /> + + <TextView + android:id="@android:id/empty" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="center" /> + +</FrameLayout> diff --git a/app/src/main/res/layout/fragment_password_list.xml b/app/src/main/res/layout/fragment_password_list.xml new file mode 100644 index 00000000..9ee68056 --- /dev/null +++ b/app/src/main/res/layout/fragment_password_list.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context="com.zeapo.pwdstore.PasswordFragment"> + + <ListView + android:id="@android:id/list" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:dividerHeight="8dp" + android:divider="@android:color/transparent"/> + +</FrameLayout> diff --git a/app/src/main/res/layout/fragment_to_clone_or_not.xml b/app/src/main/res/layout/fragment_to_clone_or_not.xml new file mode 100644 index 00000000..c11f3567 --- /dev/null +++ b/app/src/main/res/layout/fragment_to_clone_or_not.xml @@ -0,0 +1,37 @@ +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="#eee" + tools:context="com.zeapo.pwdstore.ToCloneOrNot"> + + <LinearLayout + android:id="@+id/myRectangleView" + android:layout_width="200dp" + android:layout_height="wrap_content" + android:background="@drawable/rectangle" + android:layout_gravity="center" + android:orientation="vertical"> + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" + android:text="You have no git repository for the password store."/> + <Button + android:id="@+id/main_clone_button" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginBottom="8dp" + android:background="@android:color/holo_green_light" + android:onClick="getClone" + android:text="Clone!"/> + <Button + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:background="@android:color/holo_red_light" + android:text="Initialize!"/> + </LinearLayout> + +</FrameLayout> diff --git a/app/src/main/res/layout/password_row_layout.xml b/app/src/main/res/layout/password_row_layout.xml new file mode 100644 index 00000000..4a562f76 --- /dev/null +++ b/app/src/main/res/layout/password_row_layout.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:id="@+id/pass_row_layout" + android:background="@drawable/rectangle"> + <TextView + android:id="@+id/label" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:padding="8dp"/> + +</LinearLayout> diff --git a/app/src/main/res/menu/pwdstore.xml b/app/src/main/res/menu/pwdstore.xml index 749cabdd..7dc96cff 100644 --- a/app/src/main/res/menu/pwdstore.xml +++ b/app/src/main/res/menu/pwdstore.xml @@ -1,9 +1,4 @@ <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" tools:context=".pwdstore" > - <item android:id="@+id/clone_setting" - android:title="@string/clone_settings" - android:orderInCategory="100" - android:showAsAction="ifRoom|withText" - android:icon="@android:drawable/stat_sys_download"/> </menu> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 50acf7e6..c348f3aa 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -6,7 +6,6 @@ <string name="clone_settings">Clone</string> <string name="action_settings">Settings</string> <string name="hello_world">Hello world!</string> - <string name="dialog_delete_title">Directory already exist</string> <string name="dialog_delete_msg">Target directory already exist. Current version support only a single store. Do you want to delete the current password store directory?</string> <string name="dialog_delete">Delete directory</string> @@ -16,11 +15,12 @@ <item>username/password</item> <item>ssh-key</item> </string-array> - <string-array name="clone_protocols"> <item>ssh://</item> <item>https://</item> <item>http://</item> </string-array> + <string name="hello_blank_fragment">Hello blank fragment</string> + </resources> |