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

Commit 8145b0f3 authored by Matthew Fritze's avatar Matthew Fritze Committed by Android (Google) Code Review
Browse files

Merge "Add optional feedback button for settings search"

parents a6b01f19 2beb03f4
Loading
Loading
Loading
Loading
+59 −0
Original line number Diff line number Diff line
<!--
  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.

  -->

<vector android:height="24dp" android:viewportHeight="267.9"
    android:viewportWidth="236.3" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
    <path android:fillAlpha="0.9" android:fillColor="#00000000"
        android:pathData="M18,-19c0,-0.4 0,-0.5 -0.3,-0.3l-12,7c-0.3,0.2 -0.2,0.5 0.1,0.6l11.9,7C18,-4.5 18,-4.7 18,-5V-19z"
        android:strokeColor="#FFFFFF" android:strokeWidth="2"/>
    <path android:fillAlpha="0.9" android:fillColor="#00000000"
        android:pathData="M18.9,-12c0,-3.8 -3.1,-6.9 -6.9,-6.9c-3.8,0 -6.9,3.1 -6.9,6.9c0,3.8 3.1,6.9 6.9,6.9C15.8,-5.1 18.9,-8.2 18.9,-12z"
        android:strokeColor="#FFFFFF" android:strokeWidth="1.8033"/>
    <path android:fillAlpha="0.9" android:fillColor="#00000000"
        android:pathData="M19,-5.7C19,-5.4 18.6,-5 18.2,-5H5.8C5.4,-5 5,-5.4 5,-5.7v-12.6C5,-18.6 5.4,-19 5.8,-19h12.4c0.4,0 0.8,0.4 0.8,0.7V-5.7z"
        android:strokeColor="#FFFFFF" android:strokeWidth="2"/>
    <path android:fillColor="#FAFAFA" android:pathData="M118.2,134.4m-118.2,0a118.2,118.2 0,1 1,236.4 0a118.2,118.2 0,1 1,-236.4 0"/>
    <path android:fillColor="#F5F5F5" android:pathData="M22.8,239L96,206.2c0.2,-0.1 0.3,-0.1 0.5,-0.1l117.3,23c0.7,0.2 0.9,1.2 0.2,1.5l-75.9,37.2c-0.2,0.1 -0.3,0.1 -0.5,0.1L23,240.5C22.2,240.3 22.1,239.3 22.8,239z"/>
    <path android:fillColor="#E8E8E8" android:pathData="M35.6,76.5l102,17.3l0,167.4l-102,-23.2z"/>
    <path android:fillColor="#E8E8E8" android:pathData="M35.7,19.6l102,17.3l0,79.2l-102,-23.2z"/>
    <path android:fillColor="#EFEFEF" android:pathData="M35.7,19.6l66.6,-19.6l100.5,19.1l-65.1,18.5z"/>
    <path android:fillColor="#00000000"
        android:pathData="M37.6,131.9L135.2,150"
        android:strokeColor="#E0E0E0" android:strokeWidth="0.1816"/>
    <path android:fillAlpha="0.5" android:fillColor="#00000000"
        android:pathData="M39.1,185.3L132.3,204.8"
        android:strokeColor="#C1C1C1" android:strokeWidth="0.1816"/>
    <path android:fillColor="#00000000"
        android:pathData="M137.7,147.6L116.5,154.5"
        android:strokeColor="#E0E0E0" android:strokeWidth="0.1816"/>
    <path android:fillColor="#00000000" android:pathData="M35.7,142.2"
        android:strokeColor="#E0E0E0" android:strokeWidth="0.1816"/>
    <path android:fillAlpha="5.000000e-02" android:fillColor="#FF000000" android:pathData="M35.7,140.9l101.7,9.2l0,33.1l-101.8,-21.3z"/>
    <path android:fillColor="#CECECE" android:pathData="M71,36.9l28.8,5l0,5.8l-28.8,-5.3z"/>
    <path android:fillAlpha="0.1" android:fillColor="#1F1F1F" android:pathData="M71,36.9l28.8,5l0,1.7l-28.8,-5.3z"/>
    <path android:fillAlpha="0.5" android:fillColor="#CECECE" android:pathData="M68.4,147.3l28.8,5.1l0,5.8l-28.8,-5.4z"/>
    <path android:fillAlpha="0.1" android:fillColor="#1F1F1F" android:pathData="M68.4,147.3l28.8,5.1l0,1.7l-28.8,-5.4z"/>
    <path android:fillAlpha="0.7" android:fillColor="#CECECE" android:pathData="M68.4,201.2l28.8,5.4l0,5.8l-28.8,-5.7z"/>
    <path android:fillAlpha="0.1" android:fillColor="#1F1F1F" android:pathData="M68.4,201.2l28.8,5.4l0,1.6l-28.8,-5.6z"/>
    <path android:fillColor="#EAEAEA" android:pathData="M16.2,80.3l100.3,18.1l0,58.5l-100.3,-20.2z"/>
    <path android:fillColor="#EFEFEF" android:pathData="M137.7,37.6l0,53.9l-21.2,6.9l0,58.5l21.2,-6.9l0,111.1l65.1,-30l0,-212z"/>
    <path android:fillColor="#E57373" android:pathData="M16.2,80.3l19.5,-8.2l0,11.7z"/>
    <path android:fillAlpha="0.6" android:fillColor="#E57373" android:pathData="M137.7,91.5l-102,-19.4l0,11.7l80.8,14.6z"/>
    <path android:fillColor="#CECECE" android:pathData="M47.2,95.5l28.8,5l0,5.8l-28.8,-5.2z"/>
    <path android:fillAlpha="0.1" android:fillColor="#1F1F1F" android:pathData="M47.2,95.5l28.8,5l0,1.7l-28.8,-5.2z"/>
    <path android:fillColor="#EAEAEA" android:pathData="M35.7,72.1L35.7,72.1l-19.6,8.1l0,0.1l0,0l100.3,18.1l0,0l0,0l21.6,-7L35.7,72.1zM116.5,97.5L19.4,80l16.4,-6.8L134,91.8L116.5,97.5z"/>
