aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-04-02 23:53:12 +0200
committerChristian Schneppe <christian@pix-art.de>2018-04-02 23:53:12 +0200
commitf131584b0d8eadddf8840135f8d5dea064a11b96 (patch)
treed74a02e61b3acd65e55c0f0ebe653afbc3004e69 /src/main/java/de
parent4572bc579715653848135d479fd7506a8ebf3e74 (diff)
show new fab in ShowFullscreenMessageActivity
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java42
1 files changed, 29 insertions, 13 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java b/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java
index 83928d0cd..d4528f962 100644
--- a/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java
@@ -10,12 +10,12 @@ import android.media.MediaMetadataRetriever;
import android.net.Uri;
import android.os.Bundle;
import android.preference.PreferenceManager;
-import android.support.v7.app.AppCompatActivity;
+import android.support.design.widget.FloatingActionButton;
+import android.support.v7.app.ActionBar;
import android.util.Log;
import android.view.View;
import android.view.WindowManager;
import android.webkit.MimeTypeMap;
-import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.Toast;
@@ -39,7 +39,7 @@ import de.pixart.messenger.utils.ExifHelper;
import static de.pixart.messenger.persistance.FileBackend.close;
-public class ShowFullscreenMessageActivity extends AppCompatActivity {
+public class ShowFullscreenMessageActivity extends XmppActivity {
Integer oldOrientation;
PhotoView mImage;
@@ -47,7 +47,7 @@ public class ShowFullscreenMessageActivity extends AppCompatActivity {
ImageView mFullscreenbutton;
Uri mFileUri;
File mFile;
- ImageButton mFAB;
+ FloatingActionButton fab;
int height = 0;
int width = 0;
int rotation = 0;
@@ -55,6 +55,14 @@ public class ShowFullscreenMessageActivity extends AppCompatActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ this.mTheme = findTheme();
+ setTheme(this.mTheme);
+
+ ActionBar actionBar = getSupportActionBar();
+ if (actionBar != null && actionBar.isShowing()) {
+ actionBar.hide();
+ }
+
oldOrientation = getRequestedOrientation();
WindowManager.LayoutParams layout = getWindow().getAttributes();
@@ -63,17 +71,15 @@ public class ShowFullscreenMessageActivity extends AppCompatActivity {
}
getWindow().setAttributes(layout);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+ getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_fullscreen_message);
mImage = findViewById(R.id.message_image_view);
mVideo = findViewById(R.id.message_video_view);
mFullscreenbutton = findViewById(R.id.vcv_img_fullscreen);
- mFAB = findViewById(R.id.imageButton);
- mFAB.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- mVideo.reset();
- shareWith(mFile);
- }
+ fab = findViewById(R.id.fab);
+ fab.setOnClickListener(v -> {
+ mVideo.reset();
+ shareWith(mFile);
});
}
@@ -105,6 +111,11 @@ public class ShowFullscreenMessageActivity extends AppCompatActivity {
}
@Override
+ protected void refreshUiReal() {
+
+ }
+
+ @Override
protected void onStart() {
super.onStart();
Intent intent = getIntent();
@@ -227,7 +238,7 @@ public class ShowFullscreenMessageActivity extends AppCompatActivity {
}
@Override
- protected void onResume() {
+ public void onResume() {
WindowManager.LayoutParams layout = getWindow().getAttributes();
if (useMaxBrightness()) {
layout.screenBrightness = 1;
@@ -239,7 +250,7 @@ public class ShowFullscreenMessageActivity extends AppCompatActivity {
}
@Override
- protected void onPause() {
+ public void onPause() {
mVideo.reset();
WindowManager.LayoutParams layout = getWindow().getAttributes();
if (useMaxBrightness()) {
@@ -264,6 +275,11 @@ public class ShowFullscreenMessageActivity extends AppCompatActivity {
super.onStop();
}
+ @Override
+ void onBackendConnected() {
+
+ }
+
public boolean useMaxBrightness() {
return getPreferences().getBoolean("use_max_brightness", getResources().getBoolean(R.bool.use_max_brightness));
}