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

Commit 76e91c8c authored by Raff Tsai's avatar Raff Tsai Committed by Android (Google) Code Review
Browse files

Merge "Modify Settings homepage layout"

parents 2ced4caf 43a7b18f
Loading
Loading
Loading
Loading
+22 −22
Original line number Diff line number Diff line
@@ -29,22 +29,6 @@
            column="9"/>
    </issue>

    <issue
        id="HardCodedColor"
        severity="Error"
        message="Avoid using hardcoded color"
        category="Correctness"
        priority="4"
        summary="Using hardcoded color"
        explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
        errorLine1="        app:barPredictionColor=&quot;@color/material_empty_color_light&quot;"
        errorLine2="        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="res/layout/battery_history_chart.xml"
            line="38"
            column="9"/>
    </issue>

    <issue
        id="HardCodedColor"
        severity="Error"
@@ -2425,7 +2409,7 @@
        errorLine2="                                                                                                                                                                       ~~~~~~~~~~~~~~~~~~~">
        <location
            file="res/values-en-rXC/strings.xml"
            line="2559"
            line="2524"
            column="168"/>
    </issue>

@@ -2441,7 +2425,7 @@
        errorLine2="                                                               ~~~~~~~~~~~~~~~~~~~">
        <location
            file="res/values-en-rAU/strings.xml"
            line="2560"
            line="2525"
            column="64"/>
    </issue>

@@ -2457,7 +2441,7 @@
        errorLine2="                                                               ~~~~~~~~~~~~~~~~~~~">
        <location
            file="res/values-en-rCA/strings.xml"
            line="2560"
            line="2525"
            column="64"/>
    </issue>

@@ -2473,7 +2457,7 @@
        errorLine2="                                                               ~~~~~~~~~~~~~~~~~~~">
        <location
            file="res/values-en-rGB/strings.xml"
            line="2560"
            line="2525"
            column="64"/>
    </issue>

@@ -2489,7 +2473,7 @@
        errorLine2="                                                               ~~~~~~~~~~~~~~~~~~~">
        <location
            file="res/values-en-rIN/strings.xml"
            line="2560"
            line="2525"
            column="64"/>
    </issue>

@@ -2505,7 +2489,7 @@
        errorLine2="                                   ~~~~~~~~~~~~~~~~~~~">
        <location
            file="res/values/strings.xml"
            line="5898"
            line="5865"
            column="36"/>
    </issue>

@@ -2701,6 +2685,22 @@
            column="49"/>
    </issue>

    <issue
        id="HardCodedColor"
        severity="Error"
        message="Avoid using hardcoded color"
        category="Correctness"
        priority="4"
        summary="Using hardcoded color"
        explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
        errorLine1="        &lt;item name=&quot;android:navigationBarDividerColor&quot;>#1f000000&lt;/item>"
        errorLine2="                                                       ^">
        <location
            file="res/values/themes.xml"
            line="175"
            column="56"/>
    </issue>

    <issue
        id="HardCodedColor"
        severity="Error"
+25 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 The Android Open Source Project
<!--
     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.
@@ -13,12 +14,12 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<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="?android:attr/colorAccent"
      android:pathData="M4,13L4,13c0.55,0 1,-0.45 1,-1v0c0,-0.55 -0.45,-1 -1,-1h0c-0.55,0 -1,0.45 -1,1v0C3,12.55 3.45,13 4,13zM4,17L4,17c0.55,0 1,-0.45 1,-1v0c0,-0.55 -0.45,-1 -1,-1h0c-0.55,0 -1,0.45 -1,1v0C3,16.55 3.45,17 4,17zM4,9L4,9c0.55,0 1,-0.45 1,-1v0c0,-0.55 -0.45,-1 -1,-1h0C3.45,7 3,7.45 3,8v0C3,8.55 3.45,9 4,9zM7,13h14v-2H7V13zM7,17h14v-2H7V17zM7,7v2h14V7H7z"/>
</vector>

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:state_checked="true"
        android:color="?android:attr/colorAccent" />
    <item
        android:state_checked="false"
        android:color="?android:attr/textColorPrimary" />
</selector>
 No newline at end of file
+26 −0
Original line number Diff line number Diff line
<!--
    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.
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24">
  <path
      android:pathData="M3,12L3,3h9,9v9,9L12,21 3,21ZM19,12L19,5L12,5 5,5v7,7h7,7zM7,16c0,-0.55 0.45,-1 1,-1 0.55,0 1,0.45 1,1 0,0.55 -0.45,1 -1,1 -0.55,0 -1,-0.45 -1,-1zM11,16c0,-0.55 1.35,-1 3,-1 1.65,0 3,0.45 3,1 0,0.55 -1.35,1 -3,1 -1.65,0 -3,-0.45 -3,-1zM7,12c0,-0.55 0.45,-1 1,-1 0.55,0 1,0.45 1,1 0,0.55 -0.45,1 -1,1 -0.55,0 -1,-0.45 -1,-1zM11,12c0,-0.55 1.35,-1 3,-1 1.65,0 3,0.45 3,1 0,0.55 -1.35,1 -3,1 -1.65,0 -3,-0.45 -3,-1zM7,8C7,7.45 7.45,7 8,7 8.55,7 9,7.45 9,8 9,8.55 8.55,9 8,9 7.45,9 7,8.55 7,8ZM11,8c0,-0.55 1.35,-1 3,-1 1.65,0 3,0.45 3,1 0,0.55 -1.35,1 -3,1 -1.65,0 -3,-0.45 -3,-1z"
      android:fillColor="#000000"/>
</vector>
+28 −0
Original line number Diff line number Diff line
<!--
    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.
-->

