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

Commit 93b34eb2 authored by Edgar Wang's avatar Edgar Wang
Browse files

[Expressive design] Add StatusBannerPreference

Bug: 367537747
Test: manual
Flag: EXEMPT resource only update
Change-Id: I4d5a22fc1db09a31a10de56cf8f7c642e0807b9b
parent 41fb975b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ android_library {
        "SettingsLibSettingsSpinner",
        "SettingsLibSettingsTransition",
        "SettingsLibSliderPreference",
        "SettingsLibStatusBannerPreference",
        "SettingsLibTopIntroPreference",
        "SettingsLibTwoTargetPreference",
        "SettingsLibUsageProgressBarPreference",
+11 −0
Original line number Diff line number Diff line
@@ -335,4 +335,15 @@
        <item name="android:textSize">14sp</item>
        <item name="android:textColor">?android:attr/colorAccent</item>
    </style>

    <style name="SettingsLibStatusBannerCardStyle">
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:layout_marginHorizontal">?android:attr/listPreferredItemPaddingStart</item>
        <item name="android:layout_marginVertical">@dimen/settingslib_expressive_space_extrasmall4</item>
        <item name="cardBackgroundColor">@color/settingslib_materialColorSurfaceBright</item>
        <item name="cardCornerRadius">@dimen/settingslib_expressive_radius_extralarge2</item>
        <item name="cardElevation">0dp</item>
        <item name="rippleColor">?android:attr/colorControlHighlight</item>
    </style>
</resources>
 No newline at end of file
+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: "SettingsLibStatusBannerPreference",
    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: "24",
    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.statusbanner">

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

</manifest>
+21 −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.
  -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">
    <size android:height="68dp" android:width="68dp" />
    <solid android:color="@color/settingslib_materialColorSurfaceContainerHigh" />
</shape>
Loading