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

Commit 74fb6dc7 authored by Seigo Nonaka's avatar Seigo Nonaka Committed by Android (Google) Code Review
Browse files

Merge "Fix material style errors in suggestion popup window."

parents 3f4c8d21 3ed1b39f
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Parcel;
@@ -3098,10 +3099,6 @@ public class Editor {
        private SuggestionSpan mMisspelledSpan;

        private class CustomPopupWindow extends PopupWindow {
            public CustomPopupWindow(Context context, int defStyleAttr) {
                super(context, null, defStyleAttr);
            }

            @Override
            public void dismiss() {
                if (!isShowing()) {
@@ -3126,9 +3123,9 @@ public class Editor {

        @Override
        protected void createPopupWindow() {
            mPopupWindow = new CustomPopupWindow(mTextView.getContext(),
                com.android.internal.R.attr.textSuggestionsWindowStyle);
            mPopupWindow = new CustomPopupWindow();
            mPopupWindow.setInputMethodMode(PopupWindow.INPUT_METHOD_NOT_NEEDED);
            mPopupWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
            mPopupWindow.setFocusable(true);
            mPopupWindow.setClippingEnabled(false);
        }
+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:background="@drawable/text_edit_suggestions_window"
    android:dropDownSelector="@drawable/list_selector_background"
    android:divider="@null">
    <ListView
        android:id="@+id/suggestionContainer"
+5 −3
Original line number Diff line number Diff line
@@ -14,17 +14,19 @@
     limitations under the License.
-->

<!-- Background of the popup window is the same as the one of the floating toolbar.
     Use floating toolbar background style. -->
<LinearLayout  xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:divider="?android:attr/dividerHorizontal"
    android:background="?android:attr/floatingToolbarPopupBackgroundDrawable"
    android:divider="?android:attr/listDivider"
    android:showDividers="middle" >
    <ListView
        android:id="@+id/suggestionContainer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/white"
        android:paddingTop="8dip"
        android:paddingBottom="8dip"
        android:paddingBottom="0dip"
        android:divider="@null" />
    <LinearLayout
        android:layout_width="match_parent"
+0 −7
Original line number Diff line number Diff line
@@ -1199,13 +1199,6 @@ please see styles_device_defaults.xml.
        <item name="windowExitAnimation">@anim/fast_fade_out</item>
    </style>

    <!-- Style for the popup window that contains text suggestions. -->
    <style name="Widget.TextSuggestionsPopupWindow">
        <item name="dropDownSelector">@drawable/list_selector_background</item>
        <item name="popupBackground">@drawable/text_edit_suggestions_window</item>
        <item name="dropDownWidth">wrap_content</item>
    </style>

    <style name="Widget.ActionBar">
        <item name="background">@drawable/action_bar_background</item>
        <item name="displayOptions">useLogo|showHome|showTitle</item>
+0 −2
Original line number Diff line number Diff line
@@ -113,7 +113,6 @@ easier.
    <style name="Widget.DeviceDefault.Spinner.DropDown" parent="Widget.Material.Spinner.DropDown"/>
    <style name="Widget.DeviceDefault.StackView" parent="Widget.Material.StackView"/>
    <style name="Widget.DeviceDefault.TextSelectHandle" parent="Widget.Material.TextSelectHandle"/>
    <style name="Widget.DeviceDefault.TextSuggestionsPopupWindow" parent="Widget.Material.TextSuggestionsPopupWindow"/>
    <style name="Widget.DeviceDefault.TextView.ListSeparator" parent="Widget.Material.TextView.ListSeparator"/>
    <style name="Widget.DeviceDefault.TimePicker" parent="Widget.Material.TimePicker"/>

@@ -199,7 +198,6 @@ easier.
    <style name="Widget.DeviceDefault.Light.Spinner.DropDown" parent="Widget.Material.Light.Spinner.DropDown"/>
    <style name="Widget.DeviceDefault.Light.TextView.ListSeparator" parent="Widget.Material.Light.TextView.ListSeparator"/>
    <style name="Widget.DeviceDefault.Light.TimePicker" parent="Widget.Material.Light.TimePicker"/>
    <style name="Widget.DeviceDefault.Light.TextSuggestionsPopupWindow" parent="Widget.Material.Light.TextSuggestionsPopupWindow"/>

    <!-- Text Appearance Styles -->
    <style name="TextAppearance.DeviceDefault" parent="TextAppearance.Material"/>
Loading