Merge branch 'develop' into 'develop'
UI Improvements on MediaActivity See merge request tom79/mastalab!2128
This commit is contained in:
commit
7a92d654b9
|
@ -55,7 +55,7 @@ ext.conscryptLibraryVersion = '2.0.0'
|
||||||
ext.evernoteLibraryVersion = '1.2.6'
|
ext.evernoteLibraryVersion = '1.2.6'
|
||||||
ext.gsonLibraryVersion = '2.8.2'
|
ext.gsonLibraryVersion = '2.8.2'
|
||||||
ext.guavaLibraryVersion = '24.1-android'
|
ext.guavaLibraryVersion = '24.1-android'
|
||||||
ext.photoViewLibraryVersion = '2.0.0'
|
ext.photoViewLibraryVersion = '2.1.3'
|
||||||
ext.swipebackLibraryVersion = '1.0.3'
|
ext.swipebackLibraryVersion = '1.0.3'
|
||||||
ext.ratethisappLibraryVersion = '1.2.0'
|
ext.ratethisappLibraryVersion = '1.2.0'
|
||||||
ext.uploadServiceVersion = "3.4.2"
|
ext.uploadServiceVersion = "3.4.2"
|
||||||
|
|
|
@ -23,11 +23,9 @@ import android.graphics.RectF;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.v4.app.ActivityCompat;
|
import android.support.v4.app.ActivityCompat;
|
||||||
import android.support.v4.content.ContextCompat;
|
import android.support.v4.content.ContextCompat;
|
||||||
import android.support.v7.widget.Toolbar;
|
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@ -74,6 +72,7 @@ import fr.gouv.etalab.mastodon.webview.MastalabWebViewClient;
|
||||||
|
|
||||||
import static fr.gouv.etalab.mastodon.helper.Helper.EXTERNAL_STORAGE_REQUEST_CODE;
|
import static fr.gouv.etalab.mastodon.helper.Helper.EXTERNAL_STORAGE_REQUEST_CODE;
|
||||||
import static fr.gouv.etalab.mastodon.helper.Helper.THEME_BLACK;
|
import static fr.gouv.etalab.mastodon.helper.Helper.THEME_BLACK;
|
||||||
|
import static fr.gouv.etalab.mastodon.helper.Helper.THEME_LIGHT;
|
||||||
import static fr.gouv.etalab.mastodon.helper.Helper.changeDrawableColor;
|
import static fr.gouv.etalab.mastodon.helper.Helper.changeDrawableColor;
|
||||||
|
|
||||||
|
|
||||||
|
@ -90,13 +89,14 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
||||||
private PhotoView imageView;
|
private PhotoView imageView;
|
||||||
private SimpleExoPlayerView videoView;
|
private SimpleExoPlayerView videoView;
|
||||||
private float downX;
|
private float downX;
|
||||||
|
private float downY;
|
||||||
private int mediaPosition;
|
private int mediaPosition;
|
||||||
MediaActivity.actionSwipe currentAction;
|
MediaActivity.actionSwipe currentAction;
|
||||||
static final int MIN_DISTANCE = 100;
|
static final int MIN_DISTANCE = 100;
|
||||||
private String finalUrlDownload;
|
private String finalUrlDownload;
|
||||||
private String preview_url;
|
private String preview_url;
|
||||||
private ImageView prev, next;
|
private ImageView prev, next;
|
||||||
private boolean isHiding;
|
private boolean isControlElementShown = true;
|
||||||
private Bitmap downloadedImage;
|
private Bitmap downloadedImage;
|
||||||
private File fileVideo;
|
private File fileVideo;
|
||||||
private TextView progress;
|
private TextView progress;
|
||||||
|
@ -106,6 +106,8 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
||||||
private TextView media_description;
|
private TextView media_description;
|
||||||
private Attachment attachment;
|
private Attachment attachment;
|
||||||
SwipeBackLayout mSwipeBackLayout;
|
SwipeBackLayout mSwipeBackLayout;
|
||||||
|
private float imageScale = 0;
|
||||||
|
private RelativeLayout action_bar_container;
|
||||||
private enum actionSwipe{
|
private enum actionSwipe{
|
||||||
RIGHT_TO_LEFT,
|
RIGHT_TO_LEFT,
|
||||||
LEFT_TO_RIGHT,
|
LEFT_TO_RIGHT,
|
||||||
|
@ -125,8 +127,9 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
||||||
setTheme(R.style.TransparentBlack);
|
setTheme(R.style.TransparentBlack);
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_media);
|
setContentView(R.layout.activity_media);
|
||||||
|
action_bar_container = (RelativeLayout) findViewById(R.id.action_bar_container);
|
||||||
mSwipeBackLayout = new SwipeBackLayout(MediaActivity.this);
|
mSwipeBackLayout = new SwipeBackLayout(MediaActivity.this);
|
||||||
mSwipeBackLayout.setDirectionMode(SwipeBackLayout.FROM_BOTTOM);
|
mSwipeBackLayout.setDirectionMode(SwipeBackLayout.FROM_TOP);
|
||||||
mSwipeBackLayout.setMaskAlpha(125);
|
mSwipeBackLayout.setMaskAlpha(125);
|
||||||
mSwipeBackLayout.setSwipeBackFactor(0.5f);
|
mSwipeBackLayout.setSwipeBackFactor(0.5f);
|
||||||
mSwipeBackLayout.setSwipeBackListener(new SwipeBackLayout.OnSwipeBackListener() {
|
mSwipeBackLayout.setSwipeBackListener(new SwipeBackLayout.OnSwipeBackListener() {
|
||||||
|
@ -162,17 +165,16 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
||||||
}
|
}
|
||||||
media_description = findViewById(R.id.media_description);
|
media_description = findViewById(R.id.media_description);
|
||||||
message_ready = findViewById(R.id.message_ready);
|
message_ready = findViewById(R.id.message_ready);
|
||||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
|
||||||
setSupportActionBar(toolbar);
|
|
||||||
media_save = findViewById(R.id.media_save);
|
media_save = findViewById(R.id.media_save);
|
||||||
media_share = findViewById(R.id.media_share);
|
media_share = findViewById(R.id.media_share);
|
||||||
media_close = findViewById(R.id.media_close);
|
media_close = findViewById(R.id.media_close);
|
||||||
progress = findViewById(R.id.loader_progress);
|
progress = findViewById(R.id.loader_progress);
|
||||||
webview_video = findViewById(R.id.webview_video);
|
webview_video = findViewById(R.id.webview_video);
|
||||||
|
|
||||||
media_save.setOnClickListener(new View.OnClickListener() {
|
media_save.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
isSHaring = false;
|
isSHaring = true;
|
||||||
if(attachment.getType().toLowerCase().equals("video") || attachment.getType().toLowerCase().equals("gifv") || attachment.getType().toLowerCase().equals("web")) {
|
if(attachment.getType().toLowerCase().equals("video") || attachment.getType().toLowerCase().equals("gifv") || attachment.getType().toLowerCase().equals("web")) {
|
||||||
if( attachment != null ) {
|
if( attachment != null ) {
|
||||||
progress.setText("0 %");
|
progress.setText("0 %");
|
||||||
|
@ -221,28 +223,6 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Handler h = new Handler();
|
|
||||||
scheduleHidden = scheduleHiddenDescription = true;
|
|
||||||
h.postDelayed(new Runnable() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
// DO DELAYED STUFF
|
|
||||||
media_close.setVisibility(View.GONE);
|
|
||||||
media_save.setVisibility(View.GONE);
|
|
||||||
media_share.setVisibility(View.GONE);
|
|
||||||
scheduleHidden = false;
|
|
||||||
}
|
|
||||||
}, 2000);
|
|
||||||
h.postDelayed(new Runnable() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
// DO DELAYED STUFF
|
|
||||||
media_description.setVisibility(View.GONE);
|
|
||||||
scheduleHiddenDescription = false;
|
|
||||||
}
|
|
||||||
}, 6000);
|
|
||||||
canSwipe = true;
|
canSwipe = true;
|
||||||
loader = findViewById(R.id.loader);
|
loader = findViewById(R.id.loader);
|
||||||
imageView = findViewById(R.id.media_picture);
|
imageView = findViewById(R.id.media_picture);
|
||||||
|
@ -252,9 +232,12 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
||||||
if( theme == THEME_BLACK){
|
if( theme == THEME_BLACK){
|
||||||
changeDrawableColor(getApplicationContext(), prev, R.color.dark_icon);
|
changeDrawableColor(getApplicationContext(), prev, R.color.dark_icon);
|
||||||
changeDrawableColor(getApplicationContext(), next, R.color.dark_icon);
|
changeDrawableColor(getApplicationContext(), next, R.color.dark_icon);
|
||||||
}else {
|
}else if(theme == THEME_LIGHT) {
|
||||||
changeDrawableColor(getApplicationContext(), prev, R.color.mastodonC4);
|
changeDrawableColor(getApplicationContext(), prev, R.color.mastodonC4);
|
||||||
changeDrawableColor(getApplicationContext(), next, R.color.mastodonC4);
|
changeDrawableColor(getApplicationContext(), next, R.color.mastodonC4);
|
||||||
|
}else{
|
||||||
|
changeDrawableColor(getApplicationContext(), prev, R.color.white);
|
||||||
|
changeDrawableColor(getApplicationContext(), next, R.color.white);
|
||||||
}
|
}
|
||||||
prev.setOnClickListener(new View.OnClickListener() {
|
prev.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -275,18 +258,28 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
||||||
imageView.setOnMatrixChangeListener(new OnMatrixChangedListener() {
|
imageView.setOnMatrixChangeListener(new OnMatrixChangedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onMatrixChanged(RectF rect) {
|
public void onMatrixChanged(RectF rect) {
|
||||||
|
imageScale = imageView.getScale();
|
||||||
canSwipe = (imageView.getScale() == 1 );
|
canSwipe = (imageView.getScale() == 1 );
|
||||||
mSwipeBackLayout.isDisabled(imageView.getScale() != 1 );
|
mSwipeBackLayout.isDisabled(imageView.getScale() != 1 );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if( attachments != null && attachments.size() > 1){
|
||||||
|
prev.setVisibility(View.VISIBLE);
|
||||||
|
next.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
pbar_inf = findViewById(R.id.pbar_inf);
|
pbar_inf = findViewById(R.id.pbar_inf);
|
||||||
setTitle("");
|
setTitle("");
|
||||||
|
|
||||||
isHiding = false;
|
//isHiding = false;
|
||||||
setTitle("");
|
setTitle("");
|
||||||
displayMediaAtPosition(actionSwipe.POP);
|
displayMediaAtPosition(actionSwipe.POP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onSaveInstanceState(Bundle outState) {
|
||||||
|
outState.putFloat("scale", imageScale);
|
||||||
|
super.onSaveInstanceState(outState);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -297,75 +290,69 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean dispatchTouchEvent(MotionEvent event) {
|
public boolean dispatchTouchEvent(MotionEvent event) {
|
||||||
|
Boolean thisControllShown = isControlElementShown;
|
||||||
if( event.getAction() == MotionEvent.ACTION_DOWN && !scheduleHidden){
|
|
||||||
scheduleHidden = true;
|
|
||||||
media_close.setVisibility(View.VISIBLE);
|
|
||||||
media_save.setVisibility(View.VISIBLE);
|
|
||||||
media_share.setVisibility(View.VISIBLE);
|
|
||||||
Handler handler = new Handler();
|
|
||||||
handler.postDelayed(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
media_close.setVisibility(View.GONE);
|
|
||||||
media_save.setVisibility(View.GONE);
|
|
||||||
media_share.setVisibility(View.GONE);
|
|
||||||
scheduleHidden = false;
|
|
||||||
}
|
|
||||||
}, 2000);
|
|
||||||
}
|
|
||||||
if( event.getAction() == MotionEvent.ACTION_DOWN && !scheduleHiddenDescription){
|
|
||||||
scheduleHiddenDescription = true;
|
|
||||||
if( attachment != null && attachment.getDescription() != null && !attachment.getDescription().equals("null")){
|
|
||||||
media_description.setText(attachment.getDescription());
|
|
||||||
media_description.setVisibility(View.VISIBLE);
|
|
||||||
imageView.setContentDescription(attachment.getDescription());
|
|
||||||
}else{
|
|
||||||
media_description.setText("");
|
|
||||||
media_description.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
Handler handler = new Handler();
|
|
||||||
handler.postDelayed(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
media_description.setVisibility(View.GONE);
|
|
||||||
scheduleHiddenDescription = false;
|
|
||||||
}
|
|
||||||
}, 6000);
|
|
||||||
}
|
|
||||||
if( !canSwipe || mediaPosition > attachments.size() || mediaPosition < 1 || attachments.size() <= 1)
|
|
||||||
return super.dispatchTouchEvent(event);
|
|
||||||
switch(event.getAction()){
|
switch(event.getAction()){
|
||||||
case MotionEvent.ACTION_DOWN: {
|
case MotionEvent.ACTION_DOWN: {
|
||||||
downX = event.getX();
|
downX = event.getX();
|
||||||
|
downY = event.getY();
|
||||||
//Displays navigation left/right buttons
|
//Displays navigation left/right buttons
|
||||||
if( attachments != null && attachments.size() > 1 && !isHiding){
|
if( attachments != null && attachments.size() > 1){
|
||||||
prev.setVisibility(View.VISIBLE);
|
if(thisControllShown){
|
||||||
next.setVisibility(View.VISIBLE);
|
|
||||||
isHiding = true;
|
|
||||||
new Handler().postDelayed(new Runnable(){
|
|
||||||
public void run() {
|
|
||||||
prev.setVisibility(View.GONE);
|
prev.setVisibility(View.GONE);
|
||||||
next.setVisibility(View.GONE);
|
next.setVisibility(View.GONE);
|
||||||
isHiding = false;
|
}else{
|
||||||
|
prev.setVisibility(View.VISIBLE);
|
||||||
|
next.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}, 2000);
|
|
||||||
}
|
}
|
||||||
return super.dispatchTouchEvent(event);
|
return super.dispatchTouchEvent(event);
|
||||||
}
|
}
|
||||||
case MotionEvent.ACTION_UP: {
|
case MotionEvent.ACTION_UP: {
|
||||||
float upX = event.getX();
|
float upX = event.getX();
|
||||||
float deltaX = downX - upX;
|
float deltaX = downX - upX;
|
||||||
|
float upY = event.getY();
|
||||||
|
float deltaY = downY - upY;
|
||||||
// swipe horizontal
|
// swipe horizontal
|
||||||
|
|
||||||
if( downX > MIN_DISTANCE & (Math.abs(deltaX) > MIN_DISTANCE ) ){
|
if( downX > MIN_DISTANCE & (Math.abs(deltaX) > MIN_DISTANCE ) ){
|
||||||
|
if( !canSwipe || mediaPosition > attachments.size() || mediaPosition < 1 || attachments.size() <= 1)
|
||||||
|
return super.dispatchTouchEvent(event);
|
||||||
if(deltaX < 0) { switchOnSwipe(MediaActivity.actionSwipe.LEFT_TO_RIGHT); return true; }
|
if(deltaX < 0) { switchOnSwipe(MediaActivity.actionSwipe.LEFT_TO_RIGHT); return true; }
|
||||||
if(deltaX > 0) { switchOnSwipe(MediaActivity.actionSwipe.RIGHT_TO_LEFT); return true; }
|
if(deltaX > 0) { switchOnSwipe(MediaActivity.actionSwipe.RIGHT_TO_LEFT); return true; }
|
||||||
}else{
|
}else if(downY > MIN_DISTANCE & (Math.abs(deltaY) > MIN_DISTANCE ) ){
|
||||||
|
if(deltaY > 0) { finish(); return true; }
|
||||||
|
if(deltaY < 0) { finish(); return true; }
|
||||||
|
} else {
|
||||||
currentAction = MediaActivity.actionSwipe.POP;
|
currentAction = MediaActivity.actionSwipe.POP;
|
||||||
|
isControlElementShown = !isControlElementShown;
|
||||||
|
if (thisControllShown) {
|
||||||
|
if(event.getY() > action_bar_container.getHeight()) {
|
||||||
|
FullScreencall(thisControllShown);
|
||||||
|
action_bar_container.setVisibility(View.GONE);
|
||||||
|
if (media_description.getVisibility() == View.VISIBLE) {
|
||||||
|
media_description.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
action_bar_container.setVisibility(View.VISIBLE);
|
||||||
|
FullScreencall(thisControllShown);
|
||||||
|
if (attachment != null && attachment.getDescription() != null && !attachment.getDescription().equals("null")) {
|
||||||
|
media_description.setText(attachment.getDescription());
|
||||||
|
media_description.setVisibility(View.VISIBLE);
|
||||||
|
imageView.setContentDescription(attachment.getDescription());
|
||||||
|
} else {
|
||||||
|
media_description.setText("");
|
||||||
|
media_description.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return super.dispatchTouchEvent(event);
|
return super.dispatchTouchEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -561,20 +548,46 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
||||||
@Override
|
@Override
|
||||||
public void onResume(){
|
public void onResume(){
|
||||||
super.onResume();
|
super.onResume();
|
||||||
FullScreencall();
|
|
||||||
if( player != null) {
|
if( player != null) {
|
||||||
player.setPlayWhenReady(true);
|
player.setPlayWhenReady(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public void FullScreencall() {
|
|
||||||
|
@Override
|
||||||
|
protected void onPostResume() {
|
||||||
|
super.onPostResume();
|
||||||
|
FullScreencall(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FullScreencall(Boolean shouldFullscreen) {
|
||||||
if(Build.VERSION.SDK_INT < 19) {
|
if(Build.VERSION.SDK_INT < 19) {
|
||||||
View v = this.getWindow().getDecorView();
|
View v = this.getWindow().getDecorView();
|
||||||
|
if(shouldFullscreen){
|
||||||
v.setSystemUiVisibility(View.GONE);
|
v.setSystemUiVisibility(View.GONE);
|
||||||
|
}else {
|
||||||
|
v.setSystemUiVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
View decorView = getWindow().getDecorView();
|
View decorView = getWindow().getDecorView();
|
||||||
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
|
if(shouldFullscreen){
|
||||||
decorView.setSystemUiVisibility(uiOptions);
|
decorView.setSystemUiVisibility(
|
||||||
|
View.SYSTEM_UI_FLAG_IMMERSIVE
|
||||||
|
// Set the content to appear under the system bars so that the
|
||||||
|
// content doesn't resize when the system bars hide and show.
|
||||||
|
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||||
|
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||||
|
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||||
|
// Hide the nav bar and status bar
|
||||||
|
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
||||||
|
| View.SYSTEM_UI_FLAG_FULLSCREEN
|
||||||
|
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
|
||||||
|
}else{
|
||||||
|
decorView.setSystemUiVisibility(
|
||||||
|
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||||
|
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||||
|
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
app:isSwipeFromEdge="true"
|
app:isSwipeFromEdge="true"
|
||||||
app:maskAlpha="125"
|
app:maskAlpha="125"
|
||||||
app:swipeBackFactor="0.5">
|
app:swipeBackFactor="0.5">
|
||||||
|
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -32,7 +31,6 @@
|
||||||
android:id="@+id/main_container_media">
|
android:id="@+id/main_container_media">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Main Loader -->
|
<!-- Main Loader -->
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/loader"
|
android:id="@+id/loader"
|
||||||
|
@ -82,6 +80,7 @@
|
||||||
android:id="@+id/media_picture"
|
android:id="@+id/media_picture"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
/>
|
/>
|
||||||
<TextView
|
<TextView
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
@ -89,7 +88,7 @@
|
||||||
android:id="@+id/media_description"
|
android:id="@+id/media_description"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="20dip"
|
android:layout_marginBottom="62dp"
|
||||||
android:layout_gravity="center_horizontal|bottom"
|
android:layout_gravity="center_horizontal|bottom"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
android:background="#AA000000"
|
android:background="#AA000000"
|
||||||
|
@ -104,41 +103,12 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ImageView
|
<RelativeLayout
|
||||||
android:id="@+id/media_prev"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="20dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="20dp"
|
android:background="@color/transparent_grey"
|
||||||
android:layout_alignParentStart="true"
|
android:id="@+id/action_bar_container"
|
||||||
android:layout_alignParentLeft="true"
|
android:paddingTop="16dp">
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginEnd="5dp"
|
|
||||||
android:layout_marginRight="5dp"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:contentDescription="@string/previous"
|
|
||||||
android:src="@drawable/ic_first_page"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/media_next"
|
|
||||||
android:layout_width="20dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginEnd="5dp"
|
|
||||||
android:layout_marginRight="5dp"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:contentDescription="@string/next"
|
|
||||||
android:src="@drawable/ic_last_page"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/media_close"
|
android:id="@+id/media_close"
|
||||||
android:layout_width="35dp"
|
android:layout_width="35dp"
|
||||||
|
@ -149,6 +119,7 @@
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
android:background="@color/transparent"
|
android:background="@color/transparent"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
|
@ -166,20 +137,6 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:id="@+id/media_share"
|
|
||||||
app:layout_anchorGravity="top|left"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:background="@color/transparent"
|
|
||||||
android:layout_marginLeft="10dp"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_width="30dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:src="@drawable/ic_share_media"
|
|
||||||
android:scaleType="fitXY"
|
|
||||||
android:contentDescription="@string/share"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/media_save"
|
android:id="@+id/media_save"
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
|
@ -187,14 +144,68 @@
|
||||||
android:background="@color/transparent"
|
android:background="@color/transparent"
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginRight="15dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:src="@drawable/ic_save_white"
|
android:src="@drawable/ic_save_white"
|
||||||
android:contentDescription="@string/download"
|
android:contentDescription="@string/download"
|
||||||
android:layout_marginEnd="10dp" />
|
/>
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/media_share"
|
||||||
|
app:layout_anchorGravity="top|left"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:background="@color/transparent"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:layout_marginRight="15dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:src="@drawable/ic_share_media"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:contentDescription="@string/share"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/media_prev"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:background="@color/transparent_grey"
|
||||||
|
android:tint="@color/white"
|
||||||
|
android:contentDescription="@string/previous"
|
||||||
|
android:src="@drawable/ic_first_page"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/media_next"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:background="@color/transparent_grey"
|
||||||
|
android:contentDescription="@string/next"
|
||||||
|
android:src="@drawable/ic_last_page"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -205,6 +216,7 @@
|
||||||
android:text="@string/media_ready"
|
android:text="@string/media_ready"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
|
|
||||||
android:layout_alignBottom="@+id/media_picture_container"
|
android:layout_alignBottom="@+id/media_picture_container"
|
||||||
android:layout_marginBottom="40dp"
|
android:layout_marginBottom="40dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
org.gradle.jvmargs=-Xmx1536m
|
org.gradle.jvmargs=-Xmx1536m
|
||||||
|
|
||||||
# When configured, Gradle will run in incubating parallel mode.
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
|
|
Loading…
Reference in New Issue