Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90dcc208 authored by Edgar Wang's avatar Edgar Wang
Browse files

[Expressive design] Add expandable preference

Bug: 367539940
Test: manual
Flag: EXEMPT resource only update

Change-Id: I94c9f277294477c05c0f430a0302b1f4690bf7b0
parent 3b5125b3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ android_library {
        "SettingsLibDisplayUtils",
        "SettingsLibEmergencyNumber",
        "SettingsLibEntityHeaderWidgets",
        "SettingsLibExpandablePreference",
        "SettingsLibFooterPreference",
        "SettingsLibHelpUtils",
        "SettingsLibIllustrationPreference",
+33 −0
Original line number Diff line number Diff line
package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "frameworks_base_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["frameworks_base_license"],
}

android_library {
    name: "SettingsLibExpandablePreference",
    use_resource_processor: true,
    defaults: [
        "SettingsLintDefaults",
    ],

    srcs: [
        "src/**/*.java",
        "src/**/*.kt",
    ],
    resource_dirs: ["res"],

    static_libs: [
        "androidx.annotation_annotation",
        "androidx.preference_preference",
        "SettingsLibSettingsTheme",
    ],
    sdk_version: "system_current",
    min_sdk_version: "21",
    apex_available: [
        "//apex_available:platform",
    ],
}
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2020 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.
  -->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.android.settingslib.widget.preference.expandable">

    <uses-sdk android:minSdkVersion="21" />

</manifest>
+37 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2024 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.
  -->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape
            android:shape="oval">
            <size android:width="32dp" android:height="40dp"/>
            <solid android:color="@color/settingslib_materialColorSurfaceContainer"/>
        </shape>
    </item>
    <item>
        <vector
            android:width="32dp"
            android:height="40dp"
            android:viewportWidth="32"
            android:viewportHeight="40">
            <path
                android:pathData="M16,23.063L11,18.063L12.063,17L16,20.938L19.938,17L21,18.063L16,23.063Z"
                android:fillColor="@color/settingslib_materialColorOnSurface"/>
        </vector>
    </item>
</layer-list>
 No newline at end of file
+29 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2024 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:orientation="vertical">

    <ImageView
        android:id="@+id/expand_icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/settingslib_ic_expand"/>
</LinearLayout>
 No newline at end of file
Loading