【发布时间】:2014-10-04 19:05:35
【问题描述】:
我创建了一个 ListView,它的条目是在 SQLite 查询中用一段时间生成的,除了我在代码中写的第一行。
这里是相关的 XML 文件:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/listview"
android:layout_height="wrap_content"
android:layout_width="match_parent">
</ListView>
</LinearLayout>
如何自定义仅更改ListView第一行的字体样式?
【问题讨论】:
-
在代码中添加标题视图并为其分配自定义布局。
-
我做到了,现在如何添加内容?
-
和往常一样,在你的添加布局中找到TextView的id,然后使用
setText()添加你要显示的文字。
标签: android listview customization except