Android UI Component Catalog
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.kazutoyo:UIComponentCatalog:0.0.+'
}
class MainActivity : ComponentCatalogActivity() {
override fun createCollections(): List<ComponentCatalogCategory> {
return listOf(
ComponentCatalogCategory("Image", listOf(
ComponentCatalogSubCategory("Icon", listOf(
object : ComponentItem("Circle Icon") {
override fun buildItem(): View {
return IconImageView(this@MainActivity).apply {
setImageResource(R.drawable.sample)
}
}
}
))
))
)
}
}
<activity
android:name="jp.kazutoyo.uicomponentcatalogsample.MainActivity"
android:theme="@style/Theme.AppCompat.NoActionBar">