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

Commit af7af479 authored by Walter Jang's avatar Walter Jang Committed by Android (Google) Code Review
Browse files

Merge "Don't initially focus any contact editor input field" into mnc-dev

parents 5ea43973 6dd0d4e8
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -26,6 +26,13 @@

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

    <!-- Dummy view so the first input field is not initially focused. b/21644158 -->
    <View
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:focusable="true"
            android:focusableInTouchMode="true"/>

    <ScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
+7 −0
Original line number Diff line number Diff line
@@ -32,6 +32,13 @@

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

        <!-- Dummy view so the first input field is not initially focused. b/21644158 -->
        <View
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:focusable="true"
                android:focusableInTouchMode="true"/>

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

    </com.android.contacts.editor.CompactRawContactsEditorView>
+7 −0
Original line number Diff line number Diff line
@@ -34,6 +34,13 @@
        android:layout_height="wrap_content"
        android:orientation="vertical" >

        <!-- Dummy view so the first input field is not initially focused. b/21644158 -->
        <View
           android:layout_width="0dp"
           android:layout_height="0dp"
           android:focusable="true"
           android:focusableInTouchMode="true"/>

        <include
            android:id="@+id/edit_name"
            layout="@layout/structured_name_editor_view" />
+0 −5
Original line number Diff line number Diff line
@@ -373,9 +373,6 @@ abstract public class ContactEditorBaseFragment extends Fragment implements
    // Used to pre-populate the editor with a display name when a user edits a read-only contact.
    protected String mDefaultDisplayName;

    // Whether the name editor should receive focus after being bound
    protected boolean mRequestFocus;

    // Whether to show a Toast message after saves have completed.
    // Does not affect successful toasts shown after joins, which are never displayed.
    protected boolean mShowToastAfterSave = true;
@@ -1155,7 +1152,6 @@ abstract public class ContactEditorBaseFragment extends Fragment implements
            RawContactDelta oldState, AccountType oldAccountType) {
        mStatus = Status.EDITING;
        mState.add(createNewRawContactDelta(account, accountType, oldState, oldAccountType));
        mRequestFocus = true;
        mNewContactDataReady = true;
        bindEditors();
    }
@@ -1233,7 +1229,6 @@ abstract public class ContactEditorBaseFragment extends Fragment implements
                mState.add(createLocalRawContactDelta());
            }
        }
        mRequestFocus = true;
        mExistingContactDataReady = true;
        bindEditors();
    }
+0 −6
Original line number Diff line number Diff line
@@ -292,10 +292,6 @@ public class ContactEditorFragment extends ContactEditorBaseFragment implements
                };

                final StructuredNameEditorView nameEditor = rawContactEditor.getNameEditor();
                if (mRequestFocus) {
                    nameEditor.requestFocus();
                    mRequestFocus = false;
                }
                nameEditor.setEditorListener(structuredNameListener);
                if (!TextUtils.isEmpty(mDefaultDisplayName)) {
                    nameEditor.setDisplayName(mDefaultDisplayName);
@@ -311,8 +307,6 @@ public class ContactEditorFragment extends ContactEditorBaseFragment implements
            }
        }

        mRequestFocus = false;

        setGroupMetaData();

        // Show editor now that we've loaded state