summaryrefslogtreecommitdiffstats
path: root/src/com/android/contacts/editor/CompactRawContactsEditorView.java
diff options
context:
space:
mode:
authorWalter Jang <wjang@google.com>2015-02-24 13:08:16 -0800
committerWalter Jang <wjang@google.com>2015-02-24 13:43:12 -0800
commita5e4bb287ea08f895c84d5de56fcc2483386b306 (patch)
treebd87082b76e66a09f3d60297e89e4a4643b18b3d /src/com/android/contacts/editor/CompactRawContactsEditorView.java
parent83d09b68e139f830956b448a0b7ad395de7d2f2a (diff)
downloadpackages_apps_Contacts-a5e4bb287ea08f895c84d5de56fcc2483386b306.tar.gz
packages_apps_Contacts-a5e4bb287ea08f895c84d5de56fcc2483386b306.tar.bz2
packages_apps_Contacts-a5e4bb287ea08f895c84d5de56fcc2483386b306.zip
Use a split screen for the compact contact editor in landscape
Also renamed the compact header since we're not doing the toolbar over the photo right now. Bug 19124091 Change-Id: I91032e149252d635d564064a3652df4cc0233c6c
Diffstat (limited to 'src/com/android/contacts/editor/CompactRawContactsEditorView.java')
-rw-r--r--src/com/android/contacts/editor/CompactRawContactsEditorView.java19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/com/android/contacts/editor/CompactRawContactsEditorView.java b/src/com/android/contacts/editor/CompactRawContactsEditorView.java
index 3173c8c5a..44cf698ce 100644
--- a/src/com/android/contacts/editor/CompactRawContactsEditorView.java
+++ b/src/com/android/contacts/editor/CompactRawContactsEditorView.java
@@ -73,7 +73,7 @@ public class CompactRawContactsEditorView extends LinearLayout implements View.O
private ViewIdGenerator mViewIdGenerator;
private MaterialColorMapUtils.MaterialPalette mMaterialPalette;
- private CompactHeaderView mHeader;
+ private CompactPhotoEditorView mPhoto;
private ViewGroup mNames;
private ViewGroup mPhoneticNames;
private ViewGroup mNicknames;
@@ -108,7 +108,7 @@ public class CompactRawContactsEditorView extends LinearLayout implements View.O
mLayoutInflater = (LayoutInflater)
getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- mHeader = (CompactHeaderView) findViewById(R.id.header);
+ mPhoto = (CompactPhotoEditorView) findViewById(R.id.photo_editor);
mNames = (LinearLayout) findViewById(R.id.names);
mPhoneticNames = (LinearLayout) findViewById(R.id.phonetic_names);
mNicknames = (LinearLayout) findViewById(R.id.nicknames);
@@ -148,24 +148,24 @@ public class CompactRawContactsEditorView extends LinearLayout implements View.O
}
/**
- * Pass through to {@link CompactHeaderView#setPhotoHandler}.
+ * Pass through to {@link CompactPhotoEditorView#setPhotoHandler}.
*/
public void setPhotoHandler(PhotoHandler photoHandler) {
- mHeader.setPhotoHandler(photoHandler);
+ mPhoto.setPhotoHandler(photoHandler);
}
/**
- * Pass through to {@link CompactHeaderView#setPhoto}.
+ * Pass through to {@link CompactPhotoEditorView#setPhoto}.
*/
public void setPhoto(Bitmap bitmap) {
- mHeader.setPhoto(bitmap);
+ mPhoto.setPhoto(bitmap);
}
/**
- * Pass through to {@link CompactHeaderView#isWritablePhotoSet}.
+ * Pass through to {@link CompactPhotoEditorView#isWritablePhotoSet}.
*/
public boolean isWritablePhotoSet() {
- return mHeader.isWritablePhotoSet();
+ return mPhoto.isWritablePhotoSet();
}
/**
@@ -220,7 +220,7 @@ public class CompactRawContactsEditorView extends LinearLayout implements View.O
mPhotoRawContactId = rawContactDelta.getRawContactId();
final ValuesDelta valuesDelta = rawContactDelta.getSuperPrimaryEntry(
dataKind.mimeType, /* forceSelection =*/ true);
- mHeader.setValues(dataKind, valuesDelta, rawContactDelta,
+ mPhoto.setValues(dataKind, valuesDelta, rawContactDelta,
/* readOnly =*/ !dataKind.editable, mMaterialPalette, viewIdGenerator);
return;
}
@@ -327,7 +327,6 @@ public class CompactRawContactsEditorView extends LinearLayout implements View.O
}
}
- // TODO: remove this after KindSectionView is rewritten
private static boolean isEmptyEditorView(View view) {
if (view instanceof TextFieldsEditorView) {
final TextFieldsEditorView textFieldsEditorView = (TextFieldsEditorView) view;