读书人

背景及框子处理

发布时间: 2012-08-22 09:50:35 作者: rapoo

背景及边框处理



?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);

读书人网 >移动开发

热点推荐