aboutsummaryrefslogtreecommitdiffstats
path: root/main/res/values
diff options
context:
space:
mode:
authorSammysHP <sven@sammyshp.de>2011-11-30 23:40:07 +0100
committerSammysHP <sven@sammyshp.de>2011-11-30 23:40:07 +0100
commit2ee316f47764cd69a770a0f95de527c923adfeb6 (patch)
treed247375dd09c6e606954dcab051a1157a80619d0 /main/res/values
parentee6f3da6cc73b7c747b435d1a6ea352babd3fd75 (diff)
downloadcgeo-2ee316f47764cd69a770a0f95de527c923adfeb6.zip
cgeo-2ee316f47764cd69a770a0f95de527c923adfeb6.tar.gz
cgeo-2ee316f47764cd69a770a0f95de527c923adfeb6.tar.bz2
New viewpager-indicator
See #847
Diffstat (limited to 'main/res/values')
-rw-r--r--main/res/values/attrs.xml1
-rw-r--r--main/res/values/colors.xml2
-rw-r--r--main/res/values/styles.xml34
-rw-r--r--main/res/values/themes.xml2
-rw-r--r--main/res/values/vpi__attrs.xml56
-rw-r--r--main/res/values/vpi__colors.xml26
-rw-r--r--main/res/values/vpi__defaults.xml31
-rw-r--r--main/res/values/vpi__styles.xml39
8 files changed, 152 insertions, 39 deletions
diff --git a/main/res/values/attrs.xml b/main/res/values/attrs.xml
index e6d7bba..187d4cb 100644
--- a/main/res/values/attrs.xml
+++ b/main/res/values/attrs.xml
@@ -17,7 +17,6 @@
<attr name="background_color_notice" format="color" />
<attr name="background_color_transparent" format="color" />
<attr name="separator_color" format="color" />
- <attr name="text_color_pagerindicator" format="color" />
<!-- drawables -->
<attr name="button" format="integer" />
diff --git a/main/res/values/colors.xml b/main/res/values/colors.xml
index 91fb6a5..1d965e3 100644
--- a/main/res/values/colors.xml
+++ b/main/res/values/colors.xml
@@ -25,7 +25,5 @@
<color name="link">#FF00C0FF</color>
<color name="button_enabled">#FF000000</color>
<color name="button_disabled">#66000000</color>
- <color name="text_pagerindicator">#FFFFFFFF</color>
- <color name="text_pagerindicator_sides">#88FFFFFF</color>
</resources> \ No newline at end of file
diff --git a/main/res/values/styles.xml b/main/res/values/styles.xml
index 58b404f..ad3fc8d 100644
--- a/main/res/values/styles.xml
+++ b/main/res/values/styles.xml
@@ -303,38 +303,4 @@
<item name="android:textColor">@android:color/white</item>
</style>
- <!-- pager -->
- <style name="pager_indicator">
- <item name="android:layout_width">fill_parent</item>
- <item name="android:layout_height">wrap_content</item>
- <item name="android:background">@drawable/pagerindicator_background</item>
- </style>
-
- <style name="pager_indicator.title">
- <item name="android:layout_width">wrap_content</item>
- <item name="android:layout_height">wrap_content</item>
- <item name="android:layout_margin">5dip</item>
- <item name="android:layout_centerInParent">true</item>
- <item name="android:lines">1</item>
- <item name="android:singleLine">true</item>
- <item name="android:ellipsize">end</item>
- <item name="android:textStyle">bold</item>
- <item name="android:textSize">16dip</item>
- <item name="android:textColor">@color/text_pagerindicator</item>
- <item name="android:background">@null</item>
- </style>
-
- <style name="pager_indicator.side">
- <item name="android:layout_width">wrap_content</item>
- <item name="android:layout_height">wrap_content</item>
- <item name="android:layout_margin">1dip</item>
- <item name="android:layout_centerVertical">true</item>
- <item name="android:lines">1</item>
- <item name="android:singleLine">true</item>
- <item name="android:ellipsize">end</item>
- <item name="android:textSize">12dip</item>
- <item name="android:textColor">@color/text_pagerindicator_sides</item>
- <item name="android:background">@null</item>
- </style>
-
</resources> \ No newline at end of file
diff --git a/main/res/values/themes.xml b/main/res/values/themes.xml
index 8b8c914..ba07eb2 100644
--- a/main/res/values/themes.xml
+++ b/main/res/values/themes.xml
@@ -31,7 +31,6 @@
<item name="text_color_grey">@color/text_grey_dark</item>
<item name="text_color_hint">@color/text_hint_dark</item>
<item name="text_color_link">@color/link</item>
- <item name="text_color_pagerindicator">@color/text_pagerindicator</item>
<item name="button_color_enabled">@color/button_enabled</item>
<item name="button_color_disabled">@color/button_disabled</item>
<item name="background_color">@color/background_dark</item>
@@ -64,7 +63,6 @@
<item name="text_color_grey">@color/text_grey_light</item>
<item name="text_color_hint">@color/text_hint_light</item>
<item name="text_color_link">@color/link</item>
- <item name="text_color_pagerindicator">@color/text_pagerindicator</item>
<item name="button_color_enabled">@color/button_enabled</item>
<item name="button_color_disabled">@color/button_disabled</item>
<item name="background_color">@color/background_light</item>
diff --git a/main/res/values/vpi__attrs.xml b/main/res/values/vpi__attrs.xml
new file mode 100644
index 0000000..4eeb55b
--- /dev/null
+++ b/main/res/values/vpi__attrs.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 Patrik Ã…kerfeldt
+ Copyright (C) 2011 Jake Wharton
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<resources>
+ <declare-styleable name="ViewPagerIndicator">
+ <!-- Style of the title indicator. -->
+ <attr name="vpiTitlePageIndicatorStyle" format="reference"/>
+ </declare-styleable>
+
+ <declare-styleable name="TitlePageIndicator">
+ <!-- Screen edge padding. -->
+ <attr name="clipPadding" format="dimension" />
+ <!-- Color of the footer line and indicator. -->
+ <attr name="footerColor" format="color" />
+ <!-- Height of the footer line. -->
+ <attr name="footerLineHeight" format="dimension" />
+ <!-- Style of the indicator. Default is triangle. -->
+ <attr name="footerIndicatorStyle">
+ <enum name="none" value="0" />
+ <enum name="triangle" value="1" />
+ <enum name="underline" value="2" />
+ </attr>
+ <!-- Height of the indicator above the footer line. -->
+ <attr name="footerIndicatorHeight" format="dimension" />
+ <!-- Left and right padding of the underline indicator. -->
+ <attr name="footerIndicatorUnderlinePadding" format="dimension" />
+ <!-- Padding between the bottom of the title and the footer. -->
+ <attr name="footerPadding" format="dimension" />
+ <!-- Color of the selected title. -->
+ <attr name="selectedColor" format="color" />
+ <!-- Whether or not the selected item is displayed as bold. -->
+ <attr name="selectedBold" format="boolean" />
+ <!-- Color of regular titles. -->
+ <attr name="textColor" format="color" />
+ <!-- Size of title text. -->
+ <attr name="textSize" format="dimension" />
+ <!-- Padding between titles when bumping into each other. -->
+ <attr name="titlePadding" format="dimension" />
+ <!-- Padding between titles and the top of the View. -->
+ <attr name="topPadding" format="dimension" />
+ </declare-styleable>
+</resources>
diff --git a/main/res/values/vpi__colors.xml b/main/res/values/vpi__colors.xml
new file mode 100644
index 0000000..c0d958f
--- /dev/null
+++ b/main/res/values/vpi__colors.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<resources>
+ <color name="vpi__background_holo_dark">#ff000000</color>
+ <color name="vpi__background_holo_light">#fff3f3f3</color>
+ <color name="vpi__bright_foreground_holo_dark">@color/vpi__background_holo_light</color>
+ <color name="vpi__bright_foreground_holo_light">@color/vpi__background_holo_dark</color>
+ <color name="vpi__bright_foreground_disabled_holo_dark">#ff4c4c4c</color>
+ <color name="vpi__bright_foreground_disabled_holo_light">#ffb2b2b2</color>
+ <color name="vpi__bright_foreground_inverse_holo_dark">@color/vpi__bright_foreground_holo_light</color>
+ <color name="vpi__bright_foreground_inverse_holo_light">@color/vpi__bright_foreground_holo_dark</color>
+</resources>
diff --git a/main/res/values/vpi__defaults.xml b/main/res/values/vpi__defaults.xml
new file mode 100644
index 0000000..4e0bb8f
--- /dev/null
+++ b/main/res/values/vpi__defaults.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 Jake Wharton
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<resources>
+ <dimen name="default_title_indicator_clip_padding">4dp</dimen>
+ <color name="default_title_indicator_footer_color">#FF6899FF</color>
+ <dimen name="default_title_indicator_footer_line_height">1px</dimen>
+ <integer name="default_title_indicator_footer_indicator_style">1</integer>
+ <dimen name="default_title_indicator_footer_indicator_height">5dp</dimen>
+ <dimen name="default_title_indicator_footer_indicator_underline_padding">20dp</dimen>
+ <dimen name="default_title_indicator_footer_padding">8dp</dimen>
+ <color name="default_title_indicator_selected_color">#FFFFFFFF</color>
+ <bool name="default_title_indicator_selected_bold">true</bool>
+ <color name="default_title_indicator_text_color">#FFAAAAAA</color>
+ <dimen name="default_title_indicator_text_size">18dp</dimen>
+ <dimen name="default_title_indicator_title_padding">5dp</dimen>
+ <dimen name="default_title_indicator_top_padding">0dp</dimen>
+</resources> \ No newline at end of file
diff --git a/main/res/values/vpi__styles.xml b/main/res/values/vpi__styles.xml
new file mode 100644
index 0000000..0662c1c
--- /dev/null
+++ b/main/res/values/vpi__styles.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 Jake Wharton
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<resources>
+ <style name="Theme.PageIndicatorDefaults" parent="android:Theme">
+ <item name="vpiTitlePageIndicatorStyle">@style/Widget.TitlePageIndicator</item>
+ </style>
+
+ <style name="Widget"></style>
+
+ <style name="Widget.TitlePageIndicator" parent="Widget">
+ <item name="clipPadding">@dimen/default_title_indicator_clip_padding</item>
+ <item name="footerColor">@color/default_title_indicator_footer_color</item>
+ <item name="footerLineHeight">@dimen/default_title_indicator_footer_line_height</item>
+ <item name="footerIndicatorStyle">@integer/default_title_indicator_footer_indicator_style</item>
+ <item name="footerIndicatorHeight">@dimen/default_title_indicator_footer_indicator_height</item>
+ <item name="footerIndicatorUnderlinePadding">@dimen/default_title_indicator_footer_indicator_underline_padding</item>
+ <item name="footerPadding">@dimen/default_title_indicator_footer_padding</item>
+ <item name="selectedColor">@color/default_title_indicator_selected_color</item>
+ <item name="selectedBold">@bool/default_title_indicator_selected_bold</item>
+ <item name="textColor">@color/default_title_indicator_text_color</item>
+ <item name="textSize">@dimen/default_title_indicator_text_size</item>
+ <item name="titlePadding">@dimen/default_title_indicator_title_padding</item>
+ <item name="topPadding">@dimen/default_title_indicator_top_padding</item>
+ </style>
+</resources>