您的位置:首页 > 移动开发 > Android开发

Android修改Gallery页面布局

2011-06-15 14:37 441 查看
Android 实现显示文字的Gallery的基础上,修改了文字的样式,效果如下:



方法如下,增加了布局文件:
<textview xmlns:android="http://schemas.android.com/apk/res/android"       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 });


本文出自 “Android小子的” 博客,请务必保留此出处http://androidrigl.blog.51cto.com/7531835/1249449
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: