Android 集合视图小部件与动态壁纸开发指南
1. 集合视图小部件简介
集合视图小部件能以列表、网格或堆栈等形式展示数据集合。要使用集合视图小部件,需定义小部件布局和每个项目的布局。
1.1 小部件布局示例
以下是 Stack View Widget 的布局资源示例:
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- 其他视图 -->
</FrameLayout>
1.2 项目布局示例
每个卡片的 UI 布局如下:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FF555555">
<TextView
超级会员免费看
订阅专栏 解锁全文
40

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



