Open Ahmad-b1995 opened 4 years ago
What happens to textview? Can you give me more details?
Thanks for replying Mark
this is the picture that I want:
but I get this result:
and when I turn on "show layout bounds" in developer setting of my phone, it seems that the textView is not in the wrapper and comes after the jammed wrapper to the left of it:
here's my makeView code:
` override fun makeView(parent: InfiniteBannerView?): View {
val textView = TextView(parent!!.context)
textView.text = "infinite banner"
textView.textSize = 22.0F
textView.setTextColor(Color.WHITE)
return textView}`
I tried padding & centering gravity & ... but no luck. thanks for helping & your banner library
Try adding these lines inside the mothed makeView:
textView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
textView.setGravity(Gravity.CENTER);
hi imageViews get centered inside wrapper but not textView, thanks for your great "infinite banner"