Skip to content

Commit

Permalink
Added some DrawerBuilder properties
Browse files Browse the repository at this point in the history
  • Loading branch information
zsmb13 committed Jul 6, 2018
1 parent e14b915 commit b4ed077
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions app/src/main/java/co/zsmb/builderdsl/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ class MainActivity : AppCompatActivity() {
setContentView(R.layout.activity_main)

drawer {
drawerLayout = R.layout.material_drawer_fits_not
translucentStatusBar = false

primaryItem()
primaryItem()
}
Expand All @@ -32,6 +35,21 @@ class DrawerBuilderKt(activity: Activity) {
internal fun build() {
builder.build()
}

var drawerLayout: Int
@Deprecated(message = "Non readable property.", level = DeprecationLevel.ERROR)
get() = throw UnsupportedOperationException("")
set(value) {
builder.withDrawerLayout(value)
}

var translucentStatusBar: Boolean
@Deprecated(message = "Non readable property.", level = DeprecationLevel.ERROR)
get() = throw UnsupportedOperationException("")
set(value) {
builder.withTranslucentStatusBar(value)
}

}

fun DrawerBuilderKt.primaryItem() {
Expand Down

0 comments on commit b4ed077

Please sign in to comment.