aboutsummaryrefslogtreecommitdiff
path: root/sample/src/main/kotlin/ca
diff options
context:
space:
mode:
Diffstat (limited to 'sample/src/main/kotlin/ca')
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt9
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/PermissionCheckbox.kt20
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