-2

I am using 2 LinearLayout and 2 buttons each inside the Linear layout. When i do a particular operation i need to change the background resource of the Linear layout and change the text of the button inside these layouts.

I use the command setBackgroundResource(R.drawable.someResource) and use setText("some text"). The text for the button is updated correctly. But the background of the LinearLayout is not updated always. Most of the cases it works correctly, but in between its not updated. The change is not reflected correctly in UI some times. There is nothing wrong with the code code is executing correctly with out any exception. But the UI is not updated.

Kiran k g
  • 726
  • 8
  • 17

1 Answers1

1

For those who down voted for this question. I used android:layerType="software" in the layout which contained my 2 LinearLayouts and that fixed my issue. Got the fix from the following issue ticket https://issuetracker.google.com/issues/36945767

Kiran k g
  • 726
  • 8
  • 17