Skip to content

Commit

Permalink
Changed theme names to be more consistent (#64) & Version Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-stoneuk committed Jul 26, 2017
1 parent ab400bc commit ecf4719
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 31 deletions.
15 changes: 1 addition & 14 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ allprojects {

```gradle
dependencies {
compile 'com.github.daniel-stoneuk:material-about-library:2.2.0'
compile 'com.github.daniel-stoneuk:material-about-library:2.2.1'
}
```

Expand Down Expand Up @@ -73,10 +73,10 @@ public class ExampleMaterialAboutActivity extends MaterialAboutActivity {

Ensure that the theme extends either of these themes, and apply primary & accent colours:

- `Theme.Mal.Light` (with dark toolbar)
- `Theme.Mal.Dark` (with dark toolbar)
- `Theme.Mal.Light.LightActionBar` (with light toolbar)
- `Theme.Mal.Dark.LightActionBar` (with light toolbar)
- `Theme.Mal.Light` (light theme with light toolbar)
- `Theme.Mal.Light.DarkActionBar` (light theme with dark toolbar)
- `Theme.Mal.Dark` (dark theme with dark toolbar)
- `Theme.Mal.Dark.LightActionBar` (dark theme with light toolbar)

```xml
<manifest ...>
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'

def versionMajor = 2
def versionMinor = 2
def versionPatch = 0
def versionPatch = 1
def versionBuild = 0 // bump for dogfood builds, public betas, etc.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
Log.i("test", "onCreate: " + getIntent().getIntExtra(THEME_EXTRA, THEME_LIGHT_DARKBAR));
switch (getIntent().getIntExtra(THEME_EXTRA, THEME_LIGHT_DARKBAR)) {
case THEME_LIGHT_LIGHTBAR:
setTheme(R.style.AppTheme_MaterialAboutActivity_Light_LightActionBar);
setTheme(R.style.AppTheme_MaterialAboutActivity_Light);
colorIcon = R.color.mal_color_icon_light_theme;
break;
case THEME_DARK_LIGHTBAR:
Expand All @@ -120,11 +120,11 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
colorIcon = R.color.mal_color_icon_light_theme;
break;
case THEME_DARK_DARKBAR:
setTheme(R.style.AppTheme_MaterialAboutActivity_Dark_DarkActionBar);
setTheme(R.style.AppTheme_MaterialAboutActivity_Dark);
colorIcon = R.color.mal_color_icon_dark_theme;
break;
case THEME_CUSTOM_CARDVIEW:
setTheme(R.style.AppTheme_MaterialAboutActivity_Light_CustomCardView);
setTheme(R.style.AppTheme_MaterialAboutActivity_Light_DarkActionBar_CustomCardView);
colorIcon = R.color.mal_color_icon_dark_theme;
break;
}
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<item name="windowNoTitle">true</item>
</style>

<style name="AppTheme.MaterialAboutActivity.Dark.DarkActionBar" parent="Theme.Mal.Dark">
<style name="AppTheme.MaterialAboutActivity.Dark" parent="Theme.Mal.Dark">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
Expand All @@ -35,14 +35,14 @@
<item name="colorAccent">@color/colorAccent</item>
</style>

<style name="AppTheme.MaterialAboutActivity.Light.DarkActionBar" parent="Theme.Mal.Light">
<style name="AppTheme.MaterialAboutActivity.Light.DarkActionBar" parent="Theme.Mal.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>

<style name="AppTheme.MaterialAboutActivity.Light.CustomCardView" parent="Theme.Mal.Light">
<style name="AppTheme.MaterialAboutActivity.Light.DarkActionBar.CustomCardView" parent="Theme.Mal.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
Expand All @@ -53,7 +53,7 @@
<item name="mal_color_secondary">#ffe0e0e0</item>
</style>

<style name="AppTheme.MaterialAboutActivity.Light.LightActionBar" parent="Theme.Mal.Light.LightActionBar">
<style name="AppTheme.MaterialAboutActivity.Light" parent="Theme.Mal.Light">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorLightBar</item>
<item name="colorPrimaryDark">@color/colorLightStatus</item>
Expand Down
2 changes: 1 addition & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ group = 'com.github.daniel-stoneuk'

def versionMajor = 2
def versionMinor = 2
def versionPatch = 0
def versionPatch = 1
def versionBuild = 0 // bump for dogfood builds, public betas, etc.

android {
Expand Down
6 changes: 3 additions & 3 deletions library/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<resources>

<style name="Theme.Mal.Light" parent="Theme.AppCompat.Light.NoActionBar">
<item name="mal_toolbarTheme">@style/Theme.Mal.Toolbar.Dark</item>
<item name="mal_toolbarTheme">@style/Theme.Mal.Toolbar.Light</item>
<item name="mal_toolbarPopupTheme">@style/Theme.Mal.Toolbar.Light</item>
<item name="mal_color_primary">@color/mal_text_primary</item>
<item name="mal_color_secondary">@color/mal_text_secondary</item>
Expand All @@ -21,8 +21,8 @@
<item name="mal_toolbarTheme">@style/Theme.Mal.Toolbar.Light</item>
</style>

<style name="Theme.Mal.Light.LightActionBar">
<item name="mal_toolbarTheme">@style/Theme.Mal.Toolbar.Light</item>
<style name="Theme.Mal.Light.DarkActionBar">
<item name="mal_toolbarTheme">@style/Theme.Mal.Toolbar.Dark</item>
</style>

<style name="Theme.Mal.Toolbar.Light" parent="ThemeOverlay.AppCompat.Light" />
Expand Down

0 comments on commit ecf4719

Please sign in to comment.