</vector>
+23 −0
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.
-->

<View
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/feedback_popup"
    android:layout_width="0dp"
    android:layout_height="0dp"
    android:visibility="gone">
</View>
+35 −14
Original line number Diff line number Diff line
@@ -13,18 +13,19 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/search_panel"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
              android:layout_gravity="center"
              android:orientation="vertical">
    android:background="@drawable/search_panel_list_background">

    <LinearLayout android:id="@+id/layout_recent_searches"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center"
                  android:orientation="vertical">
                  android:orientation="vertical"
                  android:layout_alignParentTop="true">

        <!-- Padding is included in the background -->
        <android.support.v7.widget.RecyclerView android:id="@+id/list_recent_searches"
@@ -36,27 +37,47 @@
                  android:paddingBottom="@dimen/dashboard_padding_bottom"
                  android:scrollbarStyle="outsideOverlay"
                  android:headerDividersEnabled="false"
                  android:background="@drawable/search_panel_list_background"
                  android:elevation="@dimen/search_panel_elevation"/>
    </LinearLayout>

    <LinearLayout android:id="@+id/layout_results"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:layout_gravity="center"
                  android:layout_height="fill_parent"
                  android:layout_above="@id/feedback_popup"
                  android:orientation="vertical">

        <!-- Padding is included in the background -->
        <android.support.v7.widget.RecyclerView android:id="@+id/list_results"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:layout_height="wrap_content"
                  android:paddingStart="@dimen/dashboard_padding_start"
                  android:paddingEnd="@dimen/dashboard_padding_end"
                  android:paddingTop="@dimen/dashboard_padding_top"
                  android:paddingBottom="@dimen/dashboard_padding_bottom"
                  android:scrollbarStyle="outsideOverlay"
                  android:scrollbars="vertical"
                  android:background="@drawable/search_panel_list_background"/>
    </LinearLayout>
                  android:scrollbars="vertical"/>

        <LinearLayout
            android:id="@+id/no_results_layout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="center"
            android:orientation="vertical"
            android:visibility="gone">

            <ImageView
            android:layout_height="112dp"
            android:layout_width="112dp"
            android:src="@drawable/no_search_results"/>

            <TextView
            android:layout_height="wrap_content"
            android:layout_width="match_parent"
            android:textSize="18sp"
            android:text="@string/search_settings_no_results"
            android:gravity="center"/>
        </LinearLayout>
    </LinearLayout>

    <include layout="@layout/search_feedback"/>
</RelativeLayout>
+2 −0
Original line number Diff line number Diff line
@@ -2167,6 +2167,8 @@
    <string name="search_settings">Search</string>
    <!-- Main Settings screen, setting option summary to go into search settings -->
    <string name="search_settings_summary">Manage search settings and history</string>
    <!-- There are no search results for the user's search [CHAR LIMIT=NONE]-->
    <string name="search_settings_no_results">No results</string>
    <!-- Display settings --><skip/>
    <!-- Sound & display settings screen, section header for settings related to display -->
+3 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.app.Fragment;
import android.app.FragmentManager;
import android.os.Bundle;

import android.view.WindowManager;
import com.android.settings.R;

public class SearchActivity extends Activity {
@@ -29,6 +30,8 @@ public class SearchActivity extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.search_main);
        // Keeps layouts in-place when keyboard opens.
        getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);

        FragmentManager fragmentManager = getFragmentManager();
        Fragment fragment = fragmentManager.findFragmentById(R.id.main_content);
Loading