Skip to content
Advertisement

Tag: android-layout

Why is the content of CardView inside a RecyclerView (in my case) changing when I scroll?

I have the same question like this post “Cardview’s data are changed while scrolling RecyclerView”. But taking out the statics isn’t working. Context of what I am doing: I am adding a couple of buttons inside a FlexboxLayout and again inside a CardView (CardView inside a RecyclerView). Buttons are being added dynamically. The same thing happens with a couple of

Dynamically add chips to chipgroup

I’m trying to add several chips to the chip group dynamically. The first one appears fine but others do not appear properly. But when I do it using XML it works fine. activity_main.xml In MainActivity.java style.xml standalone_chip.xml Answer In your main activity you are doing like this. Notice you are creating a new instance of chip i.e chip2 but you

IllegalArgumentException When trying to use @style/Widget.MaterialComponents.TextInputLayout.OutlinedBox

I am trying to stylize the TextInputLayout with an outline. But when I try to use @style/Widget.MaterialComponents.TextInputLayout.OutlinedBox in style attribute my app crashes with this exception: Here is the TextInputLayout theme I want to use OutlinedBox It was working fine but suddenly this error appeared during development Global App Theme Answer As reported in the error: Caused by: java.lang.IllegalArgumentException: The

Transparent EditText Android Studio

I am trying to make my EditText in my android studio project transparent. I want it to look like the EditText here But mine doesn’t look like that even though I have tried using transparent and ffffff can someone please help me with this ? I want my edit text background to look like the one in the image I

Advertisement