mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-06-27 09:02:59 +02:00
make the buttons not clickable if invisible
This commit is contained in:
@ -172,7 +172,6 @@ public class MainActivity extends SimpleActivity
|
|||||||
mTimerHandler = new Handler();
|
mTimerHandler = new Handler();
|
||||||
mFadeHandler = new Handler();
|
mFadeHandler = new Handler();
|
||||||
setupPreviewImage(true);
|
setupPreviewImage(true);
|
||||||
scheduleFadeOut();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean hasCameraAndStoragePermission() {
|
private boolean hasCameraAndStoragePermission() {
|
||||||
@ -478,6 +477,11 @@ public class MainActivity extends SimpleActivity
|
|||||||
|
|
||||||
private void fadeAnim(View view, float value) {
|
private void fadeAnim(View view, float value) {
|
||||||
view.animate().alpha(value).start();
|
view.animate().alpha(value).start();
|
||||||
|
if (value == .0f) {
|
||||||
|
view.setClickable(false);
|
||||||
|
} else {
|
||||||
|
view.setClickable(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void hideNavigationBarIcons() {
|
private void hideNavigationBarIcons() {
|
||||||
@ -512,6 +516,7 @@ public class MainActivity extends SimpleActivity
|
|||||||
if (hasCameraAndStoragePermission()) {
|
if (hasCameraAndStoragePermission()) {
|
||||||
resumeCameraItems();
|
resumeCameraItems();
|
||||||
setupPreviewImage(mIsInPhotoMode);
|
setupPreviewImage(mIsInPhotoMode);
|
||||||
|
scheduleFadeOut();
|
||||||
|
|
||||||
if (mIsVideoCaptureIntent && mIsInPhotoMode) {
|
if (mIsVideoCaptureIntent && mIsInPhotoMode) {
|
||||||
togglePhotoVideo();
|
togglePhotoVideo();
|
||||||
|
Reference in New Issue
Block a user