diff options
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/child_row_layout.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/layout/decrypt_layout.xml | 46 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_password_list.xml | 19 | ||||
-rw-r--r-- | app/src/main/res/layout/password_row_layout.xml | 92 |
4 files changed, 93 insertions, 68 deletions
diff --git a/app/src/main/res/layout/child_row_layout.xml b/app/src/main/res/layout/child_row_layout.xml index 0fc5e33d..75efefad 100644 --- a/app/src/main/res/layout/child_row_layout.xml +++ b/app/src/main/res/layout/child_row_layout.xml @@ -2,7 +2,9 @@ <GridLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:id="@+id/child_row_layout" + android:layout_marginTop="@dimen/activity_vertical_margin"> <ImageButton android:id="@+id/crypto_delete_button" diff --git a/app/src/main/res/layout/decrypt_layout.xml b/app/src/main/res/layout/decrypt_layout.xml index e81f288b..300e1d49 100644 --- a/app/src/main/res/layout/decrypt_layout.xml +++ b/app/src/main/res/layout/decrypt_layout.xml @@ -9,13 +9,14 @@ <LinearLayout android:layout_width="fill_parent" - android:layout_height="fill_parent" + android:layout_height="wrap_content" android:orientation="vertical"> - <GridLayout + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@drawable/rectangle"> + android:background="@drawable/rectangle" + android:orientation="vertical"> <TextView android:layout_width="wrap_content" @@ -24,10 +25,7 @@ android:text="CATEGORY HERE" android:id="@+id/crypto_password_category" android:layout_gravity="center_vertical" - android:layout_marginLeft="8dp" - android:layout_column="0" - android:layout_row="0" - android:layout_columnSpan="2"/> + android:layout_marginLeft="@dimen/activity_horizontal_margin"/> <TextView android:layout_width="wrap_content" @@ -38,38 +36,8 @@ android:text="PASSWORD FILE NAME HERE" android:id="@+id/crypto_password_file" android:layout_gravity="center_vertical" - android:layout_marginLeft="8dp" - android:layout_column="0" - android:layout_columnSpan="2" - android:layout_row="1"/> - - - <ImageButton - android:id="@+id/crypto_delete_button" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/ico_del" - android:background="@drawable/red_rectangle" - android:layout_gravity="center_vertical" - android:onClick="handleClick" - android:layout_column="3" - android:layout_row="0" - android:layout_rowSpan="2"/> - - <ImageButton - android:id="@+id/crypto_show_button" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/ico_key" - android:background="@drawable/blue_rectangle" - android:layout_gravity="center_vertical" - android:layout_marginLeft="8dp" - android:onClick="handleClick" - android:layout_column="4" - android:layout_row="0" - android:layout_rowSpan="2"/> - - </GridLayout> + android:layout_marginLeft="@dimen/activity_horizontal_margin"/> + </LinearLayout> <LinearLayout android:id="@+id/crypto_container" diff --git a/app/src/main/res/layout/fragment_password_list.xml b/app/src/main/res/layout/fragment_password_list.xml index 6ae0c0d8..43a8a91b 100644 --- a/app/src/main/res/layout/fragment_password_list.xml +++ b/app/src/main/res/layout/fragment_password_list.xml @@ -5,12 +5,21 @@ android:layout_height="match_parent" tools:context="com.zeapo.pwdstore.PasswordFragment"> - <ExpandableListView + <com.fortysevendeg.swipelistview.SwipeListView + xmlns:swipe="http://schemas.android.com/apk/res-auto" android:id="@+id/pass_list" - android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_width="fill_parent" + android:layout_height="wrap_content" android:dividerHeight="@dimen/activity_vertical_margin" android:divider="@android:color/transparent" - android:groupIndicator="@android:drawable/screen_background_light_transparent"/> - + swipe:swipeFrontView="@+id/front" + swipe:swipeBackView="@+id/back" + swipe:swipeActionLeft="reveal" + swipe:swipeActionRight="reveal" + swipe:swipeMode="both" + swipe:swipeCloseAllItemsWhenMoveList="true" + swipe:swipeOpenOnLongPress="true" + swipe:swipeAnimationTime="200" + android:listSelector="#00000000"/> </FrameLayout> + diff --git a/app/src/main/res/layout/password_row_layout.xml b/app/src/main/res/layout/password_row_layout.xml index f8d656fd..641f4f85 100644 --- a/app/src/main/res/layout/password_row_layout.xml +++ b/app/src/main/res/layout/password_row_layout.xml @@ -1,25 +1,71 @@ <?xml version="1.0" encoding="utf-8"?> -<GridLayout 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" - android:orientation="horizontal"> - <TextView - android:id="@+id/type" - android:text="TYPE" - android:layout_column="0" - android:layout_width="wrap_content" +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + + <GridLayout + android:id="@+id/back" + android:orientation="horizontal" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="8dp" - android:textStyle="bold" - android:layout_gravity="center_vertical" - /> - <TextView - android:id="@+id/label" - android:text="FILE_NAME" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:padding="8dp"/> -</GridLayout> + android:tag="back" + android:background="@drawable/gray_rectangle" + android:layout_gravity="left|center_vertical"> + + <TextView + android:id="@+id/label_back" + android:text="FILE_NAME" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:padding="8dp" + android:layout_column="0"/> + + <ImageButton + android:id="@+id/crypto_delete_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ico_del" + android:background="@drawable/red_rectangle" + android:layout_gravity="center_vertical" + android:layout_column="2"/> + + <ImageButton + android:id="@+id/crypto_show_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ico_key" + android:background="@drawable/blue_rectangle" + android:layout_gravity="center_vertical" + android:layout_marginLeft="8dp" + android:layout_column="3"/> + </GridLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="fill_parent" + android:id="@+id/front" + android:tag="front" + android:background="@android:color/white" + android:layout_gravity="left|center_vertical"> + + <TextView + android:id="@+id/type" + android:text="TYPE" + android:layout_column="0" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="8dp" + android:textStyle="bold" + android:layout_gravity="center_vertical" + /> + <TextView + android:id="@+id/label" + android:text="FILE_NAME" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:padding="8dp"/> + </LinearLayout> +</FrameLayout> |