Android 实现显示文字的Gallery的基础上,修改了文字的样式,效果如下:

Android修改Gallery页面布局

方法如下,增加了布局文件:

<textview xmlns:android="[url=http://schemas.android.com/apk/res/android]http://schemas.android.com/apk/res/android[/url]"     android:id="@android:id/text1"     android:textAppearance="?android:attr/textAppearanceMedium"     android:textColor="#FFFF0000"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:maxLines="1"     android:textSize="30sp" />

然后修改Activity中Adapter,如下:

SpinnerAdapter spinnerAdapter = new SimpleAdapter(this,getData(),                 R.layout.myfont_layout,                 new String[] {"mydata"},new int[] { android.R.id.text1 }); 

更多相关文章

  1. andriod RelativeLayout布局居中
  2. Android 实现显示文字的Gallery
  3. Android百分比布局:PercentFrameLayout
  4. Android布局属性说明
  5. C#给图片增加文字实例代码
  6. ItemsControl 的布局控件实例
  7. C#如何在图片增加文字的示例代码分享
  8. C#如何使用正则表达式来验证中文字符的案例
  9. C#中的正则表达式如何验证中文字符的实例

随机推荐

  1. 阻塞队列 BlockingQueue
  2. redis集群教程(二)
  3. 由浅入深,走进Python装饰器-----第五篇:
  4. SharePoint 解决方案:如何获取Library或者
  5. 希尔排序就这么简单
  6. Druid数据库连接池就是这么简单
  7. Ruby和Python哪个更强大?学习分析
  8. Java面试题全集(12)
  9. 面试官:什么是CSRF?(你的钱为什么被转走,这篇
  10. 2020年5A PMP 经验分享