Skip to content

Commit

Permalink
Merge branch 'user-stylable-title' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHamm committed Jul 11, 2015
2 parents 98b8552 + 98f8cb6 commit 11aa251
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 27 deletions.
8 changes: 7 additions & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"/>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="WizardPageTitle">@style/WizardPageTitle.Teal</item>
</style>

<style name="WizardPageTitle.Teal">
<item name="android:textColor">#00796B</item>
</style>
</resources>
11 changes: 9 additions & 2 deletions lib/src/main/res/layout/fragment_integer_page.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
style="@style/WizardPageContainer"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.hammwerk.wizardpager.SingleFixedChoicePageFragment">

<TextView
style="@style/WizardPageTitle"
android:id="@android:id/title"
style="?attr/WizardPageTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
android:paddingRight="?android:attr/listPreferredItemPaddingLeft"
tools:text="Title"/>

<EditText
Expand Down
12 changes: 10 additions & 2 deletions lib/src/main/res/layout/fragment_multi_fixed_choice_page.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
style="@style/WizardPageContainer"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.hammwerk.wizardpager.MultiFixedChoicePageFragment">

<TextView
style="@style/WizardPageTitle"
android:id="@android:id/title"
style="?attr/WizardPageTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
android:paddingRight="?android:attr/listPreferredItemPaddingLeft"
tools:text="Title"/>

<ListView
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
style="@style/WizardPageContainer"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.hammwerk.wizardpager.SingleFixedChoiceBranchPageFragment">

<TextView
style="@style/WizardPageTitle"
android:id="@android:id/title"
style="?attr/WizardPageTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
android:paddingRight="?android:attr/listPreferredItemPaddingLeft"
tools:text="Title"/>

<ListView
Expand Down
12 changes: 10 additions & 2 deletions lib/src/main/res/layout/fragment_single_fixed_choice_page.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
style="@style/WizardPageContainer"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.hammwerk.wizardpager.SingleFixedChoicePageFragment">

<TextView
style="@style/WizardPageTitle"
android:id="@android:id/title"
style="?attr/WizardPageTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
android:paddingRight="?android:attr/listPreferredItemPaddingLeft"
tools:text="Title"/>

<ListView
Expand Down
7 changes: 1 addition & 6 deletions lib/src/main/res/values-v16/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
<resources>

<style name="WizardPageTitle">
<item name="android:id">@android:id/title</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_margin">16dp</item>
<item name="android:paddingLeft">?android:attr/listPreferredItemPaddingLeft</item>
<item name="android:textSize">36sp</item>
<item name="android:textColor">#ff0099cc</item>
<item name="android:textColor">#2196F3</item>
<item name="android:fontFamily">sans-serif-thin</item>
</style>
</resources>
5 changes: 5 additions & 0 deletions lib/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<attr name="WizardPageTitle" format="reference"/>
</resources>
13 changes: 1 addition & 12 deletions lib/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"/>

<style name="WizardPageContainer">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
<item name="android:orientation">vertical</item>
</style>

<style name="WizardPageTitle">
<item name="android:id">@android:id/title</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_margin">16dp</item>
<item name="android:paddingLeft">?android:attr/listPreferredItemPaddingLeft</item>
<item name="android:textSize">36sp</item>
<item name="android:textColor">#ff0099cc</item>
<item name="android:textColor">#1976D2</item>
</style>
</resources>

0 comments on commit 11aa251

Please sign in to comment.