android:shape="oval" >
android:height="50dp"/>
布局xml文件中使用imageview控件
(2)绘制直线
android:shape="line" >
android:color="#ff0000" //颜色
android:dashWidth="2dp" //虚线的线段长度
android:dashGap="3dp"/> //虚线的间隔长度
(3)绘制矩形
android:shape="rectangle" >
android:angle="45" //渐变角度 45的整数倍
android:centerColor="#00ff00" //渐变颜色
android:endColor="#0000ff"
android:startColor="#ff0000" />
//纯色
android:height="100dp"
android:width="50dp" />
//圆角
(4)使用自定义字体
TextView textView = (TextView) findViewById(R.id.textView2);
Typeface tf = Typeface.createFromAsset(getAssets(),
"fonts/samplefont.ttf");
//读取****字体****textView.setTypeface(tf);//设置****字体****