Android修改Gallery页面布局
16lz
2021-01-23
在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 });
更多相关文章
- andriod RelativeLayout布局居中
- Android 实现显示文字的Gallery
- Android百分比布局:PercentFrameLayout
- Android布局属性说明
- C#给图片增加文字实例代码
- ItemsControl 的布局控件实例
- C#如何在图片增加文字的示例代码分享
- C#如何使用正则表达式来验证中文字符的案例
- C#中的正则表达式如何验证中文字符的实例