diff options
Diffstat (limited to 'main/src/main/res')
-rw-r--r-- | main/src/main/res/drawable/bg_tabs.xml | 9 | ||||
-rw-r--r-- | main/src/main/res/drawable/slidingtab_background.xml | 8 | ||||
-rw-r--r-- | main/src/main/res/layout-v21/tabs.xml | 13 | ||||
-rw-r--r-- | main/src/main/res/layout/allowed_vpn_apps.xml | 2 | ||||
-rw-r--r-- | main/src/main/res/layout/main_activity.xml | 19 | ||||
-rw-r--r-- | main/src/main/res/layout/padersliding_tab.xml | 8 | ||||
-rw-r--r-- | main/src/main/res/layout/tabs.xml | 12 | ||||
-rw-r--r-- | main/src/main/res/values-v21/styles.xml | 5 | ||||
-rw-r--r-- | main/src/main/res/values/attrs.xml | 41 | ||||
-rw-r--r-- | main/src/main/res/values/colours.xml | 3 | ||||
-rw-r--r-- | main/src/main/res/values/styles.xml | 7 |
11 files changed, 118 insertions, 9 deletions
diff --git a/main/src/main/res/drawable/bg_tabs.xml b/main/src/main/res/drawable/bg_tabs.xml new file mode 100644 index 00000000..129a637d --- /dev/null +++ b/main/src/main/res/drawable/bg_tabs.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (c) 2012-2014 Arne Schwabe + ~ Distributed under the GNU GPL v2. For full terms see the file doc/LICENSE.txt + --> + +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="@color/primary" /> +</shape>
\ No newline at end of file diff --git a/main/src/main/res/drawable/slidingtab_background.xml b/main/src/main/res/drawable/slidingtab_background.xml new file mode 100644 index 00000000..885cf036 --- /dev/null +++ b/main/src/main/res/drawable/slidingtab_background.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@android:integer/config_shortAnimTime"> + + <item android:state_pressed="true" android:drawable="@color/background_tab_pressed" /> + <item android:state_focused="true" android:drawable="@color/background_tab_pressed"/> + <item android:drawable="@android:color/transparent"/> + +</selector>
\ No newline at end of file diff --git a/main/src/main/res/layout-v21/tabs.xml b/main/src/main/res/layout-v21/tabs.xml new file mode 100644 index 00000000..095f863e --- /dev/null +++ b/main/src/main/res/layout-v21/tabs.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + ~ Copyright (c) 2012-2014 Arne Schwabe + ~ Distributed under the GNU GPL v2. For full terms see the file doc/LICENSE.txt + --> +<merge> + + <de.blinkt.openvpn.views.PagerSlidingTabStrip xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/sliding_tabs" + android:layout_width="match_parent" + android:layout_height="?android:attr/actionBarSize" + android:background="@drawable/bg_tabs" + android:elevation="4dp" /> +</merge>
\ No newline at end of file diff --git a/main/src/main/res/layout/allowed_vpn_apps.xml b/main/src/main/res/layout/allowed_vpn_apps.xml index c4369885..b3d074e8 100644 --- a/main/src/main/res/layout/allowed_vpn_apps.xml +++ b/main/src/main/res/layout/allowed_vpn_apps.xml @@ -7,6 +7,8 @@ xmlns:tools="http://schemas.android.com/tools" android:background="@color/rot" android:orientation="vertical" + android:layout_marginLeft="-20dp" + android:layout_marginRight="-20dp" android:layout_width="match_parent" android:layout_height="match_parent"> diff --git a/main/src/main/res/layout/main_activity.xml b/main/src/main/res/layout/main_activity.xml new file mode 100644 index 00000000..0b0aa8fe --- /dev/null +++ b/main/src/main/res/layout/main_activity.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + ~ Copyright (c) 2012-2014 Arne Schwabe + ~ Distributed under the GNU GPL v2. For full terms see the file doc/LICENSE.txt + --> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <include layout="@layout/tabs" /> + + <android.support.v4n.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/pager" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + +</LinearLayout> + diff --git a/main/src/main/res/layout/padersliding_tab.xml b/main/src/main/res/layout/padersliding_tab.xml new file mode 100644 index 00000000..80b104b5 --- /dev/null +++ b/main/src/main/res/layout/padersliding_tab.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> + +<TextView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/tab_title" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="center" + android:singleLine="true" />
\ No newline at end of file diff --git a/main/src/main/res/layout/tabs.xml b/main/src/main/res/layout/tabs.xml new file mode 100644 index 00000000..56a24ebe --- /dev/null +++ b/main/src/main/res/layout/tabs.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + ~ Copyright (c) 2012-2014 Arne Schwabe + ~ Distributed under the GNU GPL v2. For full terms see the file doc/LICENSE.txt + --> +<merge> + + <de.blinkt.openvpn.views.SlidingTabLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/sliding_tabs" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> + +</merge>
\ No newline at end of file diff --git a/main/src/main/res/values-v21/styles.xml b/main/src/main/res/values-v21/styles.xml index 754dbc9a..4379dd6d 100644 --- a/main/src/main/res/values-v21/styles.xml +++ b/main/src/main/res/values-v21/styles.xml @@ -5,12 +5,13 @@ --> <resources> + <style name="blinkt.baseTheme" parent="android:Theme.Material.Light.DarkActionBar" /> + <!-- http://www.google.de/design/spec/style/color.html#color-color-palette --> - <style name="appstyle" parent="android:Theme.Material.Light.DarkActionBar"> + <style name="blinkt" parent="blinkt.common"> <item name="android:colorPrimary">@color/primary</item> <item name="android:colorPrimaryDark">@color/primary_dark</item> <item name="android:colorAccent">@color/accent</item> - <item name="android:preferenceStyle">@style/BlinktPreferencePanel</item> </style> </resources> diff --git a/main/src/main/res/values/attrs.xml b/main/src/main/res/values/attrs.xml index 9bc2317c..c2e12f3c 100644 --- a/main/src/main/res/values/attrs.xml +++ b/main/src/main/res/values/attrs.xml @@ -6,10 +6,39 @@ --> <resources> - <declare-styleable name="FileSelectLayout"> - <attr name="title" format="string|reference" /> - <attr name="certificate" format="boolean" /> -<!-- <attr name="taskid" format="integer" /> --> - <attr name="showClear" format="boolean" /> - </declare-styleable> + <declare-styleable name="FileSelectLayout"> + <attr name="title" format="string|reference" /> + <attr name="certificate" format="boolean" /> + <!-- <attr name="taskid" format="integer" /> --> + <attr name="showClear" format="boolean" /> + </declare-styleable> + + <declare-styleable name="PagerSlidingTabStrip"> + <attr name="pstsIndicatorColor" format="color" /> + <attr name="pstsUnderlineColor" format="color" /> + <attr name="pstsDividerColor" format="color" /> + <attr name="pstsDividerWidth" format="dimension" /> + <attr name="pstsIndicatorHeight" format="dimension" /> + <attr name="pstsUnderlineHeight" format="dimension" /> + <attr name="pstsDividerPadding" format="dimension" /> + <attr name="pstsTabPaddingLeftRight" format="dimension" /> + <attr name="pstsScrollOffset" format="dimension" /> + <attr name="pstsTabBackground" format="reference" /> + <attr name="pstsShouldExpand" format="boolean" /> + <attr name="pstsTextAllCaps" format="boolean" /> + <attr name="pstsPaddingMiddle" format="boolean" /> + <attr name="pstsTextStyle"> + <flag name="normal" value="0x0" /> + <flag name="bold" value="0x1" /> + <flag name="italic" value="0x2" /> + </attr> + <attr name="pstsTextSelectedStyle"> + <flag name="normal" value="0x0" /> + <flag name="bold" value="0x1" /> + <flag name="italic" value="0x2" /> + </attr> + <attr name="pstsTextAlpha" format="float" /> + <attr name="pstsTextSelectedAlpha" format="float" /> + </declare-styleable> + </resources> diff --git a/main/src/main/res/values/colours.xml b/main/src/main/res/values/colours.xml index 7e67dacd..3d8ce000 100644 --- a/main/src/main/res/values/colours.xml +++ b/main/src/main/res/values/colours.xml @@ -14,4 +14,7 @@ <color name="gelb">#ffff00</color> <color name="rot">#ff0000</color> + + <color name="background_tab_pressed">#1AFFFFFF</color> + </resources>
\ No newline at end of file diff --git a/main/src/main/res/values/styles.xml b/main/src/main/res/values/styles.xml index cb503aed..94970c88 100644 --- a/main/src/main/res/values/styles.xml +++ b/main/src/main/res/values/styles.xml @@ -5,10 +5,15 @@ --> <resources> - <style name="appstyle" parent="android:Theme.DeviceDefault.Light"> + <style name="blinkt.baseTheme" parent="android:Theme.DeviceDefault.Light" /> + <style name="blinkt.common" parent="blinkt.baseTheme" > + <!-- Shared between Holo and Material --> <item name="android:preferenceStyle">@style/BlinktPreferencePanel</item> + </style> + <style name="blinkt" parent="blinkt.common"> + </style> <!-- No margins or background by default. Not different for x-large screens --> <style name="BlinktPreferencePanel"> |