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

Commit c581192e authored by Makoto Onuki's avatar Makoto Onuki Committed by Android (Google) Code Review
Browse files

Merge "Make group editor usable in landscape"

parents 320b310f d3c35957
Loading
Loading
Loading
Loading
+59 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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="match_parent"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingLeft="8dip"
        android:paddingRight="8dip"
        android:orientation="horizontal"
        >

        <EditText
            android:id="@+id/group_name"
            android:layout_width="0dip"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:inputType="textCapWords"
            android:imeOptions="flagNoExtractUi|flagNoFullscreen"
            android:hint="@string/group_name_hint"
            android:minHeight="48dip"
            android:paddingRight="8dip"
            />

        <LinearLayout
            android:layout_width="0dip"
            android:layout_weight="1"
            android:layout_height="match_parent"
            android:paddingLeft="8dip"
            android:orientation="vertical"
            >
            <include
                layout="@layout/group_editor_autocomplete_view"
                android:id="@+id/add_member_field"/>
            <include
                layout="@layout/group_editor_existing_member_list"
                android:id="@android:id/list"/>
        </LinearLayout>
    </LinearLayout>
</LinearLayout>
+0 −1
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@
            android:layout_height="wrap_content"
            android:minHeight="48dip"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textStyle="bold"
            android:inputType="textCapWords"
            android:hint="@string/group_name_hint"
            android:paddingLeft="16dip"/>
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceMedium"
    android:textColor="?android:attr/textColorPrimary"
    android:imeOptions="flagNoExtractUi|flagNoFullscreen"
    android:hint="@string/enter_contact_name"
    android:minHeight="48dip"
    android:paddingLeft="@dimen/group_editor_autocomplete_left_padding"/>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -35,8 +35,8 @@
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textStyle="bold"
            android:inputType="textCapWords"
            android:imeOptions="flagNoExtractUi|flagNoFullscreen"
            android:hint="@string/group_name_hint"
            android:minHeight="48dip"
            android:paddingLeft="8dip"/>
+12 −13
Original line number Diff line number Diff line
@@ -180,9 +180,6 @@ public class GroupEditorFragment extends Fragment implements SelectAccountDialog
    private LayoutInflater mLayoutInflater;

    private TextView mGroupNameView;
    private ImageView mAccountIcon;
    private TextView mAccountTypeTextView;
    private TextView mAccountNameTextView;
    private AutoCompleteTextView mAutoCompleteTextView;

    private String mAccountName;
@@ -404,23 +401,25 @@ public class GroupEditorFragment extends Fragment implements SelectAccountDialog
        }

        mGroupNameView = (TextView) editorView.findViewById(R.id.group_name);
        mAccountIcon = (ImageView) editorView.findViewById(R.id.account_icon);
        mAccountTypeTextView = (TextView) editorView.findViewById(R.id.account_type);
        mAccountNameTextView = (TextView) editorView.findViewById(R.id.account_name);
        mAutoCompleteTextView = (AutoCompleteTextView) editorView.findViewById(
                R.id.add_member_field);

        mListView = (ListView) editorView.findViewById(android.R.id.list);
        mListView.setAdapter(mMemberListAdapter);

        // Setup the account header
        // Setup the account header, only when exists.
        if (editorView.findViewById(R.id.account_header) != null) {
            CharSequence accountTypeDisplayLabel = accountType.getDisplayLabel(mContext);
            ImageView accountIcon = (ImageView) editorView.findViewById(R.id.account_icon);
            TextView accountTypeTextView = (TextView) editorView.findViewById(R.id.account_type);
            TextView accountNameTextView = (TextView) editorView.findViewById(R.id.account_name);
            if (!TextUtils.isEmpty(mAccountName)) {
            mAccountNameTextView.setText(
                accountNameTextView.setText(
                        mContext.getString(R.string.from_account_format, mAccountName));
            }
        mAccountTypeTextView.setText(accountTypeDisplayLabel);
        mAccountIcon.setImageDrawable(accountType.getDisplayIcon(mContext));
            accountTypeTextView.setText(accountTypeDisplayLabel);
            accountIcon.setImageDrawable(accountType.getDisplayIcon(mContext));
        }

        // Setup the autocomplete adapter (for contacts to suggest to add to the group) based on the
        // account name and type. For groups that cannot have membership edited, there will be no