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

Commit c21a3ffb authored by Chihhang Chuang's avatar Chihhang Chuang
Browse files

[1/n] Move new picker logic to AOSP

- Dark/light Theme.
- Themed Icon.
- App Grid.

Bug: 190354625
Test: Build and run the app.
Change-Id: I54c7c3897568019326b827091270091bc114611c
parent 310824f4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -54,8 +54,9 @@ android_app {

    static_libs: [
        "wallpaper-common-deps",
        "styleprotoslite",
        "SettingsLibSettingsTheme",
        "SystemUI-statsd",
        "styleprotoslite",
    ],

    srcs: [
+10 −0
Original line number Diff line number Diff line
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24"
    android:tint="?attr/colorControlNormal">
  <path
      android:fillColor="?android:textColorPrimary"
      android:pathData="M22,9L22,7h-5L17,2h-2v5L9,7L9,2L7,2v5L2,7v2h5v6L2,15v2h5v5h2v-5h6v5h2v-5h5v-2h-5L17,9h5zM15,15L9,15L9,9h6v6z"/>
</vector>
+31 −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.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    android:color="?android:attr/colorControlHighlight">
    <item android:id="@+id/systempalettecolor">
        <shape android:shape="rectangle">
            <solid android:color="?androidprv:attr/colorSurface"/>
            <corners android:radius="@dimen/option_tile_radius" />
        </shape>
    </item>
    <item android:id="@android:id/mask">
        <shape android:shape="rectangle">
            <solid android:color="?androidprv:attr/colorSurface"/>
            <corners android:radius="@dimen/option_tile_radius" />
        </shape>
    </item>
</ripple>
+55 −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.
-->
<com.android.customization.picker.grid.GridSectionView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?selectableItemBackground"
    android:clickable="true"
    android:paddingTop="@dimen/section_top_padding"
    android:paddingHorizontal="@dimen/section_horizontal_padding"
    android:orientation="horizontal">

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:orientation="vertical">

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/grid_title"
            style="@style/SectionTitleTextStyle" />

        <TextView
            android:id="@+id/grid_section_description"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            style="@style/SectionSubtitleTextStyle"/>
    </LinearLayout>

    <ImageView
        android:id="@+id/grid_section_tile"
        android:layout_width="@dimen/option_tile_width"
        android:layout_height="@dimen/option_tile_width"
        android:scaleType="center"
        android:src="@drawable/ic_grid_24px"
        android:background="@drawable/option_border_color"
        android:contentDescription="@string/gird_picker_entry_content_description" />

</com.android.customization.picker.grid.GridSectionView>
 No newline at end of file
+44 −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.
-->
<com.android.customization.picker.mode.ModeSectionView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?selectableItemBackground"
    android:clickable="true"
    android:gravity="center_vertical"
    android:orientation="horizontal"
    android:paddingVertical="@dimen/section_vertical_padding"
    android:paddingHorizontal="@dimen/section_horizontal_padding">

    <TextView
        android:id="@+id/dark_mode_toggle_title"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:text="@string/mode_title"
        style="@style/SectionTitleTextStyle" />

    <Switch
        android:id="@+id/dark_mode_toggle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:clickable="false"
        android:focusable="false"
        style="@style/Switch.SettingsLib" />

</com.android.customization.picker.mode.ModeSectionView>
Loading