cleanup
This commit is contained in:
parent
1a04181f78
commit
73143f3236
|
@ -96,7 +96,7 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
||||||
private String finalUrlDownload;
|
private String finalUrlDownload;
|
||||||
private String preview_url;
|
private String preview_url;
|
||||||
private ImageView prev, next;
|
private ImageView prev, next;
|
||||||
private boolean isControlElementShown;
|
private boolean isControlElementShown = true;
|
||||||
private Bitmap downloadedImage;
|
private Bitmap downloadedImage;
|
||||||
private File fileVideo;
|
private File fileVideo;
|
||||||
private TextView progress;
|
private TextView progress;
|
||||||
|
@ -323,18 +323,19 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
||||||
if(deltaY < 0) { finish(); return true; }
|
if(deltaY < 0) { finish(); return true; }
|
||||||
} else {
|
} else {
|
||||||
currentAction = MediaActivity.actionSwipe.POP;
|
currentAction = MediaActivity.actionSwipe.POP;
|
||||||
if(event.getY() > action_bar_container.getHeight()) {
|
isControlElementShown = !isControlElementShown;
|
||||||
isControlElementShown = !isControlElementShown;
|
if (thisControllShown) {
|
||||||
FullScreencall(thisControllShown);
|
if(event.getY() > action_bar_container.getHeight()) {
|
||||||
if (thisControllShown) {
|
FullScreencall(thisControllShown);
|
||||||
action_bar_container.setVisibility(View.GONE);
|
action_bar_container.setVisibility(View.GONE);
|
||||||
} else {
|
if (media_description.getVisibility() == View.VISIBLE) {
|
||||||
action_bar_container.setVisibility(View.VISIBLE);
|
media_description.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
if (media_description.getVisibility() == View.VISIBLE && thisControllShown) {
|
action_bar_container.setVisibility(View.VISIBLE);
|
||||||
media_description.setVisibility(View.GONE);
|
FullScreencall(thisControllShown);
|
||||||
} else if (!thisControllShown && attachment != null && attachment.getDescription() != null && !attachment.getDescription().equals("null")) {
|
if (attachment != null && attachment.getDescription() != null && !attachment.getDescription().equals("null")) {
|
||||||
media_description.setText(attachment.getDescription());
|
media_description.setText(attachment.getDescription());
|
||||||
media_description.setVisibility(View.VISIBLE);
|
media_description.setVisibility(View.VISIBLE);
|
||||||
imageView.setContentDescription(attachment.getDescription());
|
imageView.setContentDescription(attachment.getDescription());
|
||||||
|
@ -343,12 +344,15 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
||||||
media_description.setVisibility(View.GONE);
|
media_description.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return super.dispatchTouchEvent(event);
|
return super.dispatchTouchEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -544,7 +548,6 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
||||||
@Override
|
@Override
|
||||||
public void onResume(){
|
public void onResume(){
|
||||||
super.onResume();
|
super.onResume();
|
||||||
FullScreencall(isControlElementShown);
|
|
||||||
if( player != null) {
|
if( player != null) {
|
||||||
player.setPlayWhenReady(true);
|
player.setPlayWhenReady(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue