Skip to content

Commit

Permalink
Use KTX for hello world slice.
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Sigelbaum committed Jun 29, 2018
1 parent 867d777 commit 3184fb3
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ class GettingStartedSliceProvider : SliceProvider() {
// [START on_bind_slice]
override fun onBindSlice(sliceUri: Uri): Slice? {
return if (sliceUri.path == "/hello") {
ListBuilder(context, sliceUri, ListBuilder.INFINITY)
.addRow { it.setTitle("URI found.") }
.build()
list(context, sliceUri, ListBuilder.INFINITY) {
row { setTitle("URI found.") }
}
} else {
ListBuilder(context, sliceUri, ListBuilder.INFINITY)
.addRow { it.setTitle("URI not found.") }
.build()
list(context, sliceUri, ListBuilder.INFINITY) {
row { setTitle("URI not found.") }
}
}
}
// [END on_bind_slice]
Expand Down

0 comments on commit 3184fb3

Please sign in to comment.