« 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 UI-开源框架ImageLoader的完美例子(异步加载大量图片)2 sed + grep 解决 Android docs 打开慢的问题3 Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent错误的记录。4 Android RecyclerView 动画展开item显示详情5 Android单选多选按钮怎么使用6 Android 子线程 更新 UI 界面 总结7 使用ScrollView属性fillViewport解决android布局不能撑满全屏的问题8 Android 让EditText失去焦点避免自动弹出输入法9 android:Background线程池和UiThread线程池10 Android startActivities()的使用