wck
06/12/2018, 12:38 AMpgreze
06/12/2018, 9:47 AMpgreze
06/12/2018, 9:48 AMpgreze
06/12/2018, 9:48 AMpgreze
06/12/2018, 9:49 AMwck
06/13/2018, 5:43 AMkotlinx.android.synthetic
when the view is in library?pgreze
06/13/2018, 7:18 AM<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:parentTag="io.zla.android.ui.widget.UserHeadersView">
<TextView
android:id="@+id/userCoverImage"
...>
Custom view in library:
class UserHeadersView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
) : ShimmerLayout(context, attrs, defStyle) {
init {
context.layoutInflater.inflate(R.layout.layout_user_headers, this)
}
val coverImage: TextView = findViewById(R.id.userCoverImage)
Layout in app:
<my.package.UserHeadersView
android:id="@+id/myUserHeadersView"
Client in app:
myUserHeadersView.coverImage.setDrawableXXX(....)
pgreze
06/13/2018, 7:20 AM