merge in jb-mr2-release history after reset to master
diff --git a/res/layout-sw580dp/text_fields_editor_view.xml b/res/layout-sw580dp/text_fields_editor_view.xml
index 89970c6..c6b010b 100644
--- a/res/layout-sw580dp/text_fields_editor_view.xml
+++ b/res/layout-sw580dp/text_fields_editor_view.xml
@@ -25,9 +25,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
- android:gravity="center_vertical"
- android:focusable="true"
- android:clickable="true">
+ android:gravity="center_vertical">
<include
android:id="@+id/editors"
diff --git a/res/layout/event_field_editor_view.xml b/res/layout/event_field_editor_view.xml
index e51c5bb..8660cd8 100644
--- a/res/layout/event_field_editor_view.xml
+++ b/res/layout/event_field_editor_view.xml
@@ -28,9 +28,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
- android:gravity="center_vertical"
- android:focusable="true"
- android:clickable="true">
+ android:gravity="center_vertical">
<include
android:id="@+id/date_view"
diff --git a/res/layout/phonetic_name_editor_view.xml b/res/layout/phonetic_name_editor_view.xml
index 4a4b64c..d67dcf5 100644
--- a/res/layout/phonetic_name_editor_view.xml
+++ b/res/layout/phonetic_name_editor_view.xml
@@ -31,9 +31,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
- android:gravity="center_vertical"
- android:focusable="true"
- android:clickable="true">
+ android:gravity="center_vertical">
<include
android:id="@+id/editors"
diff --git a/res/layout/structured_name_editor_view.xml b/res/layout/structured_name_editor_view.xml
index 8b4a8ad..6320aa5 100644
--- a/res/layout/structured_name_editor_view.xml
+++ b/res/layout/structured_name_editor_view.xml
@@ -30,9 +30,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:focusable="true"
- android:clickable="true">
+ android:orientation="horizontal">
<include
layout="@layout/edit_field_list_with_anchor_view" />
diff --git a/res/layout/text_fields_editor_view.xml b/res/layout/text_fields_editor_view.xml
index de49215..5ae83c6 100644
--- a/res/layout/text_fields_editor_view.xml
+++ b/res/layout/text_fields_editor_view.xml
@@ -26,9 +26,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
- android:gravity="center_vertical"
- android:focusable="true"
- android:clickable="true">
+ android:gravity="center_vertical">
<include
layout="@layout/edit_field_list_with_anchor_view" />
diff --git a/src/com/android/contacts/activities/ActionBarAdapter.java b/src/com/android/contacts/activities/ActionBarAdapter.java
index d50c240..c22f058 100644
--- a/src/com/android/contacts/activities/ActionBarAdapter.java
+++ b/src/com/android/contacts/activities/ActionBarAdapter.java
@@ -416,7 +416,11 @@
// expanding the {@link SearchView} when a search is initiated. Note that a side effect
// of this method is that the {@link SearchView} query text is set to empty string.
if (isIconifiedChanging) {
+ final CharSequence queryText = mSearchView.getQuery();
mSearchView.onActionViewExpanded();
+ if (!TextUtils.isEmpty(queryText)) {
+ mSearchView.setQuery(queryText, false);
+ }
}
if (mActionBar.getNavigationMode() != ActionBar.NAVIGATION_MODE_STANDARD) {
mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
diff --git a/src/com/android/contacts/editor/RawContactEditorView.java b/src/com/android/contacts/editor/RawContactEditorView.java
index 9099307..b52b0b2 100644
--- a/src/com/android/contacts/editor/RawContactEditorView.java
+++ b/src/com/android/contacts/editor/RawContactEditorView.java
@@ -73,6 +73,7 @@
private ViewGroup mOrganizationSectionViewContainer;
private View mAddOrganizationButton;
+ private View mOrganizationView;
private boolean mOrganizationViewExpanded = false;
private ViewGroup mFields;
@@ -148,6 +149,13 @@
mAccountTypeTextView = (TextView) findViewById(R.id.account_type);
mAccountNameTextView = (TextView) findViewById(R.id.account_name);
+ mOrganizationView = mInflater.inflate(
+ R.layout.organization_editor_view_switcher, mFields, false);
+ mAddOrganizationButton = mOrganizationView.findViewById(
+ R.id.add_organization_button);
+ mOrganizationSectionViewContainer =
+ (ViewGroup) mOrganizationView.findViewById(R.id.container);
+
mAddFieldButton = (Button) findViewById(R.id.button_add_field);
mAddFieldButton.setOnClickListener(new OnClickListener() {
@Override
@@ -300,12 +308,7 @@
} else {
// Otherwise provide the user with an "add organization" button that shows the
// EditText fields only when clicked
- final View organizationView = mInflater.inflate(
- R.layout.organization_editor_view_switcher, mFields, false);
- mAddOrganizationButton = organizationView.findViewById(
- R.id.add_organization_button);
- mOrganizationSectionViewContainer =
- (ViewGroup) organizationView.findViewById(R.id.container);
+ mOrganizationSectionViewContainer.removeAllViews();
mOrganizationSectionViewContainer.addView(section);
// Setup the click listener for the "add organization" button
@@ -320,7 +323,7 @@
}
});
- mFields.addView(organizationView);
+ mFields.addView(mOrganizationView);
}
} else {
// Otherwise use generic section-based editors