diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-03-06 01:12:33 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-03-06 01:12:33 +0100 |
commit | eaf7e5e0051da5a49001283321e8e722ab3b1bae (patch) | |
tree | ad58ec2a5d3c31e911bfb118d5835dc547bb7a47 | |
parent | 0bb3b9c6cc8ef12f0ef19238e0ba5fe0f3df2e40 (diff) | |
download | open-keychain-eaf7e5e0051da5a49001283321e8e722ab3b1bae.tar.gz open-keychain-eaf7e5e0051da5a49001283321e8e722ab3b1bae.tar.bz2 open-keychain-eaf7e5e0051da5a49001283321e8e722ab3b1bae.zip |
Fix elevation
7 files changed, 78 insertions, 106 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/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_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_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 |