presence :呈现,显示;
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/presence_online" /> //呈现的是小圆点 绿色
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/presence_invisible" /> //显示的是灰色的小圆圈点。
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/presence_invisible" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/presence_invisible" />
</LinearLayout>
android:src="@android:drawable/presence_offline" (圆圈内带个小叉号)
本文介绍了一种使用LinearLayout布局来展示不同在线状态图标的方法,通过不同的Drawable资源文件(如presence_online, presence_invisible, presence_offline)来区分用户的在线、隐身及离线状态。
2353

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



