笔记 -- 08 -- 改变shap背景设置

来源:互联网 发布:谷歌开源图片压缩算法 编辑:程序博客网 时间:2024/06/01 09:50

01、通过Drawable的方式改变shap背景颜色

        // 以 shap 作为背景,改变 shap 的背景颜色        TextView test = (TextView) findViewById(R.id.tv_test);        GradientDrawable drawable = (GradientDrawable) test.getBackground();        drawable.setColor(Color.GREEN);        drawable.setAlpha(120);        test.setBackgroundDrawable(drawable);


阅读全文
0 0
原创粉丝点击