Skip to content
Permalink
Browse files

Version 1.0.0-beta05

  • Loading branch information...
afollestad committed Nov 11, 2018
1 parent da4439c commit 9773e539a3592a9f17e5fe39f043215c27d708e3
@@ -43,7 +43,7 @@ Add this to your app module's `build.gradle` file:
```gradle
dependencies {
implementation 'com.afollestad:aesthetic:1.0.0-beta04'
implementation 'com.afollestad:aesthetic:1.0.0-beta05'
}
```
@@ -2,8 +2,8 @@ ext.versions = [
minSdk : 16,
compileSdk : 28,
buildTools : '28.0.3',
publishVersion : '1.0.0-beta04',
publishVersionCode: 32,
publishVersion : '1.0.0-beta05',
publishVersionCode: 33,

gradlePlugin : '3.2.1',
kotlin : '1.3.0',
@@ -29,8 +29,10 @@ class DrawerActivity : AestheticActivity() {
)
drawer_layout.addDrawerListener(drawerToggle)

supportActionBar!!.setDisplayHomeAsUpEnabled(true)
supportActionBar!!.setHomeButtonEnabled(true)
supportActionBar!!.apply {
setDisplayHomeAsUpEnabled(true)
setHomeButtonEnabled(true)
}

navigation_view.post { navigation_view.setCheckedItem(R.id.item_three) }
navigation_view.setNavigationItemSelectedListener {
@@ -41,18 +41,18 @@ class MainActivity : AestheticActivity() {
if (Aesthetic.isFirstTime) {
Aesthetic.config {
activityTheme(R.style.AppTheme)
textColorPrimaryRes(R.color.text_color_primary)
textColorSecondaryRes(R.color.text_color_secondary)
colorPrimaryRes(R.color.md_white)
colorAccentRes(R.color.md_blue)
textColorPrimary(res = R.color.text_color_primary)
textColorSecondary(res = R.color.text_color_secondary)
colorPrimary(res = R.color.md_white)
colorAccent(res = R.color.md_blue)
colorStatusBarAuto()
colorNavigationBarAuto()
textColorPrimary(Color.BLACK)
navigationViewMode(NavigationViewMode.SELECTED_ACCENT)
bottomNavigationBackgroundMode(BottomNavBgMode.PRIMARY)
bottomNavigationIconTextMode(BottomNavIconTextMode.SELECTED_ACCENT)
swipeRefreshLayoutColorsRes(R.color.md_blue, R.color.md_blue_grey, R.color.md_green)
attributeRes(R.attr.my_custom_attr, R.color.md_red)
attribute(R.attr.my_custom_attr, res = R.color.md_red)
}
}

@@ -69,15 +69,15 @@ class MainFragment : Fragment() {
Aesthetic.config {
activityTheme(R.style.AppThemeDark)
isDark(true)
textColorPrimaryRes(R.color.text_color_primary_dark)
textColorSecondaryRes(R.color.text_color_secondary_dark)
textColorPrimary(res = R.color.text_color_primary_dark)
textColorSecondary(res = R.color.text_color_secondary_dark)
}
} else {
Aesthetic.config {
activityTheme(R.style.AppTheme)
isDark(false)
textColorPrimaryRes(R.color.text_color_primary)
textColorSecondaryRes(R.color.text_color_secondary)
textColorPrimary(res = R.color.text_color_primary)
textColorSecondary(res = R.color.text_color_secondary)
}
}
}
@@ -116,82 +116,82 @@ class MainFragment : Fragment() {
private fun onClickButton(view: View) {
when (view.id) {
R.id.btn_black -> Aesthetic.config {
colorPrimaryRes(R.color.text_color_primary)
colorAccentRes(R.color.md_purple)
colorPrimary(res = R.color.text_color_primary)
colorAccent(res = R.color.md_purple)
colorStatusBarAuto()
colorNavigationBarAuto()
bottomNavigationBackgroundMode(BottomNavBgMode.PRIMARY_DARK)
bottomNavigationIconTextMode(BottomNavIconTextMode.BLACK_WHITE_AUTO)
swipeRefreshLayoutColorsRes(R.color.md_purple)
attributeRes(R.attr.my_custom_attr, R.color.md_amber)
attribute(R.attr.my_custom_attr, res = R.color.md_amber)

snackbarBackgroundColorDefault()
snackbarTextColorDefault()
}
R.id.btn_red -> Aesthetic.config {
colorPrimaryRes(R.color.md_red)
colorAccentRes(R.color.md_amber)
colorPrimary(res = R.color.md_red)
colorAccent(res = R.color.md_amber)
colorStatusBarAuto()
colorNavigationBarAuto()
bottomNavigationBackgroundMode(BottomNavBgMode.PRIMARY_DARK)
bottomNavigationIconTextMode(BottomNavIconTextMode.BLACK_WHITE_AUTO)
swipeRefreshLayoutColorsRes(R.color.md_red, R.color.md_amber)
attributeRes(R.attr.my_custom_attr, R.color.md_blue)
attribute(R.attr.my_custom_attr, res = R.color.md_blue)

snackbarBackgroundColorDefault()
snackbarTextColorDefault()
}
R.id.btn_purple -> Aesthetic.config {
colorPrimaryRes(R.color.md_purple)
colorAccentRes(R.color.md_lime)
colorPrimary(res = R.color.md_purple)
colorAccent(res = R.color.md_lime)
colorStatusBarAuto()
colorNavigationBarAuto()
bottomNavigationBackgroundMode(BottomNavBgMode.PRIMARY_DARK)
bottomNavigationIconTextMode(BottomNavIconTextMode.BLACK_WHITE_AUTO)
swipeRefreshLayoutColorsRes(R.color.md_purple, R.color.md_lime)
attributeRes(R.attr.my_custom_attr, R.color.md_green)
attribute(R.attr.my_custom_attr, res = R.color.md_green)

snackbarBackgroundColorDefault()
snackbarTextColorDefault()
}
R.id.btn_blue -> Aesthetic.config {
colorPrimaryRes(R.color.md_blue)
colorAccentRes(R.color.md_pink)
colorPrimary(res = R.color.md_blue)
colorAccent(res = R.color.md_pink)
colorStatusBarAuto()
colorNavigationBarAuto()
bottomNavigationBackgroundMode(BottomNavBgMode.PRIMARY_DARK)
bottomNavigationIconTextMode(BottomNavIconTextMode.BLACK_WHITE_AUTO)
swipeRefreshLayoutColorsRes(R.color.md_blue, R.color.md_pink)
attributeRes(R.attr.my_custom_attr, R.color.md_purple)
attribute(R.attr.my_custom_attr, res = R.color.md_purple)

snackbarBackgroundColorDefault()
snackbarTextColorDefault()
}
R.id.btn_green -> Aesthetic.config {
colorPrimaryRes(R.color.md_green)
colorAccentRes(R.color.md_blue_grey)
colorPrimary(res = R.color.md_green)
colorAccent(res = R.color.md_blue_grey)
colorStatusBarAuto()
colorNavigationBarAuto()
bottomNavigationBackgroundMode(BottomNavBgMode.PRIMARY_DARK)
bottomNavigationIconTextMode(BottomNavIconTextMode.BLACK_WHITE_AUTO)
swipeRefreshLayoutColorsRes(R.color.md_green, R.color.md_blue_grey)
attributeRes(R.attr.my_custom_attr, R.color.md_pink)
attribute(R.attr.my_custom_attr, res = R.color.md_pink)

snackbarBackgroundColorDefault()
snackbarTextColorDefault()
}
R.id.btn_white -> Aesthetic.config {
colorPrimaryRes(R.color.md_white)
colorAccentRes(R.color.md_blue)
colorPrimary(res = R.color.md_white)
colorAccent(res = R.color.md_blue)
colorStatusBarAuto()
colorNavigationBarAuto()
bottomNavigationBackgroundMode(BottomNavBgMode.PRIMARY)
bottomNavigationIconTextMode(BottomNavIconTextMode.SELECTED_ACCENT)
swipeRefreshLayoutColorsRes(R.color.md_blue)
attributeRes(R.attr.my_custom_attr, R.color.md_lime)
attribute(R.attr.my_custom_attr, res = R.color.md_lime)

snackbarBackgroundColorRes(R.color.md_white)
snackbarTextColorRes(android.R.color.black)
snackbarBackgroundColor(res = R.color.md_white)
snackbarTextColor(res = android.R.color.black)
}
}
}

0 comments on commit 9773e53

Please sign in to comment.
You can’t perform that action at this time.