- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
由于 TwoLineListItem 自 API 17 起已被弃用,因此我已采取措施将其替换为自定义 XML 和 ViewHolder。但是,我真的希望我的应用程序看起来与使用 TwoLineListItem 时完全相同(因为它是应用程序的重要组成部分)。因此,我想知道是否可以找到 Android 使用的最新 TwoLineListItem 的 XML 源代码(我找到的所有源代码都已过时),或者我是否必须基本上进行反复试验?
最佳答案
我不确定您在寻找什么。 TwoLineListItem
是一个简单的小部件,它使用一个布局,如果您在 SDK/platforms/android-x/data 中搜索
。这是layout
文件夹,您可以轻松查看该布局/res/布局Jelly Bean
的一个:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView android:id="@android:id/text1"
android:textSize="16sp"
android:textStyle="bold"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<TextView android:id="@android:id/text2"
android:textSize="16sp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
小部件的代码是 very simple to replicate .
关于java - TwoLineListItem 源代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14103417/
由于 TwoLineListItem 自 API 17 起已被弃用,因此我已采取措施将其替换为自定义 XML 和 ViewHolder。但是,我真的希望我的应用程序看起来与使用 TwoLineList
我想做一个这样的设置菜单: 是否有关于如何在任何地方制作 TwoLineListItem 的权威指南? 最佳答案 您需要使用带有自定义适配器的自定义列表行。 举个例子: http://geekswit
我有一个由 TwoLineListItems 填充的 Activity ,我希望能够单击它们转到另一个 Activity 并显示与 TwoLineListItem 关联的信息的更深入 View 。我是
我是 android 开发的新手,正在尝试创建一个标题为粗体的列表 以及每个项目的较小描述。就像这里显示的那样(抱歉还不能发布图片): http://i.stack.imgur.com/UVqzq.p
我注意到自 API 17 起已弃用 TwoLineListItem。如果我按如下方式设置 ListActivity 适配器,还有什么替代方案?: ArrayAdapter adapter = new
我正在尝试创建一个 ListView,其中的项目有两行文本,一行的字体比另一行大。 TwoLineListItem 似乎是我需要的,但每当我尝试运行这样的 Activity 时,应用程序就会崩溃。有什
我是一名优秀的程序员,十分优秀!