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

Commit b5fb71ac authored by Andrew Sapperstein's avatar Andrew Sapperstein Committed by android-build-merger
Browse files

Merge "Revert "Initial search bar implementation."" into oc-dev

am: dfc19836

Change-Id: I6c143b18b53857accac23d7c64f807c6987609a5
parents 74eda715 dfc19836
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -22,10 +22,9 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_STATIC_ANDROID_LIBRARIES := \
    android-support-v4 \
    android-support-v13 \
    android-support-v7-appcompat \
    android-support-v7-cardview \
    android-support-v7-preference \
    android-support-v7-recyclerview \
    android-support-v7-preference \
    android-support-v7-appcompat \
    android-support-v14-preference

LOCAL_JAVA_LIBRARIES := \
+0 −25
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.
-->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:padding="@dimen/search_bar_margin">
    <View
        android:layout_width="match_parent"
        android:layout_height="?android:attr/actionBarSize"/>
</LinearLayout>
+4 −28
Original line number Diff line number Diff line
@@ -18,31 +18,7 @@
-->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_height="match_parent"
    android:layout_width="match_parent">
    <FrameLayout
             android:id="@+id/main_content"
             android:layout_height="match_parent"
        android:layout_width="match_parent"/>
    <android.support.v7.widget.CardView
        android:id="@+id/search_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="@dimen/search_bar_margin"
        app:cardCornerRadius="2dp"
        app:cardBackgroundColor="?android:attr/colorBackground"
        app:cardElevation="2dp">
        <Toolbar
            android:id="@+id/search_action_bar"
             android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/search_bar_negative_margin"
            android:background="?android:attr/selectableItemBackground"
            android:navigationIcon="@drawable/ic_search_24dp"
            android:title="@string/search_menu"
            android:titleTextAppearance="?android:attr/subtitleTextAppearance"
            android:titleTextColor="?android:attr/textColorHint"
            android:theme="?android:attr/actionBarTheme"/>
    </android.support.v7.widget.CardView>
</FrameLayout>
             />
+0 −6
Original line number Diff line number Diff line
@@ -140,12 +140,6 @@
    <dimen name="search_suggestion_item_image_margin_start">32dp</dimen>
    <dimen name="search_suggestion_item_image_margin_end">32dp</dimen>

    <!-- The following two margins need to match, with the caveat that
         the second should be negative. The second one ensures that the icons and text
         align despite the additional padding caused by the search bar's card background. -->
    <dimen name="search_bar_margin">8dp</dimen>
    <dimen name="search_bar_negative_margin">-8dp</dimen>

    <!-- Dimensions for Wifi Assistant Card -->
    <dimen name="wifi_assistant_padding_top_bottom">16dp</dimen>
    <dimen name="wifi_assistant_padding_start_end">16dp</dimen>
+6 −22
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.Toolbar;

import com.android.internal.util.ArrayUtils;
import com.android.settings.Settings.WifiSettingsActivity;
@@ -63,7 +62,6 @@ import com.android.settings.dashboard.DashboardSummary;
import com.android.settings.development.DevelopmentSettings;
import com.android.settings.overlay.FeatureFactory;
import com.android.settings.search.DynamicIndexableContentMonitor;
import com.android.settings.search2.SearchActivity;
import com.android.settings.search2.SearchFeatureProvider;
import com.android.settings.wfd.WifiDisplaySettings;
import com.android.settings.widget.SwitchBar;
@@ -77,7 +75,7 @@ import java.util.Set;
public class SettingsActivity extends SettingsDrawerActivity
        implements PreferenceManager.OnPreferenceTreeClickListener,
        PreferenceFragment.OnPreferenceStartFragmentCallback,
        ButtonBarHandler, FragmentManager.OnBackStackChangedListener, OnClickListener {
        ButtonBarHandler, FragmentManager.OnBackStackChangedListener {

    private static final String LOG_TAG = "Settings";

@@ -347,14 +345,6 @@ public class SettingsActivity extends SettingsDrawerActivity
            launchSettingFragment(initialFragmentName, isSubSettings, intent);
        }

        if (mIsShowingDashboard) {
            findViewById(R.id.search_bar).setVisibility(View.VISIBLE);
            findViewById(R.id.action_bar).setVisibility(View.GONE);
            Toolbar toolbar = findViewById(R.id.search_action_bar);
            toolbar.setOnClickListener(this);
            setActionBar(toolbar);
        }

        mActionBar = getActionBar();
        if (mActionBar != null) {
            mActionBar.setDisplayHomeAsUpEnabled(mDisplayHomeAsUpEnabled);
@@ -442,10 +432,10 @@ public class SettingsActivity extends SettingsDrawerActivity
            switchToFragment(initialFragmentName, initialArguments, true, false,
                mInitialTitleResId, mInitialTitle, false);
        } else {
            // Show search icon as up affordance if we are displaying the main Dashboard
            mDisplayHomeAsUpEnabled = true;
            // toolbar is search affordance so don't show search
            mDisplaySearch = false;
            // No UP affordance if we are displaying the main Dashboard
            mDisplayHomeAsUpEnabled = false;
            // Show Search affordance
            mDisplaySearch = true;
            mInitialTitleResId = R.string.dashboard_title;

            switchToFragment(DashboardSummary.class.getName(), null /* args */, false, false,
@@ -949,10 +939,4 @@ public class SettingsActivity extends SettingsDrawerActivity

        return bitmap;
    }

    @Override
    public void onClick(View v) {
        Intent intent = new Intent(this, SearchActivity.class);
        startActivity(intent);
    }
}
 No newline at end of file
Loading