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

前端 未结 3 1353
情话喂你
情话喂你 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 14:59

    You need to set the background color of your row to a state list drawable (that handles select, pressed, active, non-active).

    http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList

         
    
         
             
     
        
         
          
        
         
      
    

    try these links too, for ur problem

    http://www.gersic.com/blog.php?id=56

    http://developer.android.com/guide/topics/ui/themes.html

提交回复
热议问题