I have a TabLayout. In that I have a tablelayout with dynamically added rows.
When a TableRow is selected/clicked I want to set its background color to the Pressing or Clicked color of Tab.
I don’t want to set any static color but want to use the default theme color. How to get the color info of Tablayout ?
How to handle the left and right side of the tabs ? This is what I get begore and after setting the tab_background.xml as th backgroundRsourse for all tabs :

On the left hand side, both the images are without any settings, but the right and left corners are smooth.
On right hand side, both images are with setings, see the corners of selected tabs are just a square, they should be rounded off or smoth like the ones without any settings.
It seems I got to use tab_selected_bar_right and tab_selected_bar_left. I have copied them to my drawable, but can’t make out how do I use them. What settings to give int the xml below provided by @mudit.
Please guide me. Any help is highly appreciated. I am in a hurry.
Thanks
Am solved with this issue. I apology for not mentioning it earlier. Sorry, I just missed out.
@Yugandhar, Thanks for your interest.