Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT: UI/UX Improvements #550

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ dependencies {
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
implementation 'com.github.dmytrodanylyk.android-process-button:library:1.0.4'
implementation 'com.jakewharton.timber:timber:4.5.1'
implementation 'com.github.mohammadatif:Animatoo:master'
implementation 'com.github.Cutta:LoadingImagesAnimation:1.1'
implementation 'com.mikhaellopez:rxanimation:1.0.0'

// Otto and Retrofit
implementation 'com.squareup:otto:1.3.8'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import android.widget.FrameLayout;
import android.widget.RelativeLayout;

import com.blogspot.atifsoftwares.animatoolib.Animatoo;
import com.squareup.otto.Subscribe;

import org.amahi.anywhere.AmahiApplication;
Expand Down Expand Up @@ -321,6 +322,7 @@ public void onOfflineFilesSelected(OfflineFilesSelectedEvent event) {
private void showOfflineFiles() {
Intent intent = Intents.Builder.with(this).buildServerFilesActivityForOfflineFiles();
startActivity(intent);
Animatoo.animateSwipeRight(this);
}

@Subscribe
Expand All @@ -336,6 +338,7 @@ public void onRecentFilesSelected(RecentFilesSelectedEvent event) {
private void showRecentFiles() {
Intent intent = Intents.Builder.with(this).buildRecentFilesActivity();
startActivity(intent);
Animatoo.animateSlideUp(this);
}

@Subscribe
Expand All @@ -346,6 +349,7 @@ public void onShareSelected(ShareSelectedEvent event) {
private void setUpShare(ServerShare share) {
Intent intent = Intents.Builder.with(this).buildServerFilesActivity(share);
startActivity(intent);
Animatoo.animateSwipeLeft(this);
}

@Subscribe
Expand All @@ -356,6 +360,7 @@ public void onAppSelected(AppSelectedEvent event) {
private void setUpApp(ServerApp app) {
Intent intent = Intents.Builder.with(this).buildServerAppAcitivity(app);
startActivity(intent);
Animatoo.animateSplit(this);
}

@Subscribe
Expand All @@ -366,6 +371,7 @@ public void onSettingsSelected(SettingsSelectedEvent event) {
private void setUpSettings() {
Intent intent = Intents.Builder.with(this).buildSettingsIntent();
startActivityForResult(intent, SETTINGS_ACTION);
Animatoo.animateInAndOut(this);
}

@Override
Expand All @@ -374,6 +380,7 @@ protected void onActivityResult(int requestCode, int resultCode, @Nullable Inten
if (resultCode == SettingsActivity.RESULT_THEME_UPDATED) {
finish();
startActivity(getIntent());
Animatoo.animateInAndOut(this);
return;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;

import com.blogspot.atifsoftwares.animatoolib.Animatoo;
import com.google.android.material.snackbar.Snackbar;
import androidx.fragment.app.Fragment;
import androidx.appcompat.app.AppCompatActivity;
Expand Down Expand Up @@ -101,6 +103,7 @@ private boolean isFileDownloaded(ServerFile file) {
private void startFileActivity(ServerFile file, List<ServerFile> serverFiles) {
Intent intent = Intents.Builder.with(this).buildServerFileIntent(null, serverFiles, file);
startActivity(intent);
Animatoo.animateSwipeLeft(this);
}

@Subscribe
Expand All @@ -120,6 +123,7 @@ private Uri getContentUri(ServerFile serverFile) {
private void startFileSharingActivity(ServerFile file, Uri fileUri) {
Intent intent = Intents.Builder.with(this).buildServerFileSharingIntent(file, fileUri);
startActivity(intent);
Animatoo.animateSlideUp(this);
}

@Subscribe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import android.os.Handler;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;

import com.blogspot.atifsoftwares.animatoolib.Animatoo;
import com.google.android.material.snackbar.Snackbar;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import androidx.appcompat.app.AppCompatActivity;
Expand Down Expand Up @@ -210,6 +212,7 @@ private void setRecentFiles(RecentFile recentFile) {
private void startFileActivity(RecentFile file) {
Intent intent = Intents.Builder.with(this).buildRecentFileIntent(file);
startActivity(intent);
Animatoo.animateSplit(this);
}

@Override
Expand Down Expand Up @@ -425,6 +428,7 @@ private void showFileDownloadedDialog(RecentFile recentFile, Uri fileUri) {
private void startFileOpeningActivity(RecentFile file, Uri fileUri) {
Intent intent = Intents.Builder.with(this).buildServerFileOpeningIntent(prepareServerFile(file), fileUri);
startActivity(intent);
Animatoo.animateSlideDown(this);
}

private RecentFile getSelectedRecentFile() {
Expand All @@ -434,6 +438,7 @@ private RecentFile getSelectedRecentFile() {
private void startFileSharingActivity(RecentFile file, Uri fileUri) {
Intent intent = Intents.Builder.with(this).buildServerFileSharingIntent(prepareServerFile(file), fileUri);
startActivity(intent);
Animatoo.animateSlideDown(this);
}

private void deleteFile() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.blogspot.atifsoftwares.animatoolib.Animatoo;

import org.amahi.anywhere.AmahiApplication;
import org.amahi.anywhere.R;
import org.amahi.anywhere.server.client.ServerClient;
Expand Down Expand Up @@ -95,6 +97,7 @@ private String getAppUrl() {

private void setUpAppWebAgent() {
getWebView().getSettings().setUserAgentString(getAppWebAgent());
Animatoo.animateSwipeLeft(this);
}

private WebView getWebView() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import android.widget.MediaController;
import android.widget.TextView;

import com.blogspot.atifsoftwares.animatoolib.Animatoo;
import com.google.android.exoplayer2.ui.PlayerControlView;
import com.google.android.gms.cast.MediaInfo;
import com.google.android.gms.cast.MediaLoadOptions;
Expand Down Expand Up @@ -175,6 +176,7 @@ private void prepareFiles() {
List<ServerFile> serverFiles = new ArrayList<>();
serverFiles.add(serverFile);
getIntent().putExtra(Intents.Extras.SERVER_FILES, new ArrayList<Parcelable>(serverFiles));
Animatoo.animateSwipeLeft(this);
}
}

Expand Down Expand Up @@ -314,6 +316,7 @@ protected void onStart() {
private void setUpAudioService() {
Intent intent = new Intent(this, AudioService.class);
startService(intent);
Animatoo.animateSwipeLeft(this);
}

private void setUpAudioServiceBind() {
Expand Down Expand Up @@ -687,6 +690,7 @@ protected void onDestroy() {
private void tearDownAudioService() {
Intent intent = new Intent(this, AudioService.class);
stopService(intent);
Animatoo.animateSwipeLeft(this);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import android.view.Menu;
import android.view.MenuItem;

import com.blogspot.atifsoftwares.animatoolib.Animatoo;
import com.google.android.gms.cast.MediaInfo;
import com.google.android.gms.cast.MediaLoadOptions;
import com.google.android.gms.cast.MediaMetadata;
Expand Down Expand Up @@ -135,6 +136,7 @@ private void prepareFiles() {
List<ServerFile> serverFiles = new ArrayList<>();
serverFiles.add(serverFile);
getIntent().putExtra(Intents.Extras.SERVER_FILES, new ArrayList<Parcelable>(serverFiles));
Animatoo.animateSwipeLeft(this);
}
}

Expand Down Expand Up @@ -350,6 +352,7 @@ private void finishFileDownloading(Uri fileUri) {
private void startFileSharingActivity(ServerFile file, Uri fileUri) {
Intent intent = Intents.Builder.with(this).buildServerFileSharingIntent(file, fileUri);
startActivity(intent);
Animatoo.animateSwipeLeft(this);
}

@Subscribe
Expand Down Expand Up @@ -475,7 +478,7 @@ private String getImageUri(ServerFile serverFile) {
}
return serverClient.getFileUri(getShare(), getCurrentFile()).toString();
}

//
private String getRecentFileUri() {
RecentFileRepository repository = new RecentFileRepository(this);
return repository.getRecentFile(getCurrentFile().getUniqueKey()).getUri();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import android.widget.ProgressBar;
import android.widget.Toast;

import com.blogspot.atifsoftwares.animatoolib.Animatoo;
import com.google.android.gms.cast.MediaInfo;
import com.google.android.gms.cast.MediaMetadata;
import com.google.android.gms.cast.framework.CastButtonFactory;
Expand Down Expand Up @@ -173,6 +174,7 @@ private void prepareFiles() {
List<ServerFile> serverFiles = new ArrayList<>();
serverFiles.add(serverFile);
getIntent().putExtra(Intents.Extras.SERVER_FILES, new ArrayList<Parcelable>(serverFiles));
Animatoo.animateSwipeLeft(this);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
import android.provider.MediaStore;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;

import com.blogspot.atifsoftwares.animatoolib.Animatoo;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import androidx.fragment.app.Fragment;
Expand Down Expand Up @@ -245,6 +247,7 @@ private void setUpFileActivity(ServerShare share, List<ServerFile> files, Server
private void startFileActivity(ServerShare share, List<ServerFile> files, ServerFile file) {
Intent intent = Intents.Builder.with(this).buildServerFileIntent(share, files, file);
startActivity(intent);
Animatoo.animateSwipeLeft(this);
}

private void startFileOpeningActivity(ServerShare share, ServerFile file) {
Expand Down Expand Up @@ -293,11 +296,13 @@ private void showFileDownloadedDialog(ServerFile file, Uri fileUri) {
private void startFileOpeningActivity(ServerFile file, Uri fileUri) {
Intent intent = Intents.Builder.with(this).buildServerFileOpeningIntent(file, fileUri);
startActivity(intent);
Animatoo.animateInAndOut(this);
}

private void startFileSharingActivity(ServerFile file, Uri fileUri) {
Intent intent = Intents.Builder.with(this).buildServerFileSharingIntent(file, fileUri);
startActivity(intent);
Animatoo.animateSwipeLeft(this);
}

private void showGooglePlaySearchFragment(ServerFile file) {
Expand Down