diff options
Diffstat (limited to 'OpenKeychain/src')
36 files changed, 180 insertions, 117 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvActivity.java index 9390e8a69..0654f0c9a 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvActivity.java @@ -76,8 +76,8 @@ public class ViewKeyAdvActivity extends BaseActivity implements mExportHelper = new ExportHelper(this); mProviderHelper = new ProviderHelper(this); - mViewPager = (ViewPager) findViewById(R.id.view_key_pager); - mSlidingTabLayout = (PagerSlidingTabStrip) findViewById(R.id.view_key_sliding_tab_layout); + mViewPager = (ViewPager) findViewById(R.id.pager); + mSlidingTabLayout = (PagerSlidingTabStrip) findViewById(R.id.sliding_tab_layout); int switchToTab = TAB_MAIN; Intent intent = getIntent(); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ContactHelper.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ContactHelper.java index c66dc04d0..08c7c02fb 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ContactHelper.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ContactHelper.java @@ -43,9 +43,11 @@ import java.io.InputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; +import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.regex.Matcher; public class ContactHelper { @@ -54,6 +56,17 @@ public class ContactHelper { public static List<String> getPossibleUserEmails(Context context) { Set<String> accountMails = getAccountEmails(context); accountMails.addAll(getMainProfileContactEmails(context)); + + // remove items that are not an email + Iterator<String> it = accountMails.iterator(); + while (it.hasNext()) { + String email = it.next(); + Matcher emailMatcher = Patterns.EMAIL_ADDRESS.matcher(email); + if (!emailMatcher.matches()) { + it.remove(); + } + } + // now return the Set (without duplicates) as a List return new ArrayList<>(accountMails); } @@ -62,6 +75,17 @@ public class ContactHelper { Set<String> accountMails = getAccountEmails(context); Set<String> names = getContactNamesFromEmails(context, accountMails); names.addAll(getMainProfileContactName(context)); + + // remove items that are an email + Iterator<String> it = names.iterator(); + while (it.hasNext()) { + String email = it.next(); + Matcher emailMatcher = Patterns.EMAIL_ADDRESS.matcher(email); + if (emailMatcher.matches()) { + it.remove(); + } + } + return new ArrayList<>(names); } @@ -75,9 +99,7 @@ public class ContactHelper { final Account[] accounts = AccountManager.get(context).getAccounts(); final Set<String> emailSet = new HashSet<>(); for (Account account : accounts) { - if (Patterns.EMAIL_ADDRESS.matcher(account.name).matches()) { - emailSet.add(account.name); - } + emailSet.add(account.name); } return emailSet; } @@ -256,7 +278,7 @@ public class ContactHelper { } public static Bitmap loadPhotoByMasterKeyId(ContentResolver contentResolver, long masterKeyId, - boolean highRes) { + boolean highRes) { if (masterKeyId == -1) { return null; } diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_action_encrypt_copy_24dp.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_encrypt_copy_24dp.png Binary files differnew file mode 100644 index 000000000..f079dce18 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_encrypt_copy_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_action_encrypt_save_24dp.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_encrypt_save_24dp.png Binary files differnew file mode 100644 index 000000000..102a54006 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_encrypt_save_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_action_encrypt_share_24dp.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_encrypt_share_24dp.png Binary files differnew file mode 100644 index 000000000..1060be81b --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_encrypt_share_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_comment_text_grey600_24dp.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_comment_text_grey600_24dp.png Binary files differnew file mode 100644 index 000000000..c48a3b463 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-hdpi/ic_comment_text_grey600_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_action_encrypt_copy_24dp.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_encrypt_copy_24dp.png Binary files differnew file mode 100644 index 000000000..0759d63cd --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_encrypt_copy_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_action_encrypt_save_24dp.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_encrypt_save_24dp.png Binary files differnew file mode 100644 index 000000000..a72a7775a --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_encrypt_save_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_action_encrypt_share_24dp.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_encrypt_share_24dp.png Binary files differnew file mode 100644 index 000000000..9497d6445 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_encrypt_share_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_comment_text_grey600_24dp.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_comment_text_grey600_24dp.png Binary files differnew file mode 100644 index 000000000..d50c008c7 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-mdpi/ic_comment_text_grey600_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_encrypt_copy_24dp.png b/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_encrypt_copy_24dp.png Binary files differnew file mode 100644 index 000000000..ed110c7b2 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_encrypt_copy_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_encrypt_save_24dp.png b/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_encrypt_save_24dp.png Binary files differnew file mode 100644 index 000000000..ee0c3aa1b --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_encrypt_save_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_encrypt_share_24dp.png b/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_encrypt_share_24dp.png Binary files differnew file mode 100644 index 000000000..e9872e275 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_encrypt_share_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/ic_comment_text_grey600_24dp.png b/OpenKeychain/src/main/res/drawable-xhdpi/ic_comment_text_grey600_24dp.png Binary files differnew file mode 100644 index 000000000..0e14a9500 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xhdpi/ic_comment_text_grey600_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_encrypt_copy_24dp.png b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_encrypt_copy_24dp.png Binary files differnew file mode 100644 index 000000000..438b2a9e6 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_encrypt_copy_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_encrypt_save_24dp.png b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_encrypt_save_24dp.png Binary files differnew file mode 100644 index 000000000..24e3da727 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_encrypt_save_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_encrypt_share_24dp.png b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_encrypt_share_24dp.png Binary files differnew file mode 100644 index 000000000..7c0309114 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_encrypt_share_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/ic_comment_text_grey600_24dp.png b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_comment_text_grey600_24dp.png Binary files differnew file mode 100644 index 000000000..de5de6042 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_comment_text_grey600_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-xxxhdpi/ic_action_encrypt_copy_24dp.png b/OpenKeychain/src/main/res/drawable-xxxhdpi/ic_action_encrypt_copy_24dp.png Binary files differnew file mode 100644 index 000000000..560648d52 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xxxhdpi/ic_action_encrypt_copy_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-xxxhdpi/ic_action_encrypt_save_24dp.png b/OpenKeychain/src/main/res/drawable-xxxhdpi/ic_action_encrypt_save_24dp.png Binary files differnew file mode 100644 index 000000000..c4e7e8a6d --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xxxhdpi/ic_action_encrypt_save_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-xxxhdpi/ic_action_encrypt_share_24dp.png b/OpenKeychain/src/main/res/drawable-xxxhdpi/ic_action_encrypt_share_24dp.png Binary files differnew file mode 100644 index 000000000..f93079dfc --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xxxhdpi/ic_action_encrypt_share_24dp.png diff --git a/OpenKeychain/src/main/res/drawable-xxxhdpi/ic_comment_text_grey600_24dp.png b/OpenKeychain/src/main/res/drawable-xxxhdpi/ic_comment_text_grey600_24dp.png Binary files differnew file mode 100644 index 000000000..9dae1a4a0 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xxxhdpi/ic_comment_text_grey600_24dp.png diff --git a/OpenKeychain/src/main/res/layout/encrypt_decrypt_overview_fragment.xml b/OpenKeychain/src/main/res/layout/encrypt_decrypt_overview_fragment.xml index 3ef8e3551..bd640d9af 100644 --- a/OpenKeychain/src/main/res/layout/encrypt_decrypt_overview_fragment.xml +++ b/OpenKeychain/src/main/res/layout/encrypt_decrypt_overview_fragment.xml @@ -45,7 +45,7 @@ android:clickable="true" style="?android:attr/borderlessButtonStyle" android:text="@string/btn_encrypt_text" - android:drawableRight="@drawable/ic_content_copy_grey_24dp" + android:drawableRight="@drawable/ic_comment_text_grey600_24dp" android:drawablePadding="8dp" android:gravity="center_vertical" /> diff --git a/OpenKeychain/src/main/res/layout/encrypt_files_activity.xml b/OpenKeychain/src/main/res/layout/encrypt_files_activity.xml index f9efd81b4..ce8b1302c 100644 --- a/OpenKeychain/src/main/res/layout/encrypt_files_activity.xml +++ b/OpenKeychain/src/main/res/layout/encrypt_files_activity.xml @@ -5,7 +5,7 @@ <include android:id="@+id/toolbar_include" - layout="@layout/toolbar_standalone" /> + layout="@layout/toolbar_standalone_white" /> <!-- fitsSystemWindows and layout_marginTop from diff --git a/OpenKeychain/src/main/res/layout/encrypt_text_activity.xml b/OpenKeychain/src/main/res/layout/encrypt_text_activity.xml index 67f17fa81..809e64f02 100644 --- a/OpenKeychain/src/main/res/layout/encrypt_text_activity.xml +++ b/OpenKeychain/src/main/res/layout/encrypt_text_activity.xml @@ -5,7 +5,7 @@ <include android:id="@+id/toolbar_include" - layout="@layout/toolbar_standalone" /> + layout="@layout/toolbar_standalone_white" /> <!-- fitsSystemWindows and layout_marginTop from diff --git a/OpenKeychain/src/main/res/layout/help_activity.xml b/OpenKeychain/src/main/res/layout/help_activity.xml index 1722f03ea..0b309a8b1 100644 --- a/OpenKeychain/src/main/res/layout/help_activity.xml +++ b/OpenKeychain/src/main/res/layout/help_activity.xml @@ -1,33 +1,16 @@ <?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:orientation="vertical"> <include - android:id="@+id/toolbar_include" - layout="@layout/toolbar_standalone" /> + android:id="@+id/toolbar_tabs" + layout="@layout/toolbar_tabs" /> - <LinearLayout - android:layout_below="@id/toolbar_include" + <android.support.v4.view.ViewPager + android:id="@+id/pager" android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical" - android:elevation="4dp"> + android:layout_height="match_parent" /> - <com.astuetz.PagerSlidingTabStrip - android:id="@+id/sliding_tab_layout" - android:layout_width="match_parent" - android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary" - android:textColor="@color/tab_text" - app:pstsTextColorSelected="@color/tab_text_selected" - app:pstsIndicatorColor="@color/tab_indicator" /> - - <android.support.v4.view.ViewPager - android:id="@+id/pager" - android:layout_width="match_parent" - android:layout_height="match_parent" /> - - </LinearLayout> -</RelativeLayout>
\ No newline at end of file +</LinearLayout>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/layout/toolbar_inner_layout.xml b/OpenKeychain/src/main/res/layout/toolbar_inner_layout.xml new file mode 100644 index 000000000..047225394 --- /dev/null +++ b/OpenKeychain/src/main/res/layout/toolbar_inner_layout.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<merge xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools"> + + <!-- + We always have windowTranslucentStatus=true to get under the status bar. + Thus this ImageView is the part under the status bar! + --> + <ImageView + android:id="@+id/status_bar" + android:layout_width="match_parent" + android:layout_height="@dimen/statusbar_height" + android:background="@color/transparent" /> + + <android.support.v7.widget.Toolbar + android:id="@+id/toolbar" + android:layout_below="@+id/status_bar" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?attr/actionBarSize" + android:background="@color/transparent" + app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" + app:popupTheme="@style/ThemeOverlay.AppCompat.Light" + tools:ignore="UnusedAttribute" /> +</merge>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/layout/toolbar_inner_layout_white.xml b/OpenKeychain/src/main/res/layout/toolbar_inner_layout_white.xml new file mode 100644 index 000000000..a626efb09 --- /dev/null +++ b/OpenKeychain/src/main/res/layout/toolbar_inner_layout_white.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<merge xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools"> + + <!-- + We always have windowTranslucentStatus=true to get under the status bar. + Thus this ImageView is the part under the status bar! + --> + <ImageView + android:id="@+id/status_bar" + android:layout_width="match_parent" + android:layout_height="@dimen/statusbar_height" + android:background="@color/transparent" /> + + <android.support.v7.widget.Toolbar + android:id="@+id/toolbar" + android:layout_below="@+id/status_bar" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?attr/actionBarSize" + android:background="@color/transparent" + app:theme="@style/ThemeOverlay.AppCompat.ActionBar" + app:popupTheme="@style/ThemeOverlay.AppCompat.Light" + tools:ignore="UnusedAttribute" /> +</merge>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/layout/toolbar_standalone.xml b/OpenKeychain/src/main/res/layout/toolbar_standalone.xml index 950c2f2ae..4ab94060c 100644 --- a/OpenKeychain/src/main/res/layout/toolbar_standalone.xml +++ b/OpenKeychain/src/main/res/layout/toolbar_standalone.xml @@ -1,31 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" - xmlns:tools="http://schemas.android.com/tools" android:id="@+id/toolbar_include" android:elevation="4dp" + android:background="?attr/colorPrimary" android:layout_width="match_parent" android:layout_height="wrap_content"> - <!-- - We always have windowTranslucentStatus=true to get under the status bar. - Thus this ImageView is the part under the status bar! - --> - <ImageView - android:id="@+id/status_bar" - android:layout_width="match_parent" - android:layout_height="@dimen/statusbar_height" - android:background="?attr/colorPrimary" /> - - <android.support.v7.widget.Toolbar - android:id="@+id/toolbar" - android:layout_below="@+id/status_bar" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:minHeight="?attr/actionBarSize" - android:background="?attr/colorPrimary" - app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" - app:popupTheme="@style/ThemeOverlay.AppCompat.Light" - tools:ignore="UnusedAttribute" /> + <include + android:id="@+id/toolbar_inner_layout" + layout="@layout/toolbar_inner_layout" /> </RelativeLayout> diff --git a/OpenKeychain/src/main/res/layout/toolbar_standalone_orange.xml b/OpenKeychain/src/main/res/layout/toolbar_standalone_orange.xml index 0336b51fd..b8c190a36 100644 --- a/OpenKeychain/src/main/res/layout/toolbar_standalone_orange.xml +++ b/OpenKeychain/src/main/res/layout/toolbar_standalone_orange.xml @@ -1,31 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" - xmlns:tools="http://schemas.android.com/tools" android:id="@+id/toolbar_include" android:elevation="4dp" + android:background="@color/android_orange_light" android:layout_width="match_parent" android:layout_height="wrap_content"> - <!-- - We always have windowTranslucentStatus=true to get under the status bar. - Thus this ImageView is the part under the status bar! - --> - <ImageView - android:id="@+id/status_bar" - android:layout_width="match_parent" - android:layout_height="@dimen/statusbar_height" - android:background="@color/android_orange_light" /> - - <android.support.v7.widget.Toolbar - android:id="@+id/toolbar" - android:layout_below="@+id/status_bar" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:minHeight="?attr/actionBarSize" - android:background="@color/android_orange_light" - app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" - app:popupTheme="@style/ThemeOverlay.AppCompat.Light" - tools:ignore="UnusedAttribute" /> + <include + android:id="@+id/toolbar_inner_layout" + layout="@layout/toolbar_inner_layout" /> </RelativeLayout> diff --git a/OpenKeychain/src/main/res/layout/toolbar_standalone_white.xml b/OpenKeychain/src/main/res/layout/toolbar_standalone_white.xml new file mode 100644 index 000000000..d4269c2ba --- /dev/null +++ b/OpenKeychain/src/main/res/layout/toolbar_standalone_white.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/toolbar_include" + android:elevation="4dp" + android:background="@color/white" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <include + android:id="@+id/toolbar_inner_layout" + layout="@layout/toolbar_inner_layout_white" /> + +</RelativeLayout> diff --git a/OpenKeychain/src/main/res/layout/toolbar_tabs.xml b/OpenKeychain/src/main/res/layout/toolbar_tabs.xml new file mode 100644 index 000000000..91efda682 --- /dev/null +++ b/OpenKeychain/src/main/res/layout/toolbar_tabs.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/toolbar_include" + android:elevation="4dp" + android:background="?attr/colorPrimary" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <include + android:id="@+id/toolbar_inner_layout" + layout="@layout/toolbar_inner_layout" /> + + <com.astuetz.PagerSlidingTabStrip + android:id="@+id/sliding_tab_layout" + android:layout_below="@id/toolbar" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + android:background="?attr/colorPrimary" + android:textColor="@color/tab_text" + app:pstsTextColorSelected="@color/tab_text_selected" + app:pstsIndicatorColor="@color/tab_indicator" /> + +</RelativeLayout> diff --git a/OpenKeychain/src/main/res/layout/view_key_adv_activity.xml b/OpenKeychain/src/main/res/layout/view_key_adv_activity.xml index 59888c25a..0b309a8b1 100644 --- a/OpenKeychain/src/main/res/layout/view_key_adv_activity.xml +++ b/OpenKeychain/src/main/res/layout/view_key_adv_activity.xml @@ -1,41 +1,16 @@ <?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:orientation="vertical"> <include - android:id="@+id/toolbar_include" - layout="@layout/toolbar_standalone" /> + android:id="@+id/toolbar_tabs" + layout="@layout/toolbar_tabs" /> - <LinearLayout - android:layout_below="@id/toolbar_include" + <android.support.v4.view.ViewPager + android:id="@+id/pager" android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical"> + android:layout_height="match_parent" /> - <View - android:layout_width="match_parent" - android:layout_height="1dip" - android:background="?android:attr/listDivider" - android:visibility="gone" - android:id="@+id/view_key_status_divider" /> - - <com.astuetz.PagerSlidingTabStrip - android:id="@+id/view_key_sliding_tab_layout" - android:layout_width="match_parent" - android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary" - android:textColor="@color/tab_text" - app:pstsTextColorSelected="@color/tab_text_selected" - app:pstsIndicatorColor="@color/tab_indicator" /> - - <android.support.v4.view.ViewPager - android:id="@+id/view_key_pager" - android:layout_width="match_parent" - android:layout_height="0px" - android:layout_weight="1" - android:background="@android:color/white" /> - - </LinearLayout> -</RelativeLayout>
\ No newline at end of file +</LinearLayout>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/menu/encrypt_file_activity.xml b/OpenKeychain/src/main/res/menu/encrypt_file_activity.xml index 9a26d1757..f4aeb76c9 100644 --- a/OpenKeychain/src/main/res/menu/encrypt_file_activity.xml +++ b/OpenKeychain/src/main/res/menu/encrypt_file_activity.xml @@ -1,5 +1,19 @@ <?xml version="1.0" encoding="utf-8"?> -<menu xmlns:android="http://schemas.android.com/apk/res/android"> +<menu xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> + + <item + android:id="@+id/encrypt_save" + android:title="@string/btn_encrypt_save_file" + android:icon="@drawable/ic_action_encrypt_save_24dp" + app:showAsAction="always" /> + + <item + android:id="@+id/encrypt_share" + android:title="@string/btn_encrypt_share_file" + android:icon="@drawable/ic_action_encrypt_share_24dp" + app:showAsAction="always" /> + <item android:id="@+id/check_use_symmetric" android:title="@string/label_symmetric" diff --git a/OpenKeychain/src/main/res/menu/encrypt_text_activity.xml b/OpenKeychain/src/main/res/menu/encrypt_text_activity.xml index 71d254bb9..bb9f4058a 100644 --- a/OpenKeychain/src/main/res/menu/encrypt_text_activity.xml +++ b/OpenKeychain/src/main/res/menu/encrypt_text_activity.xml @@ -1,5 +1,19 @@ <?xml version="1.0" encoding="utf-8"?> -<menu xmlns:android="http://schemas.android.com/apk/res/android"> +<menu xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> + + <item + android:id="@+id/encrypt_copy" + android:title="@string/btn_copy_encrypted_signed" + android:icon="@drawable/ic_action_encrypt_copy_24dp" + app:showAsAction="always" /> + + <item + android:id="@+id/encrypt_share" + android:title="@string/btn_share_encrypted_signed" + android:icon="@drawable/ic_action_encrypt_share_24dp" + app:showAsAction="always" /> + <item android:id="@+id/check_use_symmetric" android:title="@string/label_symmetric" diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml index 051383a36..a53558532 100644 --- a/OpenKeychain/src/main/res/values/strings.xml +++ b/OpenKeychain/src/main/res/values/strings.xml @@ -11,8 +11,8 @@ <!-- title --> <string name="title_select_recipients">"Select Keys"</string> <string name="title_select_secret_key">"Select Your Key"</string> - <string name="title_encrypt_text">"Encrypt Text"</string> - <string name="title_encrypt_files">"Encrypt Files"</string> + <string name="title_encrypt_text">"Encrypt"</string> + <string name="title_encrypt_files">"Encrypt"</string> <string name="title_decrypt">"Decrypt"</string> <string name="title_unlock">"Unlock Key"</string> <string name="title_add_subkey">"Add subkey"</string> @@ -75,6 +75,7 @@ <string name="btn_decrypt_verify_message">"Decrypt and verify message"</string> <string name="btn_encrypt_file">"Encrypt and save file"</string> <string name="btn_encrypt_share_file">"Encrypt and share file"</string> + <string name="btn_encrypt_save_file">"Encrypt and save file"</string> <string name="btn_save">"Save"</string> <string name="btn_do_not_save">"Cancel"</string> <string name="btn_delete">"Delete"</string> @@ -87,6 +88,7 @@ <string name="btn_match">"Fingerprints match"</string> <string name="btn_lookup_key">"Lookup key"</string> <string name="btn_share_encrypted_signed">"Encrypt and share message"</string> + <string name="btn_copy_encrypted_signed">"Encrypt and copy message"</string> <string name="btn_view_cert_key">"View certification key"</string> <string name="btn_create_key">"Create key"</string> <string name="btn_add_files">"Add file(s)"</string> |