Merge "bugfix 5290450 Share UI should match redlines"
diff --git a/res/drawable-hdpi/ic_gallery.png b/res/drawable-hdpi/ic_gallery.png
new file mode 100644
index 0000000..bfccaa6
--- /dev/null
+++ b/res/drawable-hdpi/ic_gallery.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_gallery.png b/res/drawable-mdpi/ic_gallery.png
new file mode 100644
index 0000000..b164c59
--- /dev/null
+++ b/res/drawable-mdpi/ic_gallery.png
Binary files differ
diff --git a/res/drawable-w1024dp-hdpi/ic_gallery.png b/res/drawable-w1024dp-hdpi/ic_gallery.png
new file mode 100644
index 0000000..18da118
--- /dev/null
+++ b/res/drawable-w1024dp-hdpi/ic_gallery.png
Binary files differ
diff --git a/res/drawable-w1024dp-mdpi/ic_gallery.png b/res/drawable-w1024dp-mdpi/ic_gallery.png
new file mode 100644
index 0000000..c977213
--- /dev/null
+++ b/res/drawable-w1024dp-mdpi/ic_gallery.png
Binary files differ
diff --git a/res/drawable-w1024dp-xhdpi/ic_gallery.png b/res/drawable-w1024dp-xhdpi/ic_gallery.png
new file mode 100644
index 0000000..0d6b27f
--- /dev/null
+++ b/res/drawable-w1024dp-xhdpi/ic_gallery.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_gallery.png b/res/drawable-xhdpi/ic_gallery.png
new file mode 100644
index 0000000..eb189f8
--- /dev/null
+++ b/res/drawable-xhdpi/ic_gallery.png
Binary files differ
diff --git a/res/layout/share_popup.xml b/res/layout/share_popup.xml
index 416f46e..c9beb3a 100644
--- a/res/layout/share_popup.xml
+++ b/res/layout/share_popup.xml
@@ -46,17 +46,38 @@
<ImageView android:id="@+id/play"
style="@style/ReviewPlayIcon"/>
</RelativeLayout>
- <FrameLayout
+ <LinearLayout
android:layout_width="@dimen/share_item_width"
android:layout_height="match_parent"
+ android:orientation="vertical"
android:layout_gravity="right"
android:background="@color/share_icon_background">
+ <com.android.camera.ui.RotateLayout
+ android:layout_marginTop="8dip"
+ android:id="@+id/goto_gallery_button_rotate"
+ android:layout_gravity="center"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" >
+ <ImageButton
+ android:id="@+id/goto_gallery_button"
+ android:background="?android:attr/selectableItemBackground"
+ android:layout_gravity="center"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/ic_gallery" />
+ </com.android.camera.ui.RotateLayout>
+ <View
+ android:layout_width="match_parent"
+ android:layout_margin="8dip"
+ android:layout_height="1dp"
+ android:background="#5affffff" />
+
<ListView android:id="@+id/share_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:choiceMode="singleChoice"
style="@android:style/Widget.Holo.ListView" />
- </FrameLayout>
+ </LinearLayout>
</FrameLayout>
</FrameLayout>
diff --git a/src/com/android/camera/ui/SharePopup.java b/src/com/android/camera/ui/SharePopup.java
index 42b27d1..84bada4 100644
--- a/src/com/android/camera/ui/SharePopup.java
+++ b/src/com/android/camera/ui/SharePopup.java
@@ -68,6 +68,7 @@
private ListView mShareList;
// A rotated view that contains the thumbnail.
private RotateLayout mThumbnailRotateLayout;
+ private RotateLayout mGotoGalleryRotate;
private View mPreviewFrame;
private ArrayList<ComponentName> mComponent = new ArrayList<ComponentName>();
@@ -120,6 +121,9 @@
mShareView = (ViewGroup) sharePopup.findViewById(R.id.share_view);
mShareView.setOnClickListener(this);
+ mGotoGalleryRotate =(RotateLayout) sharePopup.findViewById(R.id.goto_gallery_button_rotate);
+ sharePopup.findViewById(R.id.goto_gallery_button).setOnClickListener(this);
+
mBitmapWidth = bitmap.getWidth();
mBitmapHeight = bitmap.getHeight();
@@ -258,6 +262,8 @@
r.setOrientation(orientation);
}
+ mGotoGalleryRotate.setOrientation(orientation);
+
adjustThumbnailPosition();
}
@@ -271,6 +277,7 @@
@Override
public void onClick(View v) {
switch (v.getId()) {
+ case R.id.goto_gallery_button:
case R.id.share_view:
Util.viewUri(mUri, mContext);
break;