android设置xml为背景颜色,android – 如何通过XML将textview的背景颜色设置为全息绿光?...
通过Java:TextView test = (TextView) view.findViewById(R.id.textView2);test.setBackgroundResource(context.getResources().getColor(android.R.color.holo_green_light));通过XML:android:text="2"android:textSize
·
通过Java:
TextView test = (TextView) view.findViewById(R.id.textView2);
test.setBackgroundResource(context.getResources().getColor(android.R.color.holo_green_light));
通过XML:
android:text="2"
android:textSize="200sp"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/textView2"
android:style="@style/textviewStyle"
android:background="@android:color/holo_green_light"
android:gravity="center"
android:textColor="#EEEEEE"
android:layout_alignParentRight="true" />
This是关于此主题的API页面
更多推荐
已为社区贡献3条内容
所有评论(0)