« setBackgroundDrawable和setBackgroundColor的用法 时间:2024-3-2 18:37 作者:韩俊 分类: Android 1.设置背景图片; textView.setBackgroundDrawable(getResources().getDrawable(R.drawable.guohou)); 2.转换字符串为int(颜色); listItemView.deleteFilghtBg.setBackgroundColor(Color.parseColor("#F5F5DC")); 标签: android 上一篇Android开发之Toast 下一篇Android的事件处理机制 热门推荐 1 Android Cursor源码笔记(1)2 Android13新功能有哪些3 AndroidのScrollView中嵌套ListView时显示一行解决方法4 安卓屏幕适配(各种方案组合)5 Android匿名内存怎么实现6 Android 四种点击事件7 Android如何自定义一个View(一)8 Andriod的国际化-android学习之旅(五十八)9 Android开发之时间刻度盘10 android studio,gradle的问题