skip to Main Content

I have a fragment container view that changes the fragment based on the selection in a spinner. I want the fragments to have rounded corners. I believe adding rounded corners to fragmentContainerView will do what I need? How can I do this? I tried adding a drawable resource file(shape) to background but it didn’t work.

My drawable resource file

My drawable.xml file

My activity.xml code

My activity.xml code

The way it still shows in the app. The red part is the FragmentContainerView

The way it still shows in the app

2

Answers


  1. Chosen as BEST ANSWER

    I found out that in order for the drawable resource file to take effect, it must contain the tag <solid> with a color attribute. Then it displays as required


  2. CustomerRegisterFragment have it‘s own background which will cover the FragmentContainerView background you set.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search