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

Commit a5d0c3e3 authored by Doris Ling's avatar Doris Ling
Browse files

Remove suggestion UI v1 codes.

- remove the check for feature flag for suggestion UI v2 and switch to
use the v2 codes.
- remove all code related to v1 of suggestion UI

Fixes: 70573674
Test: make RunSettingsRoboTests

Change-Id: I99ab318c1c0192508a9c5e9e708e86319120d55b
parent 07c2cdee
Loading
Loading
Loading
Loading
+0 −43
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2017 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.
-->

<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    style="@style/SuggestionConditionStyle"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingStart="5dp"
    android:paddingEnd="5dp"
    android:paddingBottom="@dimen/dashboard_padding_bottom">

    <android.support.v7.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:cardUseCompatPadding="true"
        app:cardElevation="2dp">

        <android.support.v7.widget.RecyclerView
            android:id="@+id/data"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/material_grey_300"
            android:scrollbars="none"/>

    </android.support.v7.widget.CardView>

</FrameLayout>
+52 −34
Original line number Diff line number Diff line
@@ -14,51 +14,69 @@
     limitations under the License.
-->

<LinearLayout
<android.support.v7.widget.CardView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/suggestion_card"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:cardPreventCornerOverlap="false"
    app:cardUseCompatPadding="true"
    app:cardElevation="2dp"
    app:cardCornerRadius="@dimen/suggestion_card_corner_radius">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minHeight="112dp"
        android:orientation="vertical">

    <LinearLayout
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
        android:background="@android:color/white"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        android:minHeight="@dimen/dashboard_tile_minimum_height">
            android:orientation="horizontal">

            <ImageView
                android:id="@android:id/icon"
                android:layout_width="@dimen/suggestion_card_icon_size"
                android:layout_height="@dimen/suggestion_card_icon_size"
            android:layout_marginStart="14dp"
            android:layout_marginEnd="24dp" />
                style="@style/SuggestionCardIcon"
                android:layout_marginTop="16dp"
                android:layout_marginBottom="8dp" />

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="vertical">
            <ImageView
                android:id="@+id/close_button"
                android:layout_width="18dp"
                android:layout_height="18dp"
                android:alpha="0.54"
                android:layout_alignParentEnd="true"
                android:layout_marginTop="8dp"
                android:layout_marginEnd="8dp"
                android:src="@drawable/ic_suggestion_close_button"/>

        </RelativeLayout>

        <TextView
            android:id="@android:id/title"
                android:layout_width="wrap_content"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            style="@style/SuggestionCardText"
            android:layout_marginStart="12dp"
            android:layout_marginEnd="12dp"
            android:singleLine="true"
                android:textAppearance="@style/TextAppearance.TileTitle"
                android:ellipsize="marquee"
            android:textAppearance="@style/TextAppearance.SuggestionTitleV2"
            android:ellipsize="end"
            android:fadingEdge="horizontal" />

        <TextView
            android:id="@android:id/summary"
                android:textAppearance="@style/TextAppearance.SuggestionSummary"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />

        </LinearLayout>
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            style="@style/SuggestionCardText"
            android:layout_marginStart="12dp"
            android:layout_marginEnd="12dp"
            android:textAppearance="@style/TextAppearance.SuggestionSummary" />

    </LinearLayout>

    <include layout="@layout/horizontal_divider" />

</LinearLayout>
 No newline at end of file
</android.support.v7.widget.CardView>

res/layout/suggestion_tile_v2.xml

deleted100644 → 0
+0 −82
Original line number 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.
-->

<android.support.v7.widget.CardView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/suggestion_card"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:cardPreventCornerOverlap="false"
    app:cardUseCompatPadding="true"
    app:cardElevation="2dp"
    app:cardCornerRadius="@dimen/suggestion_card_corner_radius">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minHeight="112dp"
        android:orientation="vertical">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <ImageView
                android:id="@android:id/icon"
                android:layout_width="@dimen/suggestion_card_icon_size"
                android:layout_height="@dimen/suggestion_card_icon_size"
                style="@style/SuggestionCardIcon"
                android:layout_marginTop="16dp"
                android:layout_marginBottom="8dp" />

            <ImageView
                android:id="@+id/close_button"
                android:layout_width="18dp"
                android:layout_height="18dp"
                android:alpha="0.54"
                android:layout_alignParentEnd="true"
                android:layout_marginTop="8dp"
                android:layout_marginEnd="8dp"
                android:src="@drawable/ic_suggestion_close_button"/>

        </RelativeLayout>

        <TextView
            android:id="@android:id/title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            style="@style/SuggestionCardText"
            android:layout_marginStart="12dp"
            android:layout_marginEnd="12dp"
            android:singleLine="true"
            android:textAppearance="@style/TextAppearance.SuggestionTitleV2"
            android:ellipsize="end"
            android:fadingEdge="horizontal" />

        <TextView
            android:id="@android:id/summary"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            style="@style/SuggestionCardText"
            android:layout_marginStart="12dp"
            android:layout_marginEnd="12dp"
            android:textAppearance="@style/TextAppearance.SuggestionSummary" />

    </LinearLayout>

</android.support.v7.widget.CardView>
Loading