正确使用twoLineListItem的Andr​​oid正确、twoLineListItem、oid、Andr

由网友(厌我你滚啊)分享简介:我是新来的开发在Android和试图创建具有一个大胆的标题名单并为每个项目较小描述。这里所示(抱歉无法张贴图片还)之一:http://i.stack.imgur.com/UVqzq.png 这是我要开始使用XML:I am new to development on android and trying to...

我是新来的开发在Android和试图创建具有一个大胆的标题名单 并为每个项目较小描述。 这里所示(抱歉无法张贴图片还)之一: https://p.xsw88.cn/allimgs/daicuo/20230906/1261.png 这是我要开始使用XML:

I am new to development on android and trying to create a list that has a bold header and a smaller description for each item. Like the one shown here (sorry can't post images yet): https://p.xsw88.cn/allimgs/daicuo/20230906/1261.png This is the XML that I have to start with:

<LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TwoLineListItem android:layout_width="fill_parent"
android:layout_height="wrap_content" android:mode="twoLine">
<TextView android:textAppearance="?android:attr/textAppearanceLarge"
android:id="@android:id/text1" android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextView android:layout_below="@android:id/text1"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_alignLeft="@android:id/text1" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:id="@android:id/text2" />
</TwoLineListItem>
</LinearLayout> 

有没有一种方法来填充从另一个XML文件中的数组列表?如果不是我将如何填充这样的名单从Java code?就像我说我是新来的发展,所以我可能路要走。感谢您的任何输入!

Is there a way to populate the list from an array in another xml file? If not how would I populate a list like this from the Java code? Like I said I'm new to development, so I'm probably way off. Thanks for any input!

推荐答案

您使用列表视图的 http://developer.android.com/reference/android/widget/ListView.html

阅读全文

相关推荐

最新文章