Is it possible to extend a ViewFlipper
as a custom View
so that i could set an xml attribute for the first page to show in the preview?
To see if it works i tried an example that should show the third page in the preview, but it doesn't work. This is the example in kotlin:
class ViewFlipperEng: ViewFlipper {
constructor(context: Context): super(context) {
init(context)
}
constructor(context: Context, attrs: AttributeSet): super(context, attrs) {
init(context)
}
private fun init(cxt: Context) {
displayedChild = 2
invalidate()
//also tried showNext or showPrevious
}
}