<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="M13.85,22.24h-3.7c-0.74,0 -1.36,-0.54 -1.45,-1.27l-0.27,-1.89c-0.27,-0.14 -0.53,-0.29 -0.79,-0.46l-1.8,0.72c-0.7,0.26 -1.47,-0.03 -1.81,-0.65L2.2,15.52c-0.35,-0.66 -0.2,-1.44 0.36,-1.88l1.53,-1.19c-0.01,-0.15 -0.02,-0.3 -0.02,-0.46c0,-0.15 0.01,-0.31 0.02,-0.46l-1.52,-1.19C1.98,9.89 1.83,9.09 2.2,8.47l1.85,-3.19c0.34,-0.62 1.11,-0.9 1.79,-0.63l1.81,0.73C7.91,5.2 8.17,5.05 8.43,4.91L8.7,3.01c0.09,-0.7 0.71,-1.25 1.44,-1.25h3.7c0.74,0 1.36,0.54 1.45,1.27l0.27,1.89c0.27,0.14 0.53,0.29 0.79,0.46l1.8,-0.72c0.71,-0.26 1.48,0.03 1.82,0.65l1.84,3.18c0.36,0.66 0.2,1.44 -0.36,1.88l-1.52,1.19c0.01,0.15 0.02,0.3 0.02,0.46s-0.01,0.31 -0.02,0.46l1.52,1.19c0.56,0.45 0.72,1.23 0.37,1.86l-1.86,3.22c-0.34,0.62 -1.11,0.9 -1.8,0.63l-1.8,-0.72c-0.26,0.17 -0.52,0.32 -0.78,0.46l-0.27,1.91C15.21,21.7 14.59,22.24 13.85,22.24zM13.32,20.72c0,0.01 0,0.01 0,0.02V20.72zM10.68,20.69v0.02C10.69,20.72 10.69,20.7 10.68,20.69zM10.62,20.24h2.76l0.37,-2.55l0.53,-0.22c0.44,-0.18 0.88,-0.44 1.34,-0.78l0.45,-0.34l2.38,0.96l1.38,-2.4l-2.03,-1.58l0.07,-0.56c0.03,-0.26 0.06,-0.51 0.06,-0.78c0,-0.27 -0.03,-0.53 -0.06,-0.78l-0.07,-0.56l2.03,-1.58l-1.39,-2.4l-2.39,0.96L15.6,7.28c-0.42,-0.32 -0.87,-0.58 -1.33,-0.77L13.75,6.3l-0.37,-2.55h-2.76L10.25,6.3L9.72,6.51C9.28,6.69 8.84,6.94 8.38,7.3L7.93,7.62L5.55,6.67L4.16,9.06l2.03,1.58L6.12,11.2c-0.03,0.26 -0.06,0.53 -0.06,0.79s0.02,0.53 0.06,0.78l0.07,0.56l-2.03,1.58l1.38,2.4l2.39,-0.96l0.45,0.35c0.43,0.33 0.86,0.58 1.33,0.77l0.53,0.22L10.62,20.24zM18.22,17.72c0,0.01 -0.01,0.02 -0.01,0.03L18.22,17.72zM5.77,17.7l0.01,0.02C5.78,17.72 5.77,17.7 5.77,17.7zM3.93,9.47L3.93,9.47L3.93,9.47zM18.22,6.26c0,0.01 0.01,0.02 0.01,0.02L18.22,6.26zM5.79,6.24L5.78,6.26C5.78,6.26 5.79,6.26 5.79,6.24zM13.31,3.27c0,0.01 0,0.01 0,0.02V3.27zM10.69,3.25v0.02C10.69,3.26 10.69,3.26 10.69,3.25z"/>
  <path
      android:fillColor="#FF000000"
      android:pathData="M13.56,10.44l-1.56,-3.44l-1.56,3.44l-3.44,1.56l3.44,1.56l1.56,3.44l1.56,-3.44l3.44,-1.56z"/>
</vector>
+3 −57
Original line number Diff line number Diff line
@@ -15,62 +15,8 @@
     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">

<androidx.recyclerview.widget.RecyclerView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/card_container"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" />

    <RelativeLayout
        android:id="@+id/bottom_sheet"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="?android:attr/windowBackground"
        android:minHeight="@dimen/homepage_bottomsheet_height"
        app:layout_behavior="@string/bottom_sheet_behavior"
        app:behavior_peekHeight="@dimen/homepage_bottomsheet_height">

        <androidx.coordinatorlayout.widget.CoordinatorLayout
            android:id="@+id/bottom_area"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <com.google.android.material.floatingactionbutton.FloatingActionButton
                android:id="@+id/search_fab"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/ic_search_floating_24dp"
                app:backgroundTint="@android:color/white"
                app:layout_anchor="@id/bar"/>

            <com.google.android.material.bottomappbar.BottomAppBar
                android:id="@+id/bar"
                android:layout_width="match_parent"
                android:layout_height="@dimen/homepage_bottombar_height"
                android:layout_alignParentTop="true"
                android:layout_marginTop="@dimen/homepage_bottombar_top_margin"
                android:clickable="true"
                app:fabAttached="true"
                app:fabAlignmentMode="end"
                app:fabCradleDiameter="@dimen/homepage_bottombar_fab_cradle"
                app:navigationIcon="@drawable/ic_list_24dp"
                style="@style/Widget.MaterialComponents.BottomAppBar"/>
        </androidx.coordinatorlayout.widget.CoordinatorLayout>

        <include layout="@layout/search_bar"
                 android:visibility="invisible"/>

        <FrameLayout
            android:id="@+id/bottom_sheet_fragment"
            android:layout_below="@id/bottom_area"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>

    </RelativeLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>
 No newline at end of file
Loading