Loading packages/SettingsLib/FooterPreference/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ android_library { static_libs: [ "androidx.annotation_annotation", "androidx.preference_preference", "SettingsLibSettingsTheme", ], sdk_version: "system_current", min_sdk_version: "21", Loading packages/SettingsLib/FooterPreference/res/layout/preference_footer.xml 0 → 100644 +54 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2021 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="?android:attr/listPreferredItemHeight" android:paddingStart="?android:attr/listPreferredItemPaddingStart" android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" android:background="?android:attr/selectableItemBackground" android:clipToPadding="false"> <LinearLayout android:id="@+id/icon_frame" android:layout_width="wrap_content" android:layout_height="wrap_content" android:minWidth="56dp" android:gravity="start|top" android:orientation="horizontal" android:paddingEnd="12dp" android:paddingTop="16dp" android:paddingBottom="4dp"> <ImageView android:id="@android:id/icon" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </LinearLayout> <com.android.settingslib.widget.LinkTextView android:id="@android:id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingBottom="16dp" android:paddingTop="16dp" android:maxLines="10" android:textColor="?android:attr/textColorSecondary" android:ellipsize="marquee" /> </LinearLayout> No newline at end of file packages/SettingsLib/FooterPreference/src/com/android/settingslib/widget/FooterPreference.java +2 −3 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.StringRes; import androidx.core.content.res.TypedArrayUtils; import androidx.preference.Preference; import androidx.preference.PreferenceViewHolder; Loading @@ -38,8 +37,7 @@ public class FooterPreference extends Preference { static final int ORDER_FOOTER = Integer.MAX_VALUE - 1; public FooterPreference(Context context, AttributeSet attrs) { super(context, attrs, TypedArrayUtils.getAttr( context, R.attr.footerPreferenceStyle, android.R.attr.preferenceStyle)); super(context, attrs, R.attr.footerPreferenceStyle); init(); } Loading Loading @@ -72,6 +70,7 @@ public class FooterPreference extends Preference { } private void init() { setLayoutResource(R.layout.preference_footer); if (getIcon() == null) { setIcon(R.drawable.ic_info_outline_24); } Loading packages/SettingsLib/src/com/android/settingslib/widget/LinkTextView.java→packages/SettingsLib/FooterPreference/src/com/android/settingslib/widget/LinkTextView.java +2 −2 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * Copyright (C) 2021 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading packages/SettingsLib/FooterPreference/res/values/attrs.xml→packages/SettingsLib/SettingsTheme/res/values/attrs.xml +0 −0 File moved. View file Loading
packages/SettingsLib/FooterPreference/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ android_library { static_libs: [ "androidx.annotation_annotation", "androidx.preference_preference", "SettingsLibSettingsTheme", ], sdk_version: "system_current", min_sdk_version: "21", Loading
packages/SettingsLib/FooterPreference/res/layout/preference_footer.xml 0 → 100644 +54 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2021 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="?android:attr/listPreferredItemHeight" android:paddingStart="?android:attr/listPreferredItemPaddingStart" android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" android:background="?android:attr/selectableItemBackground" android:clipToPadding="false"> <LinearLayout android:id="@+id/icon_frame" android:layout_width="wrap_content" android:layout_height="wrap_content" android:minWidth="56dp" android:gravity="start|top" android:orientation="horizontal" android:paddingEnd="12dp" android:paddingTop="16dp" android:paddingBottom="4dp"> <ImageView android:id="@android:id/icon" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </LinearLayout> <com.android.settingslib.widget.LinkTextView android:id="@android:id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingBottom="16dp" android:paddingTop="16dp" android:maxLines="10" android:textColor="?android:attr/textColorSecondary" android:ellipsize="marquee" /> </LinearLayout> No newline at end of file
packages/SettingsLib/FooterPreference/src/com/android/settingslib/widget/FooterPreference.java +2 −3 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.StringRes; import androidx.core.content.res.TypedArrayUtils; import androidx.preference.Preference; import androidx.preference.PreferenceViewHolder; Loading @@ -38,8 +37,7 @@ public class FooterPreference extends Preference { static final int ORDER_FOOTER = Integer.MAX_VALUE - 1; public FooterPreference(Context context, AttributeSet attrs) { super(context, attrs, TypedArrayUtils.getAttr( context, R.attr.footerPreferenceStyle, android.R.attr.preferenceStyle)); super(context, attrs, R.attr.footerPreferenceStyle); init(); } Loading Loading @@ -72,6 +70,7 @@ public class FooterPreference extends Preference { } private void init() { setLayoutResource(R.layout.preference_footer); if (getIcon() == null) { setIcon(R.drawable.ic_info_outline_24); } Loading
packages/SettingsLib/src/com/android/settingslib/widget/LinkTextView.java→packages/SettingsLib/FooterPreference/src/com/android/settingslib/widget/LinkTextView.java +2 −2 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * Copyright (C) 2021 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading
packages/SettingsLib/FooterPreference/res/values/attrs.xml→packages/SettingsLib/SettingsTheme/res/values/attrs.xml +0 −0 File moved. View file