diff options
author | Allan Wang <me@allanwang.ca> | 2017-07-03 20:09:35 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-07-03 20:09:35 -0700 |
commit | 139f2dd8207d3a9cd67157a3e3754a9982c7f69d (patch) | |
tree | 548f23ff4f6ddce0a24e740fc550c75ad997fc29 /sample/src/main/kotlin/ca | |
parent | b88a8834dc3be12a37856e9e2584eee7ef52c22e (diff) | |
download | kau-139f2dd8207d3a9cd67157a3e3754a9982c7f69d.tar.gz kau-139f2dd8207d3a9cd67157a3e3754a9982c7f69d.tar.bz2 kau-139f2dd8207d3a9cd67157a3e3754a9982c7f69d.zip |
Initial creation of the Permission Manager
Diffstat (limited to 'sample/src/main/kotlin/ca')
-rw-r--r-- | sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt | 9 | ||||
-rw-r--r-- | sample/src/main/kotlin/ca/allanwang/kau/sample/PermissionCheckbox.kt | 20 |
2 files changed, 28 insertions, 1 deletions
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt index 10f2065..2fd846c 100644 --- a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt +++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt @@ -2,17 +2,24 @@ package ca.allanwang.kau.sample import android.os.Bundle import android.support.v7.app.AppCompatActivity +import ca.allanwang.kau.utils.fullLinearRecycler import ca.allanwang.kau.utils.startActivitySlideOut +import com.mikepenz.fastadapter.commons.adapters.FastItemAdapter /** * Created by Allan Wang on 2017-06-12. * - * Empty Activity for animations + * Activity for animations + * Now also showcases permissions */ class AnimActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + val adapter = FastItemAdapter<KP> + val recycler = fullLinearRecycler { + + } setContentView(R.layout.sample) } diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/PermissionCheckbox.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/PermissionCheckbox.kt new file mode 100644 index 0000000..012d523 --- /dev/null +++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/PermissionCheckbox.kt @@ -0,0 +1,20 @@ +package ca.allanwang.kau.sample + +import android.support.v7.widget.RecyclerView +import android.view.View +import android.widget.CheckBox +import android.widget.TextView +import ca.allanwang.kau.iitems.KotlinIItem +import ca.allanwang.kau.utils.bindView + +/** + * Created by Allan Wang on 2017-07-03. + */ +class PermissionCheckbox(val permission: String) : KotlinIItem<PermissionCheckbox, PermissionCheckbox.ViewHolder>( + R.layout.permission_checkbox, R.layout.permission_checkbox, { ViewHolder(it) }) { + + class ViewHolder(v: View) : RecyclerView.ViewHolder(v) { + val text: TextView by bindView(R.id.perm_text) + val checkbox: CheckBox by bindView(R.id.perm_checkbox) + } +}
\ No newline at end of file |