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

Commit 0a48bb0c authored by Walter Jang's avatar Walter Jang Committed by Android Git Automerger
Browse files

am f5dfea4a: Add a multi account KindSectionView (E4)

* commit 'f5dfea4a':
  Add a multi account KindSectionView (E4)
parents 3251a019 f5dfea4a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@

<com.android.contacts.editor.CompactRawContactsEditorView
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/editors"
        android:id="@+id/raw_contacts_editor_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/background_primary"
+3 −26
Original line number Diff line number Diff line
@@ -25,34 +25,11 @@
            android:orientation="vertical"/>

    <LinearLayout
            android:id="@+id/phonetic_names"
            android:id="@+id/kind_section_views"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"/>

    <LinearLayout
            android:id="@+id/nicknames"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"/>

    <LinearLayout
            android:id="@+id/phone_numbers"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"/>

    <LinearLayout
            android:id="@+id/emails"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"/>

    <LinearLayout
            android:id="@+id/other"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"/>
            android:orientation="vertical"
            android:animateLayoutChanges="true"/>

    <LinearLayout
            style="@style/SelectableItem"
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@
        android:fillViewport="true">

    <com.android.contacts.editor.CompactRawContactsEditorView
            android:id="@+id/editors"
            android:id="@+id/raw_contacts_editor_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
+36 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2015 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.
-->

<!-- The body surrounding all editors for a specific kind -->

<com.android.contacts.editor.CompactKindSectionView
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

    <ImageView
            android:id="@+id/kind_icon"
            style="@style/EditKindIconStyle" />

    <LinearLayout
            android:id="@+id/kind_editors"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical" />

</com.android.contacts.editor.CompactKindSectionView>
 No newline at end of file
+1 −25
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ public class CompactContactEditorFragment extends ContactEditorBaseFragment impl

        final View view = inflater.inflate(
                R.layout.compact_contact_editor_fragment, container, false);
        mContent = (LinearLayout) view.findViewById(R.id.editors);
        mContent = (LinearLayout) view.findViewById(R.id.raw_contacts_editor_view);
        return view;
    }

@@ -349,30 +349,6 @@ public class CompactContactEditorFragment extends ContactEditorBaseFragment impl
        }
    }

    @Override
    public void onExpandEditor() {
        // Determine if this is an insert (new contact) or edit
        final boolean isInsert = isInsert(getActivity().getIntent());

        if (isInsert) {
            // For inserts, prevent any changes from being saved when the base fragment is destroyed
            mStatus = Status.CLOSING;
        } else if (hasPendingRawContactChanges()) {
            // Save whatever is in the form
            save(SaveMode.CLOSE, /* backPressed =*/ false);
        }

        // Prepare an Intent to start the expanded editor
        final Intent intent = isInsert
                ? EditorIntents.createInsertContactIntent(mState, getDisplayName(),
                        getPhoneticName(), mUpdatedPhotos, mNewLocalProfile)
                : EditorIntents.createEditContactIntent(mLookupUri, getMaterialPalette(),
                        mPhotoId, mNameId);
        ImplicitIntentsUtil.startActivityInApp(getActivity(), intent);

        getActivity().finish();
    }

    @Override
    public void onNameFieldChanged(long rawContactId, ValuesDelta valuesDelta) {
        final Activity activity = getActivity();
Loading