gpt4 book ai didi

java - TwoLineListItem 源代码

转载 作者:行者123 更新时间:2023-12-02 00:04:38 28 4
gpt4 key购买 nike

由于 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/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com