aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrumeet <liangyuteng12345@gmail.com>2017-08-27 21:44:08 +0800
committerTrumeet <liangyuteng12345@gmail.com>2017-08-27 21:44:08 +0800
commit07eb282b4af98146413e9911e7cdf4fceed9192e (patch)
tree2cc6616c0ba80c96f1f59a4f32a1a8b501c89ab7
parent019522cc93d947b5075ca90547b9e13f08787739 (diff)
downloadSetupWizardLibCompat-07eb282b4af98146413e9911e7cdf4fceed9192e.tar
SetupWizardLibCompat-07eb282b4af98146413e9911e7cdf4fceed9192e.tar.gz
SetupWizardLibCompat-07eb282b4af98146413e9911e7cdf4fceed9192e.tar.bz2
SetupWizardLibCompat-07eb282b4af98146413e9911e7cdf4fceed9192e.zip
fix: crash in pre-lollipop0.2
-rw-r--r--.idea/misc.xml2
-rw-r--r--.idea/modules.xml3
-rw-r--r--setupwizardlib/src/main/res/drawable/suw_card_bg.xml27
-rw-r--r--setupwizardlib/src/main/res/drawable/suw_navbar_btn_bg.xml29
-rw-r--r--setupwizardlib/src/main/res/drawable/suw_navbar_ic_back.xml29
-rw-r--r--setupwizardlib/src/main/res/drawable/suw_navbar_ic_more.xml29
-rw-r--r--setupwizardlib/src/main/res/drawable/suw_navbar_ic_next.xml29
-rw-r--r--setupwizardlib/src/main/res/values-v21/styles.xml90
-rw-r--r--setupwizardlib/src/main/res/values/styles.xml70
9 files changed, 217 insertions, 91 deletions
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 4aef399..ba7052b 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -24,7 +24,7 @@
</value>
</option>
</component>
- <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="1.8 (3)" project-jdk-type="JavaSDK">
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 0c36d53..1ea710f 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -3,8 +3,11 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/SetupWizardLibCompat.iml" filepath="$PROJECT_DIR$/SetupWizardLibCompat.iml" />
+ <module fileurl="file://C:\Users\Trumeet\Files\Android\SetupWizardLibCompat\SetupWizardLibCompat.iml" filepath="C:\Users\Trumeet\Files\Android\SetupWizardLibCompat\SetupWizardLibCompat.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
+ <module fileurl="file://C:\Users\Trumeet\Files\Android\SetupWizardLibCompat\app\app.iml" filepath="C:\Users\Trumeet\Files\Android\SetupWizardLibCompat\app\app.iml" />
<module fileurl="file://$PROJECT_DIR$/setupwizardlib/setupwizardlib.iml" filepath="$PROJECT_DIR$/setupwizardlib/setupwizardlib.iml" />
+ <module fileurl="file://C:\Users\Trumeet\Files\Android\SetupWizardLibCompat\setupwizardlib\setupwizardlib.iml" filepath="C:\Users\Trumeet\Files\Android\SetupWizardLibCompat\setupwizardlib\setupwizardlib.iml" />
</modules>
</component>
</project> \ No newline at end of file
diff --git a/setupwizardlib/src/main/res/drawable/suw_card_bg.xml b/setupwizardlib/src/main/res/drawable/suw_card_bg.xml
new file mode 100644
index 0000000..adf5068
--- /dev/null
+++ b/setupwizardlib/src/main/res/drawable/suw_card_bg.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 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.
+-->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+
+ <corners
+ android:topLeftRadius="@dimen/suw_card_corner_radius"
+ android:topRightRadius="@dimen/suw_card_corner_radius" />
+
+ <solid android:color="#ff000000" />
+
+</shape>
diff --git a/setupwizardlib/src/main/res/drawable/suw_navbar_btn_bg.xml b/setupwizardlib/src/main/res/drawable/suw_navbar_btn_bg.xml
new file mode 100644
index 0000000..7674f42
--- /dev/null
+++ b/setupwizardlib/src/main/res/drawable/suw_navbar_btn_bg.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2016 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.
+ -->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true">
+ <shape android:shape="rectangle">
+ <solid android:color="#ff0000"/>
+ </shape>
+ </item>
+ <item>
+ <shape android:shape="rectangle">
+ <solid android:color="#ffffff"/>
+ </shape>
+ </item>
+</selector> \ No newline at end of file
diff --git a/setupwizardlib/src/main/res/drawable/suw_navbar_ic_back.xml b/setupwizardlib/src/main/res/drawable/suw_navbar_ic_back.xml
new file mode 100644
index 0000000..a02891c
--- /dev/null
+++ b/setupwizardlib/src/main/res/drawable/suw_navbar_ic_back.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 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.
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <!-- Fill with solid black as the actual button color will be tinted on the entire drawable -->
+ <path
+ android:fillColor="#000"
+ android:pathData="M15.4,7.4l-1.4,-1.4 -6,6 6,6 1.4,-1.4 -4.6,-4.6z" />
+
+</vector>
diff --git a/setupwizardlib/src/main/res/drawable/suw_navbar_ic_more.xml b/setupwizardlib/src/main/res/drawable/suw_navbar_ic_more.xml
new file mode 100644
index 0000000..97c5e57
--- /dev/null
+++ b/setupwizardlib/src/main/res/drawable/suw_navbar_ic_more.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 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.
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <!-- Fill with solid black as the actual button color will be tinted on the entire drawable -->
+ <path
+ android:fillColor="#000"
+ android:pathData="M16.6,8.6l-4.6,4.6 -4.6,-4.6 -1.4,1.4 6,6 6,-6z"/>
+
+</vector>
diff --git a/setupwizardlib/src/main/res/drawable/suw_navbar_ic_next.xml b/setupwizardlib/src/main/res/drawable/suw_navbar_ic_next.xml
new file mode 100644
index 0000000..1dc4328
--- /dev/null
+++ b/setupwizardlib/src/main/res/drawable/suw_navbar_ic_next.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 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.
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <!-- Fill with solid black as the actual button color will be tinted on the entire drawable -->
+ <path
+ android:fillColor="#000"
+ android:pathData="M10,6 l-1.4,1.4 4.6,4.6 -4.6,4.6 1.4,1.4 6,-6z" />
+
+</vector>
diff --git a/setupwizardlib/src/main/res/values-v21/styles.xml b/setupwizardlib/src/main/res/values-v21/styles.xml
deleted file mode 100644
index 88c39d4..0000000
--- a/setupwizardlib/src/main/res/values-v21/styles.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2015 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>
-
- <!-- Content styles -->
-
- <style name="TextAppearance.SuwDescription" parent="android:TextAppearance.Material.Medium">
- <item name="android:textColor">?android:attr/textColorPrimary</item>
- <item name="android:textSize">@dimen/suw_description_text_size</item>
- </style>
-
- <!-- Card layout (for tablets) -->
-
- <style name="TextAppearance.SuwCardTitle" parent="@android:style/TextAppearance.Material.Display1">
- <item name="android:textColor">@android:color/white</item>
- </style>
-
- <!-- GLIF Card layout (for tablets) -->
-
- <style name="SuwGlifCardBackground">
- <item name="android:background">?android:attr/colorPrimary</item>
- </style>
-
- <!-- Items styles -->
-
- <style name="SuwItemContainer">
- <item name="android:minHeight">?android:attr/listPreferredItemHeight</item>
- <item name="android:paddingBottom">@dimen/suw_items_padding_vertical</item>
- <item name="android:paddingEnd">?android:attr/listPreferredItemPaddingEnd</item>
- <item name="android:paddingStart">?android:attr/listPreferredItemPaddingStart</item>
- <item name="android:paddingTop">@dimen/suw_items_padding_vertical</item>
- </style>
-
- <style name="SuwItemTitle">
- <item name="android:textAppearance">?android:attr/textAppearanceListItem</item>
- </style>
-
- <style name="SuwItemSummary">
- <item name="android:textAppearance">?android:attr/textAppearanceListItemSmall</item>
- </style>
-
- <!-- Button styles -->
-
- <style name="SuwButtonItem" />
-
- <style name="SuwButtonItem.Colored">
- <item name="android:buttonStyle">@android:style/Widget.Material.Button</item>
- <item name="android:colorButtonNormal">?android:attr/colorAccent</item>
- <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
- </style>
-
- <!-- Navigation bar styles -->
-
- <style name="SuwNavBarButtonStyle" parent="@android:style/Widget.Material.Button.Borderless">
- <item name="android:background">?attr/suwNavBarButtonBackground</item>
- <item name="android:fontFamily">sans-serif</item>
- <item name="android:minWidth">0dp</item>
- <item name="android:paddingLeft">@dimen/suw_navbar_button_padding_sides</item>
- <item name="android:paddingRight">@dimen/suw_navbar_button_padding_sides</item>
- <item name="android:textAllCaps">true</item>
- <item name="android:textColor">?attr/suwNavBarTextColor</item>
- <item name="android:textSize">@dimen/suw_navbar_text_size</item>
- </style>
-
- <style name="SuwNavBarThemeDark" parent="SuwNavBarTheme">
- <item name="suwNavBarBackgroundColor">@color/suw_navbar_bg_dark</item>
- <item name="suwNavBarButtonBackground">@drawable/suw_navbar_btn_bg</item>
- </style>
-
- <style name="SuwNavBarThemeLight" parent="SuwNavBarTheme">
- <item name="suwNavBarBackgroundColor">@color/suw_navbar_bg_light</item>
- <item name="suwNavBarButtonBackground">@drawable/suw_navbar_btn_bg</item>
- </style>
-
-</resources>
diff --git a/setupwizardlib/src/main/res/values/styles.xml b/setupwizardlib/src/main/res/values/styles.xml
index f2bae05..8897c86 100644
--- a/setupwizardlib/src/main/res/values/styles.xml
+++ b/setupwizardlib/src/main/res/values/styles.xml
@@ -197,4 +197,74 @@
<item name="suwNavBarTextColor">?android:attr/textColorPrimary</item>
</style>
+ <!-- Content styles -->
+
+ <style name="TextAppearance.SuwDescription" parent="TextAppearance.AppCompat.Medium">
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ <item name="android:textSize">@dimen/suw_description_text_size</item>
+ </style>
+
+ <!-- Card layout (for tablets) -->
+
+ <style name="TextAppearance.SuwCardTitle" parent="@style/TextAppearance.AppCompat.Display1">
+ <item name="android:textColor">@android:color/white</item>
+ </style>
+
+ <!-- GLIF Card layout (for tablets) -->
+
+ <style name="SuwGlifCardBackground">
+ <item name="android:background">?android:attr/colorPrimary</item>
+ </style>
+
+ <!-- Items styles -->
+
+ <style name="SuwItemContainer">
+ <item name="android:minHeight">?android:attr/listPreferredItemHeight</item>
+ <item name="android:paddingBottom">@dimen/suw_items_padding_vertical</item>
+ <item name="android:paddingRight">?android:attr/listPreferredItemPaddingEnd</item>
+ <item name="android:paddingLeft">?android:attr/listPreferredItemPaddingStart</item>
+ <item name="android:paddingTop">@dimen/suw_items_padding_vertical</item>
+ </style>
+
+ <style name="SuwItemTitle">
+ <item name="android:textAppearance">?android:attr/textAppearanceListItem</item>
+ </style>
+
+ <style name="SuwItemSummary">
+ <item name="android:textAppearance">?android:attr/textAppearanceListItemSmall</item>
+ </style>
+
+ <!-- Button styles -->
+
+ <style name="SuwButtonItem" />
+
+ <style name="SuwButtonItem.Colored">
+ <item name="android:buttonStyle">@style/Widget.AppCompat.Button</item>
+ <item name="android:colorButtonNormal" tools:targetApi="lollipop">?attr/colorAccent</item>
+ <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
+ </style>
+
+ <!-- Navigation bar styles -->
+
+ <style name="SuwNavBarButtonStyle" parent="@style/Widget.AppCompat.Button.Borderless">
+ <item name="android:background">?attr/suwNavBarButtonBackground</item>
+ <item name="android:fontFamily" tools:targetApi="jelly_bean">sans-serif</item>
+ <item name="android:minWidth">0dp</item>
+ <item name="android:paddingLeft">@dimen/suw_navbar_button_padding_sides</item>
+ <item name="android:paddingRight">@dimen/suw_navbar_button_padding_sides</item>
+ <item name="android:textAllCaps">true</item>
+ <item name="android:textColor">?attr/suwNavBarTextColor</item>
+ <item name="android:textSize">@dimen/suw_navbar_text_size</item>
+ </style>
+
+ <style name="SuwNavBarThemeDark" parent="SuwNavBarTheme">
+ <item name="suwNavBarBackgroundColor">@color/suw_navbar_bg_dark</item>
+ <item name="suwNavBarButtonBackground">@drawable/suw_navbar_btn_bg</item>
+ </style>
+
+ <style name="SuwNavBarThemeLight" parent="SuwNavBarTheme">
+ <item name="suwNavBarBackgroundColor">@color/suw_navbar_bg_light</item>
+ <item name="suwNavBarButtonBackground">@drawable/suw_navbar_btn_bg</item>
+ </style>
+
</resources>