Skip to content

Commit

Permalink
[FIX] Changed styleModel to themeModel
Browse files Browse the repository at this point in the history
  • Loading branch information
manneohlund committed Feb 28, 2018
1 parent 151a9fd commit 9fb73c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sample/src/main/java/com/sample/jsonthemer/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class MainActivity : AppCompatActivity() {
val theme: BaseThemeModel = JsonThemer.setup(this, currentTheme)
super.onCreate(savedInstanceState)
binding = DataBindingUtil.setContentView(this, R.layout.activity_main)
binding.styleModel = theme
binding.themeModel = theme

// Set ActionBar from bindings
setSupportActionBar(binding.toolbar)
Expand Down
6 changes: 3 additions & 3 deletions sample/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<data>

<variable
name="styleModel"
name="themeModel"
type="jsonthemer.model.BaseThemeModel" />
</data>

Expand All @@ -19,15 +19,15 @@
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="@dimen/app_bar_height"
android:background="@{styleModel.toolbarColor}"
android:background="@{themeModel.toolbarColor}"
android:fitsSystemWindows="true">

<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
app:contentScrim="@{styleModel.statusBarColorDrawable}"
app:contentScrim="@{themeModel.statusBarColorDrawable}"
app:layout_scrollFlags="scroll|exitUntilCollapsed">

<android.support.v7.widget.Toolbar
Expand Down

0 comments on commit 9fb73c5

Please sign in to comment.