From bb161d5fa9d56c5fc7369c979d6fd4eeff187987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Thu, 9 Jan 2014 22:58:52 +0100 Subject: implement navigation drawer --- OpenPGP-Keychain/AndroidManifest.xml | 11 +- .../drawable-hdpi/dashboard_decrypt_default.png | Bin 4996 -> 0 bytes .../drawable-hdpi/dashboard_decrypt_pressed.png | Bin 5032 -> 0 bytes .../drawable-hdpi/dashboard_encrypt_default.png | Bin 4926 -> 0 bytes .../drawable-hdpi/dashboard_encrypt_pressed.png | Bin 4967 -> 0 bytes .../res/drawable-hdpi/dashboard_help_default.png | Bin 8607 -> 0 bytes .../res/drawable-hdpi/dashboard_help_pressed.png | Bin 8343 -> 0 bytes .../res/drawable-hdpi/dashboard_import_default.png | Bin 5195 -> 0 bytes .../res/drawable-hdpi/dashboard_import_pressed.png | Bin 4973 -> 0 bytes .../dashboard_manage_keys_default.png | Bin 7306 -> 0 bytes .../dashboard_manage_keys_pressed.png | Bin 7147 -> 0 bytes .../drawable-hdpi/dashboard_my_keys_default.png | Bin 5438 -> 0 bytes .../drawable-hdpi/dashboard_my_keys_pressed.png | Bin 5414 -> 0 bytes .../res/drawable/dashboard_decrypt.xml | 28 -- .../res/drawable/dashboard_encrypt.xml | 28 -- OpenPGP-Keychain/res/drawable/dashboard_help.xml | 28 -- OpenPGP-Keychain/res/drawable/dashboard_import.xml | 28 -- .../res/drawable/dashboard_manage_keys.xml | 28 -- .../res/drawable/dashboard_my_keys.xml | 28 -- .../res/layout/api_apps_list_activity.xml | 22 +- OpenPGP-Keychain/res/layout/decrypt.xml | 270 ++++++------ OpenPGP-Keychain/res/layout/drawer_list.xml | 18 + OpenPGP-Keychain/res/layout/drawer_list_item.xml | 50 ++- OpenPGP-Keychain/res/layout/encrypt.xml | 480 ++++++++++----------- OpenPGP-Keychain/res/layout/help_activity.xml | 27 +- OpenPGP-Keychain/res/layout/import_keys.xml | 104 ++--- .../res/layout/key_list_public_activity.xml | 20 +- .../res/layout/key_list_secret_activity.xml | 24 +- OpenPGP-Keychain/res/layout/main.xml | 70 --- OpenPGP-Keychain/res/values/strings.xml | 19 +- .../service/remote/RegisteredAppsListActivity.java | 31 +- .../keychain/ui/DecryptActivity.java | 27 +- .../keychain/ui/DrawerActivity.java | 224 +++++----- .../keychain/ui/EncryptActivity.java | 34 +- .../keychain/ui/EncryptDecryptActivity.java | 175 -------- .../keychain/ui/HelpActivity.java | 44 +- .../keychain/ui/ImportKeysActivity.java | 29 +- .../keychain/ui/KeyActivity.java | 4 +- .../keychain/ui/KeyListPublicActivity.java | 4 +- .../keychain/ui/KeyListSecretActivity.java | 15 +- .../keychain/ui/MainActivity.java | 109 ----- .../keychain/ui/PreferencesActivity.java | 26 +- .../keychain/ui/SelectSecretKeyActivity.java | 17 - .../keychain/ui/widget/DashboardLayout.java | 186 -------- 44 files changed, 713 insertions(+), 1495 deletions(-) delete mode 100644 OpenPGP-Keychain/res/drawable-hdpi/dashboard_decrypt_default.png delete mode 100644 OpenPGP-Keychain/res/drawable-hdpi/dashboard_decrypt_pressed.png delete mode 100644 OpenPGP-Keychain/res/drawable-hdpi/dashboard_encrypt_default.png delete mode 100644 OpenPGP-Keychain/res/drawable-hdpi/dashboard_encrypt_pressed.png delete mode 100644 OpenPGP-Keychain/res/drawable-hdpi/dashboard_help_default.png delete mode 100644 OpenPGP-Keychain/res/drawable-hdpi/dashboard_help_pressed.png delete mode 100644 OpenPGP-Keychain/res/drawable-hdpi/dashboard_import_default.png delete mode 100644 OpenPGP-Keychain/res/drawable-hdpi/dashboard_import_pressed.png delete mode 100644 OpenPGP-Keychain/res/drawable-hdpi/dashboard_manage_keys_default.png delete mode 100644 OpenPGP-Keychain/res/drawable-hdpi/dashboard_manage_keys_pressed.png delete mode 100644 OpenPGP-Keychain/res/drawable-hdpi/dashboard_my_keys_default.png delete mode 100644 OpenPGP-Keychain/res/drawable-hdpi/dashboard_my_keys_pressed.png delete mode 100644 OpenPGP-Keychain/res/drawable/dashboard_decrypt.xml delete mode 100644 OpenPGP-Keychain/res/drawable/dashboard_encrypt.xml delete mode 100644 OpenPGP-Keychain/res/drawable/dashboard_help.xml delete mode 100644 OpenPGP-Keychain/res/drawable/dashboard_import.xml delete mode 100644 OpenPGP-Keychain/res/drawable/dashboard_manage_keys.xml delete mode 100644 OpenPGP-Keychain/res/drawable/dashboard_my_keys.xml create mode 100644 OpenPGP-Keychain/res/layout/drawer_list.xml delete mode 100644 OpenPGP-Keychain/res/layout/main.xml delete mode 100644 OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptDecryptActivity.java delete mode 100644 OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/MainActivity.java delete mode 100644 OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/DashboardLayout.java diff --git a/OpenPGP-Keychain/AndroidManifest.xml b/OpenPGP-Keychain/AndroidManifest.xml index fd7edff2a..dcd496789 100644 --- a/OpenPGP-Keychain/AndroidManifest.xml +++ b/OpenPGP-Keychain/AndroidManifest.xml @@ -75,20 +75,15 @@ android:label="@string/app_name" android:theme="@style/Theme.Sherlock.Light" > + android:label="@string/app_name" + android:launchMode="singleTop" > - - diff --git a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_decrypt_default.png b/OpenPGP-Keychain/res/drawable-hdpi/dashboard_decrypt_default.png deleted file mode 100644 index 0d51bcb68..000000000 Binary files a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_decrypt_default.png and /dev/null differ diff --git a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_decrypt_pressed.png b/OpenPGP-Keychain/res/drawable-hdpi/dashboard_decrypt_pressed.png deleted file mode 100644 index d4cc0f8ea..000000000 Binary files a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_decrypt_pressed.png and /dev/null differ diff --git a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_encrypt_default.png b/OpenPGP-Keychain/res/drawable-hdpi/dashboard_encrypt_default.png deleted file mode 100644 index 07617bb9d..000000000 Binary files a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_encrypt_default.png and /dev/null differ diff --git a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_encrypt_pressed.png b/OpenPGP-Keychain/res/drawable-hdpi/dashboard_encrypt_pressed.png deleted file mode 100644 index b8fe6e1d6..000000000 Binary files a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_encrypt_pressed.png and /dev/null differ diff --git a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_help_default.png b/OpenPGP-Keychain/res/drawable-hdpi/dashboard_help_default.png deleted file mode 100644 index 233fddffc..000000000 Binary files a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_help_default.png and /dev/null differ diff --git a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_help_pressed.png b/OpenPGP-Keychain/res/drawable-hdpi/dashboard_help_pressed.png deleted file mode 100644 index dad8694f8..000000000 Binary files a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_help_pressed.png and /dev/null differ diff --git a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_import_default.png b/OpenPGP-Keychain/res/drawable-hdpi/dashboard_import_default.png deleted file mode 100644 index 7be4837a0..000000000 Binary files a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_import_default.png and /dev/null differ diff --git a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_import_pressed.png b/OpenPGP-Keychain/res/drawable-hdpi/dashboard_import_pressed.png deleted file mode 100644 index a4fe3c903..000000000 Binary files a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_import_pressed.png and /dev/null differ diff --git a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_manage_keys_default.png b/OpenPGP-Keychain/res/drawable-hdpi/dashboard_manage_keys_default.png deleted file mode 100644 index de83398c2..000000000 Binary files a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_manage_keys_default.png and /dev/null differ diff --git a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_manage_keys_pressed.png b/OpenPGP-Keychain/res/drawable-hdpi/dashboard_manage_keys_pressed.png deleted file mode 100644 index a86bc1bf9..000000000 Binary files a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_manage_keys_pressed.png and /dev/null differ diff --git a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_my_keys_default.png b/OpenPGP-Keychain/res/drawable-hdpi/dashboard_my_keys_default.png deleted file mode 100644 index f8b54961e..000000000 Binary files a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_my_keys_default.png and /dev/null differ diff --git a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_my_keys_pressed.png b/OpenPGP-Keychain/res/drawable-hdpi/dashboard_my_keys_pressed.png deleted file mode 100644 index 6a5c92138..000000000 Binary files a/OpenPGP-Keychain/res/drawable-hdpi/dashboard_my_keys_pressed.png and /dev/null differ diff --git a/OpenPGP-Keychain/res/drawable/dashboard_decrypt.xml b/OpenPGP-Keychain/res/drawable/dashboard_decrypt.xml deleted file mode 100644 index 981e38a0b..000000000 --- a/OpenPGP-Keychain/res/drawable/dashboard_decrypt.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - diff --git a/OpenPGP-Keychain/res/drawable/dashboard_encrypt.xml b/OpenPGP-Keychain/res/drawable/dashboard_encrypt.xml deleted file mode 100644 index af812dc51..000000000 --- a/OpenPGP-Keychain/res/drawable/dashboard_encrypt.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - diff --git a/OpenPGP-Keychain/res/drawable/dashboard_help.xml b/OpenPGP-Keychain/res/drawable/dashboard_help.xml deleted file mode 100644 index e121ea0d1..000000000 --- a/OpenPGP-Keychain/res/drawable/dashboard_help.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - diff --git a/OpenPGP-Keychain/res/drawable/dashboard_import.xml b/OpenPGP-Keychain/res/drawable/dashboard_import.xml deleted file mode 100644 index e5857dc6c..000000000 --- a/OpenPGP-Keychain/res/drawable/dashboard_import.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - diff --git a/OpenPGP-Keychain/res/drawable/dashboard_manage_keys.xml b/OpenPGP-Keychain/res/drawable/dashboard_manage_keys.xml deleted file mode 100644 index ebc519253..000000000 --- a/OpenPGP-Keychain/res/drawable/dashboard_manage_keys.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - diff --git a/OpenPGP-Keychain/res/drawable/dashboard_my_keys.xml b/OpenPGP-Keychain/res/drawable/dashboard_my_keys.xml deleted file mode 100644 index d4045db45..000000000 --- a/OpenPGP-Keychain/res/drawable/dashboard_my_keys.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - diff --git a/OpenPGP-Keychain/res/layout/api_apps_list_activity.xml b/OpenPGP-Keychain/res/layout/api_apps_list_activity.xml index 11f663f7f..71fbcfb12 100644 --- a/OpenPGP-Keychain/res/layout/api_apps_list_activity.xml +++ b/OpenPGP-Keychain/res/layout/api_apps_list_activity.xml @@ -1,12 +1,20 @@ - + android:layout_height="match_parent" > - + android:layout_height="match_parent" > - \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/OpenPGP-Keychain/res/layout/decrypt.xml b/OpenPGP-Keychain/res/layout/decrypt.xml index c52d873f1..9d9e1a1e8 100644 --- a/OpenPGP-Keychain/res/layout/decrypt.xml +++ b/OpenPGP-Keychain/res/layout/decrypt.xml @@ -1,185 +1,177 @@ - - - + android:layout_height="match_parent" > - + android:fillViewport="true" + android:orientation="vertical" > - + android:layout_height="match_parent" + android:fillViewport="true" > - + - + android:layout_height="wrap_content" > - + + + + + - + android:orientation="vertical" + android:paddingLeft="5dip" > + + + + + + + android:orientation="horizontal" > - + android:src="@drawable/ic_previous" /> + + - - - - - - - - - - - - - - - - - + android:src="@drawable/ic_next" /> - + android:layout_height="0dip" + android:layout_weight="1" > + android:layout_height="match_parent" + android:orientation="vertical" + android:padding="4dp" > - - + android:id="@+id/message" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="top" + android:inputType="text|textCapSentences|textMultiLine|textLongMessage" + android:scrollHorizontally="true" /> + android:layout_height="match_parent" + android:orientation="vertical" + android:padding="4dp" > - + android:orientation="horizontal" > + + + + + + + + + + - - - - + + + + + + - \ No newline at end of file + \ No newline at end of file diff --git a/OpenPGP-Keychain/res/layout/drawer_list.xml b/OpenPGP-Keychain/res/layout/drawer_list.xml new file mode 100644 index 000000000..18210afc5 --- /dev/null +++ b/OpenPGP-Keychain/res/layout/drawer_list.xml @@ -0,0 +1,18 @@ + + + diff --git a/OpenPGP-Keychain/res/layout/drawer_list_item.xml b/OpenPGP-Keychain/res/layout/drawer_list_item.xml index d8e39399c..0d4b9537e 100644 --- a/OpenPGP-Keychain/res/layout/drawer_list_item.xml +++ b/OpenPGP-Keychain/res/layout/drawer_list_item.xml @@ -1,28 +1,31 @@ - + - - + android:minHeight="?android:attr/listPreferredItemHeightSmall"/> +--> diff --git a/OpenPGP-Keychain/res/layout/encrypt.xml b/OpenPGP-Keychain/res/layout/encrypt.xml index 1fb3bc589..41b01c7c3 100644 --- a/OpenPGP-Keychain/res/layout/encrypt.xml +++ b/OpenPGP-Keychain/res/layout/encrypt.xml @@ -1,315 +1,307 @@ - - - + android:layout_height="match_parent" > - + android:layout_height="match_parent" + android:fillViewport="true" > - - - - - - - - - + android:orientation="vertical" + android:paddingLeft="10dp" + android:paddingRight="10dp" > + + + + + + + + + + android:orientation="vertical" + android:padding="4dp" > - + android:orientation="horizontal" > + + + + + + + + + + + android:orientation="horizontal" + android:paddingBottom="3dip" > - + android:layout_gravity="center_vertical" + android:layout_margin="4dp" + android:text="@string/btn_select_encrypt_keys" + bootstrapbutton:bb_icon_left="fa-users" + bootstrapbutton:bb_size="default" + bootstrapbutton:bb_type="default" /> - + android:padding="4dp" + android:stretchColumns="1" > - - - - - - - - - - - - - - - - + - + - - - - + + - + - - - - - - + - + + + + - + + + android:layout_weight="1" + android:gravity="center_horizontal|center_vertical" + android:text="@string/label_message" + android:textAppearance="?android:attr/textAppearanceMedium" /> + + - + android:layout_height="0dip" + android:layout_weight="1" > + android:layout_height="match_parent" + android:orientation="vertical" + android:padding="4dp" > - - + android:id="@+id/message" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="top" + android:inputType="text|textCapSentences|textMultiLine|textLongMessage" /> + android:layout_height="match_parent" + android:orientation="vertical" + android:padding="4dp" > - - - + + + + + + + - + android:orientation="horizontal" > - + - + + + - + android:orientation="horizontal" > - + + - + android:orientation="horizontal" > + + + - - - + + + + + - \ No newline at end of file + \ No newline at end of file diff --git a/OpenPGP-Keychain/res/layout/help_activity.xml b/OpenPGP-Keychain/res/layout/help_activity.xml index 89aac6476..77c62e03f 100644 --- a/OpenPGP-Keychain/res/layout/help_activity.xml +++ b/OpenPGP-Keychain/res/layout/help_activity.xml @@ -1,13 +1,20 @@ - - - + + + android:layout_height="match_parent" + android:orientation="vertical" > + + + + + - \ No newline at end of file + \ No newline at end of file diff --git a/OpenPGP-Keychain/res/layout/import_keys.xml b/OpenPGP-Keychain/res/layout/import_keys.xml index 1b40bad58..c2217d2ec 100644 --- a/OpenPGP-Keychain/res/layout/import_keys.xml +++ b/OpenPGP-Keychain/res/layout/import_keys.xml @@ -1,55 +1,63 @@ - + android:id="@+id/drawer_layout" + android:layout_width="match_parent" + android:layout_height="match_parent" > - - - + android:layout_centerHorizontal="true" > + + - - - + + + + + + + - - - - - \ No newline at end of file + android:layout_height="match_parent" + android:layout_above="@+id/import_footer" + android:layout_alignParentLeft="true" + android:layout_below="@+id/import_navigation_fragment" + android:orientation="vertical" + android:paddingLeft="4dp" + android:paddingRight="4dp" /> + + + + + \ No newline at end of file diff --git a/OpenPGP-Keychain/res/layout/key_list_public_activity.xml b/OpenPGP-Keychain/res/layout/key_list_public_activity.xml index 704b3c8c9..f0e843e56 100644 --- a/OpenPGP-Keychain/res/layout/key_list_public_activity.xml +++ b/OpenPGP-Keychain/res/layout/key_list_public_activity.xml @@ -1,5 +1,4 @@ - - - - + \ No newline at end of file diff --git a/OpenPGP-Keychain/res/layout/key_list_secret_activity.xml b/OpenPGP-Keychain/res/layout/key_list_secret_activity.xml index b8df9faa7..13370f2e5 100644 --- a/OpenPGP-Keychain/res/layout/key_list_secret_activity.xml +++ b/OpenPGP-Keychain/res/layout/key_list_secret_activity.xml @@ -1,14 +1,20 @@ - + android:layout_height="match_parent" > - + android:layout_height="match_parent" > - \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/OpenPGP-Keychain/res/layout/main.xml b/OpenPGP-Keychain/res/layout/main.xml deleted file mode 100644 index 71967271b..000000000 --- a/OpenPGP-Keychain/res/layout/main.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - -