new release

This commit is contained in:
Page Asgardius 2023-01-01 14:43:38 -07:00
parent 803297b2d6
commit 3e67badeb2
5 changed files with 38 additions and 20 deletions

View file

@ -9,8 +9,8 @@ android {
applicationId "asgardius.page.s3manager" applicationId "asgardius.page.s3manager"
minSdk 23 minSdk 23
targetSdk 33 targetSdk 33
versionCode 58 versionCode 59
versionName "0.6.0" versionName "0.6.1"
setProperty("archivesBaseName", "s3-manager-$versionName") setProperty("archivesBaseName", "s3-manager-$versionName")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View file

@ -11,13 +11,14 @@
<ul> <ul>
<li>Amazon Web Services SDK 2.60.0</li> <li>Amazon Web Services SDK 2.60.0</li>
<li>ExoPlayer 2.18.2</li> <li>ExoPlayer 2.18.2</li>
<li>ZoomLayout 1.9.0</li>
<li>Adwaita Icon Theme for GNOME 43</li> <li>Adwaita Icon Theme for GNOME 43</li>
<li>pdf.js</li> <li>pdf.js</li>
</ul> </ul>
<H3>This software released under GNU General Public License 3</H3> <H3>This software released under GNU General Public License 3</H3>
<p>You can find source code at https://patrice.asgardius.company/gitea/asgardius/s3manager <p>You can find source code at https://patrice.asgardius.company/gitea/asgardius/s3manager
<br> <br>
You need to setup a pdf.js server to use pdf viewer. Just download latest version from official website and upload to any web server with ssl on same root domain than S3 server (can be same subdomain or a different one in some cases). Then set url to pdfjs root folder like https://example.com/pdfjs-dist You need to setup a pdf.js server to use pdf viewer. You can use https://office.asgardius.company/pdfjs or setup your own.
<br> <br>
You can find technical support on official forum https://forum.asgardius.company/t/s3-manager</p> You can find technical support on official forum https://forum.asgardius.company/t/s3-manager</p>
</Body> </Body>

View file

@ -2,13 +2,17 @@ package asgardius.page.s3manager;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import android.annotation.SuppressLint;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.os.Bundle; import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.Toast; import android.widget.Toast;
import com.otaliastudios.zoom.ZoomImageView;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.net.URL; import java.net.URL;
@ -16,9 +20,11 @@ import java.util.stream.Collectors;
public class ImageViewer extends AppCompatActivity { public class ImageViewer extends AppCompatActivity {
String videoURL, title; String videoURL, title;
ImageView iv; ZoomImageView iv;
boolean controls = false; boolean controls = false;
float cursorx, cursory;
@SuppressLint("ClickableViewAccessibility")
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@ -27,7 +33,7 @@ public class ImageViewer extends AppCompatActivity {
title = getIntent().getStringExtra("title"); title = getIntent().getStringExtra("title");
getSupportActionBar().setTitle(title); getSupportActionBar().setTitle(title);
final ProgressBar simpleProgressBar = (ProgressBar) findViewById(R.id.simpleProgressBar); final ProgressBar simpleProgressBar = (ProgressBar) findViewById(R.id.simpleProgressBar);
iv = (ImageView) findViewById(R.id.imageViewer); iv = (ZoomImageView) findViewById(R.id.imageViewer);
//System.out.println(videoURL); //System.out.println(videoURL);
Thread imgread = new Thread(new Runnable() { Thread imgread = new Thread(new Runnable() {
@ -74,20 +80,28 @@ public class ImageViewer extends AppCompatActivity {
} }
}); });
imgread.start(); imgread.start();
iv.setOnClickListener(new View.OnClickListener(){ iv.setOnTouchListener((v, event) -> {
@Override
public void onClick(View view) {
//buttonaction
if(controls) {
controls = false;
hideSystemBars();
}
else {
controls = true;
showSystemBars();
}
}
if (event.getAction() == MotionEvent.ACTION_DOWN) {
cursorx = event.getX();
cursory = event.getY();
iv.performClick();
return true;
} else if (event.getAction() == MotionEvent.ACTION_UP) {
if(Math.abs(event.getX() - cursorx) < 5 || Math.abs(event.getY() - cursory) < 5) {
if(controls) {
controls = false;
hideSystemBars();
}
else {
controls = true;
showSystemBars();
}
}
return true;
}
return false;
}); });
} }

View file

@ -6,7 +6,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".ImageViewer"> tools:context=".ImageViewer">
<ImageView <com.otaliastudios.zoom.ZoomImageView
android:id="@+id/imageViewer" android:id="@+id/imageViewer"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
@ -14,7 +14,9 @@
app:srcCompat="@drawable/empty" app:srcCompat="@drawable/empty"
tools:ignore="MissingConstraints" tools:ignore="MissingConstraints"
tools:layout_editor_absoluteX="0dp" tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="82dp" /> tools:layout_editor_absoluteY="82dp"
app:minZoom="1.0"
app:maxZoom="25.5" />
<ProgressBar <ProgressBar
android:id="@+id/simpleProgressBar" android:id="@+id/simpleProgressBar"

View file

@ -0,0 +1 @@
* Enhanced picture viewer