當前位置:
首頁 >
代码设置按钮样式的方法
發布時間:2025/7/14
45
豆豆
生活随笔
收集整理的這篇文章主要介紹了
代码设置按钮样式的方法
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
2019獨角獸企業重金招聘Python工程師標準>>>
StateListDrawable states = new StateListDrawable();states.addState(new int[] {android.R.attr.state_pressed},
? ? getResources().getDrawable(R.drawable.pressed));
states.addState(new int[] {android.R.attr.state_focused},
? ? getResources().getDrawable(R.drawable.focused));
states.addState(new int[] { },
? ? getResources().getDrawable(R.drawable.normal));
imageButton.setImageDrawable(states);
轉載于:https://my.oschina.net/f839903061/blog/138938
總結
以上是生活随笔為你收集整理的代码设置按钮样式的方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: spring mybatis 集成
- 下一篇: 应用按home键无最近应用