mirror of
https://gitee.com/shuto/customCamera.git
synced 2026-05-02 00:07:24 +08:00
Fix bug status miniature is not kept when the user turn the device.
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginLeft="@dimen/activity_vertical_margin"
|
||||
android:background="@android:color/transparent"
|
||||
android:onClick="buttonMiniature"
|
||||
android:onClick="toggleMiniature"
|
||||
android:src="@drawable/minimise" />
|
||||
|
||||
<ImageButton
|
||||
|
||||
@@ -522,19 +522,27 @@ public class CameraActivity extends Activity {
|
||||
ImageView background = (ImageView) findViewById(R.id.background);
|
||||
ImageButton miniature = (ImageButton) view;
|
||||
|
||||
if (modeMiniature) {
|
||||
modeMiniature = false;
|
||||
if (!modeMiniature) {
|
||||
miniature.setImageResource(R.drawable.minimise);
|
||||
// Reset the default position and size for the background.
|
||||
setBackground();
|
||||
} else {
|
||||
modeMiniature = true;
|
||||
miniature.setImageResource(R.drawable.maximise);
|
||||
// Set new size for miniature layout.
|
||||
setParamsMiniature(background, true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle the miniature function.
|
||||
*
|
||||
* @param view
|
||||
*/
|
||||
public void toggleMiniature(View view) {
|
||||
modeMiniature = !modeMiniature;
|
||||
buttonMiniature(view);
|
||||
}
|
||||
|
||||
/**
|
||||
* To manage the display of the zoom bar.
|
||||
* @param displayStatus
|
||||
|
||||
Reference in New Issue
Block a user