背景及边框处理
1.android:addStatesFromChildren="true"
Sets whether this ViewGroup's drawablestates also include its children's drawablestates
2.android:background="@android:drawable/edit_text" 编辑框的白的背景
3.android:textAppearance="?android:attr/textAppearanceLargeInverse" 大字体
4.android:background="@null" 不设置背景
5.android:background="@android:drawable/editbox_background"
编辑框背景 固定边框,不会变色
android:background="@android:drawable/editbox_background"
另一种背景
6.键盘不会全屏
textView.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
7.android:background="@android:drawable/dialog_frame" 系统dialog带边框的背景
8. EditTextet;
et.setError("hh", getResources().getDrawable(R.drawable.icon))
9.<TextView
style="?android:attr/listSeparatorTextViewStyle"
android:text="@string/listSeparatorTextViewStyle"
android:layout_marginTop="5dip"
/>
分割线效果
10.代码中设置指定单位的字体
warnView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18);
更多相关文章
- 如何实现Android 布局背景模糊化处理
- 去掉Button的默认背景
- Button或者ImageButton的背景设为透明或者半透明
- android实现标题栏、状态栏图标文字颜色及背景动态变化
- 自定义类似于listView中Item背景