summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/ui
diff options
context:
space:
mode:
authorChao Zhang <chaoz@codeaurora.org>2016-05-03 12:46:49 +0800
committerChao Zhang <chaoz@codeaurora.org>2016-05-06 10:48:08 +0800
commit4c8c153f5b4a82ca44297a47301c30ac1ad3d810 (patch)
tree69dbf6d25f96783e242142266d00e391a4b26175 /src/com/android/gallery3d/ui
parent44fba2a3719737b4aca0cd4ed7fbac77539a971d (diff)
downloadandroid_packages_apps_Gallery2-4c8c153f5b4a82ca44297a47301c30ac1ad3d810.tar.gz
android_packages_apps_Gallery2-4c8c153f5b4a82ca44297a47301c30ac1ad3d810.tar.bz2
android_packages_apps_Gallery2-4c8c153f5b4a82ca44297a47301c30ac1ad3d810.zip
Gallery2: modify some UI interface according to UI document.
1. Modify layout of actionbar when selected photo; 2. Modify menu string in Video Page; 3. Modify compare button's position in photo editor; 4. Modify bottom panel's height in photo editor; 5. Set video play icon to 48dp in PhotoView; Change-Id: Ic660d5dde87998e87eb02482ac7ba7e2ba2f0bb1 CRs-Fixed: 1010984
Diffstat (limited to 'src/com/android/gallery3d/ui')
-rw-r--r--src/com/android/gallery3d/ui/AbstractSlotRenderer.java2
-rw-r--r--src/com/android/gallery3d/ui/PhotoView.java5
-rwxr-xr-xsrc/com/android/gallery3d/ui/TimeLineTitleMaker.java6
3 files changed, 9 insertions, 4 deletions
diff --git a/src/com/android/gallery3d/ui/AbstractSlotRenderer.java b/src/com/android/gallery3d/ui/AbstractSlotRenderer.java
index f5a08097d..0807814a3 100644
--- a/src/com/android/gallery3d/ui/AbstractSlotRenderer.java
+++ b/src/com/android/gallery3d/ui/AbstractSlotRenderer.java
@@ -131,7 +131,7 @@ public abstract class AbstractSlotRenderer implements SlotView.SlotRenderer {
}
protected void drawSelectedFrame(GLCanvas canvas, int width, int height) {
- mSelectionIcon.draw(canvas,15,15);
+ mSelectionIcon.draw(canvas, 5, 5);
//drawFrame(canvas, mFrameSelected.getPaddings(), mFrameSelected, 0, 0, width, height);
}
diff --git a/src/com/android/gallery3d/ui/PhotoView.java b/src/com/android/gallery3d/ui/PhotoView.java
index 228229006..5c9992401 100644
--- a/src/com/android/gallery3d/ui/PhotoView.java
+++ b/src/com/android/gallery3d/ui/PhotoView.java
@@ -205,6 +205,7 @@ public class PhotoView extends GLView {
private UndoBarView mUndoBar;
private Texture mVideoPlayIcon;
private Texture mDrmIcon;
+ private int mVideoPlayIconSize = 0;
private SynchronizedHandler mHandler;
@@ -308,6 +309,8 @@ public class PhotoView extends GLView {
}
});
mVideoPlayIcon = new ResourceTexture(mContext, R.drawable.play_detail);
+ mVideoPlayIconSize = mContext.getResources().getDimensionPixelSize(
+ R.dimen.photo_view_video_icon_size);
mDrmIcon = new ResourceTexture(mContext, R.drawable.drm_image);
for (int i = -SCREEN_NAIL_MAX; i <= SCREEN_NAIL_MAX; i++) {
if (i == 0) {
@@ -942,7 +945,7 @@ public class PhotoView extends GLView {
// Draw the video play icon (in the place where the spinner was)
private void drawVideoPlayIcon(GLCanvas canvas, int side) {
- int s = side / ICON_RATIO;
+ int s = mVideoPlayIconSize;
// Draw the video play icon at the center
mVideoPlayIcon.draw(canvas, -s / 2, -s / 2, s, s);
}
diff --git a/src/com/android/gallery3d/ui/TimeLineTitleMaker.java b/src/com/android/gallery3d/ui/TimeLineTitleMaker.java
index 2b368753a..7a2c9e050 100755
--- a/src/com/android/gallery3d/ui/TimeLineTitleMaker.java
+++ b/src/com/android/gallery3d/ui/TimeLineTitleMaker.java
@@ -48,7 +48,7 @@ public class TimeLineTitleMaker {
private final Context mContext;
private final TimeLineSlotView mTimeLineSlotView;
- private final int TIMELINETITLE_START_X = 16;
+ private final int TIMELINETITLE_START_X;
public TimeLineTitleMaker(Context context, TimeLineSlotRenderer.LabelSpec spec, TimeLineSlotView slotView) {
mContext = context;
@@ -56,6 +56,8 @@ public class TimeLineTitleMaker {
mTimeLineSlotView = slotView;
mTitlePaint = getTextPaint(spec.timeLineTitleFontSize, spec.timeLineTitleTextColor , true);
mCountPaint = getTextPaint(spec.timeLineTitleFontSize, spec.timeLineNumberTextColor, true);
+ TIMELINETITLE_START_X = context.getResources().getDimensionPixelSize(
+ R.dimen.timeline_title_margin);
}
private static TextPaint getTextPaint(
@@ -164,7 +166,7 @@ public class TimeLineTitleMaker {
countString, 0, countString.length(), mediaCountBounds);
int w = mediaCountBounds.width();
y = (height - spec.timeLineTitleFontSize)/2;
- x = width - countString.length() -w;
+ x = width - TIMELINETITLE_START_X - w;
// re-calculate x for RTL
if (View.LAYOUT_DIRECTION_RTL == TextUtils
.getLayoutDirectionFromLocale(Locale.getDefault())) {