How to highlight ImageView when focused or clicked?

前端 未结 10 1419
余生分开走
余生分开走 2020-12-02 08:34

A good example of this is either on the Twitter launch screen (the screen with the large icons that is seen when the application is first launch) or even just look at the ap

10条回答
  •  清歌不尽
    2020-12-02 09:32

    Only to complete Josh Clemm answer. You can also maintain the same image defined by src, but change or highlight only the background. This would more or less like this:

    logo_box.xml

    
        
        
    
    

    And then defining the background of your button as logo_box:

    
    

    Where background_normal and background_pressed can be as complex as you want, or as simple as a @color :)

提交回复
热议问题