<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:padding="10dp">
<ListView
android:id="@+id/personLV"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<TextView android:id="@+id/idTV"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="1"
android:textSize="20sp"/>
<TextView android:id="@+id/nameTV"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="张三"
android:textSize="20sp"/>
<TextView android:id="@+id/balanceTV"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="50000"
android:textSize="20sp"/>
</LinearLayout>
Android开发 ——线性布局文件、TextView、ListView的基本写法
最新推荐文章于 2023-09-18 09:16:21 发布
本文深入探讨了Android应用开发中 ListView、TextView 和其他关键组件的使用技巧,详细介绍了它们在布局设计、数据展示和用户体验提升等方面的作用。通过实例分析,帮助开发者更好地理解和运用这些技术,构建高效、易用的Android应用程序。
1万+

被折叠的 条评论
为什么被折叠?



