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

Commit 64a6bc4c authored by Wenyi Wang's avatar Wenyi Wang
Browse files

Bring action bar up to spec (E1)

* Show title "Edit Label" when editing a label.
* Change "Label name" to "Label" in editor and in group name edit dialog.

Bug 29831679
Fixes 29981743

Change-Id: I4bbd1185045d902831b7dbefc381ef6fcb92cdf4
parent a45044c3
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -441,8 +441,8 @@
    <!-- Title for the update label dialog. CHAR LIMIT=40] -->
    <string name="group_name_dialog_update_title">Rename label</string>

    <!-- Hint for the label name input field on the insert and update label dialogs [CHAR LIMIT=30] -->
    <string name="group_name_dialog_hint">Label name</string>
    <!-- Hint for the label name input field on the insert and update label dialogs [CHAR LIMIT=15] -->
    <string name="group_name_dialog_hint">Label</string>

    <!-- Generic action string for starting an audio chat. Used by AccessibilityService to announce the purpose of the view. [CHAR LIMIT=NONE] -->
    <string name="audio_chat">Voice chat</string>
@@ -510,7 +510,7 @@
    <string name="event_edit_field_hint_text">Date</string>

    <!-- The button to add an label field to a contact in the Raw Contact Editor [CHAR LIMIT=15] -->
    <string name="group_edit_field_hint_text">Label name</string>
    <string name="group_edit_field_hint_text">Label</string>

    <!-- Button used for changing a photo in the Raw Contact Editor [CHAR LIMIT=15] -->
    <string name="change_photo">Change</string>
@@ -652,8 +652,8 @@
    <!-- Label to instruct the user to type in a contact's name to add the contact as a member of the current group. [CHAR LIMIT=64] -->
    <string name="enter_contact_name">Search contacts</string>

    <!-- Hint text in the label name box in the edit label view. [CHAR LIMIT=20]-->
    <string name="group_name_hint">Label\'s name</string>
    <!-- Title of edit label view  [CHAR LIMIT=20]-->
    <string name="title_edit_group">Edit Label</string>

    <!-- Header label in the contact editor for a profile that is local to the device only (and not associated with any account) [CHAR LIMIT=25] -->
    <string name="local_profile_title">My local profile</string>
+7 −1
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v4.content.ContextCompat;
@@ -509,6 +508,13 @@ public class ActionBarAdapter implements OnCloseListener {
        textView.setText(String.valueOf(selectionCount));
    }

    public void setActionBarTitle(String title) {
        final TextView textView =
                (TextView) mSelectionContainer.findViewById(R.id.selection_count_text);
        textView.setVisibility(View.VISIBLE);
        textView.setText(title);
    }

    private void updateStatusBarColor() {
        if (!CompatUtils.isLollipopCompatible()) {
            return; // we can't change the status bar color prior to Lollipop
+6 −1
Original line number Diff line number Diff line
@@ -498,6 +498,7 @@ public class GroupMembersActivity extends ContactsDrawerActivity implements
                if (mMembersFragment != null) {
                    if (mIsEditMode) {
                        mMembersFragment.displayDeleteButtons(true);
                        mActionBarAdapter.setActionBarTitle(getString(R.string.title_edit_group));
                    } else {
                        mMembersFragment.displayCheckBoxes(true);
                    }
@@ -545,8 +546,12 @@ public class GroupMembersActivity extends ContactsDrawerActivity implements

    @Override
    public void onSelectedContactIdsChanged() {
        if (mIsEditMode) {
            mActionBarAdapter.setActionBarTitle(getString(R.string.title_edit_group));
        } else {
            mActionBarAdapter.setSelectionCount(mMembersFragment.getSelectedContactIds().size());
        }
    }

    @Override
    public void onStopDisplayingCheckBoxes() {