<style name="DavidStyleText2">
<item name="android:textSize">14sp</item>
<item name="android:textColor">#FF7F7C</item>
<item name="android:fromAlpha">0.0</item>
<item name="android:toAlpha">0.0</item>
</style>

这样可以样式化定义,就像css一样可以分离

在TextView中是这样的

<TextView
style="@style/DavidStyleText1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|center_horizontal"
android:text="@string/str_text_view1"
/>

更多相关文章

  1. android中如何自定义标题栏
  2. Android(安卓)关键资源的定义和使用
  3. Android(安卓)应用启动时去掉应用图标
  4. Android(安卓)OpenGL ES 开发教程(6):GLSurfaceView
  5. Android(安卓)自定义View
  6. Android中自定义checkbox样式
  7. Android(安卓)ApiDemos示例解析(166):Views->Layouts->TableLayo
  8. Android(安卓)ProgressBar 自定义动画

随机推荐

  1. Android(安卓)Container原理分析
  2. 避免内存泄露
  3. Android系列教程之七:EditText使用详解-包
  4. ( 转)关于Android的nodpi,xhdpi,hdpi,mdp
  5. findViewById()使用常见错误
  6. Android应用程序启动过程源代码分析
  7. UI控件之显示文本控件TextView(上)
  8. Android(安卓)设置默认桌面,默认应用,辅
  9. Android(安卓)Matrix
  10. Android(安卓)动态加载APK--代码安装、获