How to change the background color of a TableRow when focused?

前端 未结 3 1348
情话喂你
情话喂你 2020-12-18 14:28

I have a table row and I tried many things to change its color when it\'s focused, but it never changes color when focused. Is there any way to do this? I tried this also wh

3条回答
  •  不思量自难忘°
    2020-12-18 15:09

    To everyone with the "resource not found" error for yellow, just make your own yellow:

    Create a file:

     Project
      -> res
        -> values
          - colors.xml
    

    And put this in the file:

     
     
       #FFFF00
     
    

    Then change the places in XML that reference yellow to read like this:

    android:drawable="@color/yellow"
    

提交回复
热议问题