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

Commit f23466ea authored by Santiago Etchebehere's avatar Santiago Etchebehere
Browse files

[ThemePicker] Add bottom navbar to main activity

Set up the basic layout and add a bottom nav bar to
CustomizationPickerActivity, with basic support for
switching between section fragments.
(Fragments to be added in a separate CL)

Bug: 120560581
Change-Id: I06832260d20ca2938b6c04e110fadf45bc3070a2
parent cca6d496
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -8,14 +8,14 @@
        android:hardwareAccelerated="true"
        android:hardwareAccelerated="true"
        android:icon="@mipmap/product_logo_wallpapers_launcher_color_48"
        android:icon="@mipmap/product_logo_wallpapers_launcher_color_48"
        android:label="@string/app_name"
        android:label="@string/app_name"
        android:theme="@style/WallpaperTheme"
        android:theme="@style/CustomizationTheme"
        android:requiredForAllUsers="true"
        android:requiredForAllUsers="true"
        android:restoreAnyVersion="true"
        android:restoreAnyVersion="true"
        android:supportsRtl="true">
        android:supportsRtl="true">


        <activity android:name="com.android.theme.picker.ThemePickerActivity"
        <activity android:name="com.android.theme.picker.ThemePickerActivity"
            android:label="@string/app_name"
            android:label="@string/app_name"
            android:theme="@style/WallpaperTheme"
            android:theme="@style/CustomizationTheme.NoActionBar"
            android:resizeableActivity="true">
            android:resizeableActivity="true">
            <intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SET_WALLPAPER"/>
                <action android:name="android.intent.action.SET_WALLPAPER"/>
+24 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2018 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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:state_checked="true"
        android:color="@color/accent_color" />
    <item
        android:state_checked="false"
        android:color="@color/material_grey500" />
</selector>
 No newline at end of file
+13 −0
Original line number Original line Diff line number Diff line
<!-- TODO (santie): replace with correct asset once available -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24">
    <path
        android:fillColor="#FF000000"
        android:pathData="M12,2C6.48,2 2,6.48 2,12c0,5.52 4.48,10 10,10s10,-4.48 10,-10C22,6.48 17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8c0,-4.41 3.59,-8 8,-8s8,3.59 8,8C20,16.41 16.41,20 12,20z"/>
    <path
        android:fillColor="#FF000000"
        android:pathData="M6.5,17.5l7.51,-3.49L17.5,6.5L9.99,9.99L6.5,17.5zM12,10.9c0.61,0 1.1,0.49 1.1,1.1s-0.49,1.1 -1.1,1.1s-1.1,-0.49 -1.1,-1.1S11.39,10.9 12,10.9z"/>
</vector>
+37 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2018 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.
-->
<androidx.coordinatorlayout.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <FrameLayout
        android:id="@+id/fragment_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <com.google.android.material.bottomnavigation.BottomNavigationView
        style="@style/BottomNavStyle"
        android:id="@+id/main_bottom_nav"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        app:labelVisibilityMode="labeled"
        app:menu="@menu/bottom_navigation_menu"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+35 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2018 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.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- TODO (santie): replace icons with real ones when available -->
    <item
        android:id="@+id/nav_theme"
        android:title="@string/theme_title"
        android:icon="@drawable/ic_nav_theme" />
    <item
        android:id="@+id/nav_clock"
        android:title="@string/clock_title"
        android:icon="@drawable/ic_nav_theme" />
    <item
        android:id="@+id/nav_grid"
        android:title="@string/grid_title"
        android:icon="@drawable/ic_nav_theme" />
    <item
        android:id="@+id/nav_wallpaper"
        android:title="@string/wallpaper_title"
        android:icon="@drawable/ic_nav_theme" />
</menu>
 No newline at end of file
Loading