Android 小部件的资源或名称是什么:TextView +圆圈

发布于 2024-12-28 09:23:50 字数 196 浏览 0 评论 0原文

以下 Android 小部件的资源 (android.R....) 或名称是什么?

它既不是 RadioButton 也不是 ExpandableList

屏幕截图

What is the ressource (android.R.…) or name of the following Android widget?

It is neither a RadioButton nor an ExpandableList.

Screenshot

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

深海蓝天 2025-01-04 09:23:50

http://www.kaloer.com/android-preferences 阅读此内容。如果您谈论的是“振动”设置屏幕,那么它就是 Android 设置菜单中的“首选项屏幕”。它允许您创建具有不同类型首选项的设置列表,例如 CheckBoxPreference、ListPreference、EditTextPreference 等。
使用的课程:

import android.preference.CheckBoxPreference;
import android.preference.EditTextPreference;
import android.preference.Preference;
import android.preference.PreferenceCategory;
import android.preference.PreferenceScreen;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceActivity;

干杯

http://www.kaloer.com/android-preferences read this. If you are talking about the Vibration settings screen it is the PreferenceScreen in the android settings menu. It lets you to create a list of settings with different kinds of preferences such as CheckBoxPreference,ListPreference,EditTextPreference and so on.
Classes used :

import android.preference.CheckBoxPreference;
import android.preference.EditTextPreference;
import android.preference.Preference;
import android.preference.PreferenceCategory;
import android.preference.PreferenceScreen;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceActivity;

Cheers

远山浅 2025-01-04 09:23:50

它应该是一个 ExpandableList,为什么这个定义是这样的:
http://developer.android.com/reference/android/widget/ExpandableListView.html

具体来说,这个视图在 android.R 中找不到,因为它不需要在那里。它只是一个应用于 ListView 的特殊项目,告诉用户该项目有要显示的子项目。

文档中的片段:

显示垂直滚动两级列表中的项目的视图。这
与 ListView 的不同之处在于允许两个级别:可以
单独展开以显示其子项。这些物品来自
ExpandableListAdapter 与此视图关联。

it should be an ExpandableList, why this very definition it is that:
http://developer.android.com/reference/android/widget/ExpandableListView.html.

Specifically this view is NOT found in the android.R because it doesn't need to be there. Its simply a Special Item that is applied to a ListView that tells the user that this item has children to display.

A snippet from the documentation:

A view that shows items in a vertically scrolling two-level list. This
differs from the ListView by allowing two levels: groups which can
individually be expanded to show its children. The items come from the
ExpandableListAdapter associated with this view.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文