summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2016-11-29 09:48:23 +0100
committerMichael Bestas <mikeioannina@gmail.com>2017-01-04 22:00:44 +0200
commit05761473ea98482d9ae584d50eebc9bc400ea371 (patch)
tree552d139f11f2253b81dfcb11a7d6ecca76cc8e4e
parent988ea6adcbbacbf350c1b9d076847d10e9e389c5 (diff)
downloadandroid_packages_apps_Snap-05761473ea98482d9ae584d50eebc9bc400ea371.zip
android_packages_apps_Snap-05761473ea98482d9ae584d50eebc9bc400ea371.tar.gz
android_packages_apps_Snap-05761473ea98482d9ae584d50eebc9bc400ea371.tar.bz2
Fix some photo UI layout issues.
Change-Id: I04a68fe2e379db4a228d19cbe6444a10a8024ce0
-rw-r--r--res/layout/camera_controls.xml30
-rw-r--r--src/com/android/camera/CameraActivity.java6
-rw-r--r--src/com/android/camera/ui/CameraControls.java9
3 files changed, 25 insertions, 20 deletions
diff --git a/res/layout/camera_controls.xml b/res/layout/camera_controls.xml
index 1d1314e..04c2f9e 100644
--- a/res/layout/camera_controls.xml
+++ b/res/layout/camera_controls.xml
@@ -76,15 +76,15 @@
android:background="@drawable/camera_controls_bg_opaque"
android:orientation="horizontal">
- <com.android.camera.ui.RotateImageView
- android:id="@+id/preview_thumb"
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/preview_thumb"
android:layout_width="0dp"
android:layout_height="@dimen/thumbnail_size"
- android:layout_weight="25"
+ android:layout_weight="25"
android:layout_gravity="center_horizontal|center_vertical"
- android:background="@android:color/transparent"
- android:contentDescription="@string/switch_photo_filmstrip"
- android:scaleType="fitCenter" />
+ android:background="@android:color/transparent"
+ android:contentDescription="@string/switch_photo_filmstrip"
+ android:scaleType="fitCenter" />
<LinearLayout
android:layout_width="0dp"
@@ -118,15 +118,19 @@
</LinearLayout>
- <com.android.camera.ui.ModuleSwitcher
- android:id="@+id/camera_switcher"
- style="@style/SwitcherButton"
+ <FrameLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:scaleType="center"
- android:layout_weight="25"
- android:layout_gravity="center_horizontal|center_vertical"
- android:contentDescription="@string/accessibility_mode_picker" />
+ android:layout_weight="25">
+
+ <com.android.camera.ui.ModuleSwitcher
+ android:id="@+id/camera_switcher"
+ style="@style/SwitcherButton"
+ android:layout_gravity="center"
+ android:scaleType="center"
+ android:contentDescription="@string/accessibility_mode_picker" />
+ </FrameLayout>
+
</LinearLayout>
<LinearLayout
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index 21fe651..ac3f2bc 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -744,7 +744,7 @@ public class CameraActivity extends Activity
if (!isSecureCamera()) {
mThumbnail.setVisibility(View.VISIBLE);
} else {
- mThumbnail.setVisibility(View.GONE);
+ mThumbnail.setVisibility(View.INVISIBLE);
}
}
}
@@ -757,7 +757,7 @@ public class CameraActivity extends Activity
if (!isSecureCamera()) {
mThumbnail.setVisibility(View.VISIBLE);
} else {
- mThumbnail.setVisibility(View.GONE);
+ mThumbnail.setVisibility(View.INVISIBLE);
}
}
}
@@ -811,7 +811,7 @@ public class CameraActivity extends Activity
if (mThumbnail != null) {
// Clear the image resource when the bitmap is invalid.
mThumbnail.setImageDrawable(null);
- mThumbnail.setVisibility(View.GONE);
+ mThumbnail.setVisibility(View.INVISIBLE);
}
} else {
updateThumbnail(bitmap);
diff --git a/src/com/android/camera/ui/CameraControls.java b/src/com/android/camera/ui/CameraControls.java
index 1436390..fa9796f 100644
--- a/src/com/android/camera/ui/CameraControls.java
+++ b/src/com/android/camera/ui/CameraControls.java
@@ -414,10 +414,10 @@ public class CameraControls extends RotatableLayout {
}
private void layoutRemaingPhotos() {
- int rl = mThumbnail.getLeft();
- int rt = mThumbnail.getTop();
- int rr = mThumbnail.getRight();
- int rb = mThumbnail.getBottom();
+ int rl = mThumbnail.getLeft() + mBottomBar.getLeft();
+ int rt = mBottomBar.getTop();
+ int rr = rl + mThumbnail.getWidth();
+ int rb = rt + mThumbnail.getHeight();
int w = mRemainingPhotos.getMeasuredWidth();
int h = mRemainingPhotos.getMeasuredHeight();
int m = getResources().getDimensionPixelSize(R.dimen.remaining_photos_margin);
@@ -450,6 +450,7 @@ public class CameraControls extends RotatableLayout {
} else {
mRemainingPhotosText.setText(remaining + " ");
}
+ mRemainingPhotos.setVisibility(View.VISIBLE);
}
mCurrentRemaining = remaining;
}