aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml/docilealligator
diff options
context:
space:
mode:
authorDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2023-10-01 14:56:33 +0000
committerDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2023-10-01 14:56:33 +0000
commit658efd644d8834c801c9d321bb256492afe918a4 (patch)
tree981a1440cf7fca356e53a208da19e7a0f27f9be8 /app/src/main/java/ml/docilealligator
parentb465d11f1010e3820c2a59f86ca3ea259ae537f9 (diff)
downloadinfinity-for-reddit-658efd644d8834c801c9d321bb256492afe918a4.tar
infinity-for-reddit-658efd644d8834c801c9d321bb256492afe918a4.tar.gz
infinity-for-reddit-658efd644d8834c801c9d321bb256492afe918a4.tar.bz2
infinity-for-reddit-658efd644d8834c801c9d321bb256492afe918a4.tar.lz
infinity-for-reddit-658efd644d8834c801c9d321bb256492afe918a4.tar.xz
infinity-for-reddit-658efd644d8834c801c9d321bb256492afe918a4.tar.zst
infinity-for-reddit-658efd644d8834c801c9d321bb256492afe918a4.zip
Fix video controller ui issues in ViewImgurVideoFragment, ViewRedditGalleryVideoFragment and ViewVideoActivity.
Diffstat (limited to 'app/src/main/java/ml/docilealligator')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewImgurVideoFragment.java20
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryVideoFragment.java6
3 files changed, 14 insertions, 16 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java
index bd63dc9e..224e8211 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java
@@ -169,7 +169,7 @@ public class ViewVideoActivity extends AppCompatActivity implements CustomFontRe
@BindView(R.id.back_button_exo_playback_control_view)
MaterialButton backButton;
@BindView(R.id.download_image_view_exo_playback_control_view)
- MaterialButton downloadImageView;
+ MaterialButton downloadButton;
@BindView(R.id.playback_speed_image_view_exo_playback_control_view)
MaterialButton playbackSpeedImageView;
@BindView(R.id.lockable_nested_scroll_view_view_video_activity)
@@ -321,7 +321,7 @@ public class ViewVideoActivity extends AppCompatActivity implements CustomFontRe
finish();
});
- downloadImageView.setOnClickListener(view -> {
+ downloadButton.setOnClickListener(view -> {
if (isDownloading) {
return;
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewImgurVideoFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewImgurVideoFragment.java
index 51850a90..06eb7673 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewImgurVideoFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewImgurVideoFragment.java
@@ -15,8 +15,6 @@ import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.ImageButton;
-import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
@@ -69,7 +67,7 @@ public class ViewImgurVideoFragment extends Fragment {
@BindView(R.id.player_view_view_imgur_video_fragment)
PlayerView videoPlayerView;
@BindView(R.id.mute_exo_playback_control_view)
- ImageButton muteButton;
+ MaterialButton muteButton;
@BindView(R.id.bottom_navigation_exo_playback_control_view)
BottomAppBar bottomAppBar;
@BindView(R.id.title_text_view_exo_playback_control_view)
@@ -77,7 +75,7 @@ public class ViewImgurVideoFragment extends Fragment {
@BindView(R.id.back_button_exo_playback_control_view)
MaterialButton backButton;
@BindView(R.id.download_image_view_exo_playback_control_view)
- ImageView downloadImageView;
+ MaterialButton downloadButton;
private ViewImgurMediaActivity activity;
private ImgurMedia imgurMedia;
private ExoPlayer player;
@@ -175,7 +173,7 @@ public class ViewImgurVideoFragment extends Fragment {
activity.finish();
});
- downloadImageView.setOnClickListener(view -> {
+ downloadButton.setOnClickListener(view -> {
if (isDownloading) {
return;
}
@@ -279,17 +277,17 @@ public class ViewImgurVideoFragment extends Fragment {
isMute = savedInstanceState.getBoolean(IS_MUTE_STATE);
if (isMute) {
player.setVolume(0f);
- muteButton.setImageResource(R.drawable.ic_mute_24dp);
+ muteButton.setIconResource(R.drawable.ic_mute_24dp);
} else {
player.setVolume(1f);
- muteButton.setImageResource(R.drawable.ic_unmute_24dp);
+ muteButton.setIconResource(R.drawable.ic_unmute_24dp);
}
} else if (muteVideo) {
isMute = true;
player.setVolume(0f);
- muteButton.setImageResource(R.drawable.ic_mute_24dp);
+ muteButton.setIconResource(R.drawable.ic_mute_24dp);
} else {
- muteButton.setImageResource(R.drawable.ic_unmute_24dp);
+ muteButton.setIconResource(R.drawable.ic_unmute_24dp);
}
player.addListener(new Player.Listener() {
@@ -305,11 +303,11 @@ public class ViewImgurVideoFragment extends Fragment {
if (isMute) {
isMute = false;
player.setVolume(1f);
- muteButton.setImageResource(R.drawable.ic_unmute_24dp);
+ muteButton.setIconResource(R.drawable.ic_unmute_24dp);
} else {
isMute = true;
player.setVolume(0f);
- muteButton.setImageResource(R.drawable.ic_mute_24dp);
+ muteButton.setIconResource(R.drawable.ic_mute_24dp);
}
});
break;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryVideoFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryVideoFragment.java
index d41f9b37..02560a7f 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryVideoFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryVideoFragment.java
@@ -16,7 +16,6 @@ import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
-import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
@@ -39,6 +38,7 @@ import com.google.android.exoplayer2.upstream.DefaultHttpDataSource;
import com.google.android.exoplayer2.upstream.cache.CacheDataSource;
import com.google.android.exoplayer2.upstream.cache.SimpleCache;
import com.google.android.material.bottomappbar.BottomAppBar;
+import com.google.android.material.button.MaterialButton;
import com.google.common.collect.ImmutableList;
import javax.inject.Inject;
@@ -78,7 +78,7 @@ public class ViewRedditGalleryVideoFragment extends Fragment {
@BindView(R.id.back_button_exo_playback_control_view)
MaterialButton backButton;
@BindView(R.id.download_image_view_exo_playback_control_view)
- ImageView downloadImageView;
+ MaterialButton downloadButton;
private ViewRedditGalleryActivity activity;
private Post.Gallery galleryVideo;
private String subredditName;
@@ -178,7 +178,7 @@ public class ViewRedditGalleryVideoFragment extends Fragment {
backButton.setOnClickListener(view -> {
activity.finish();
});
- downloadImageView.setOnClickListener(view -> {
+ downloadButton.setOnClickListener(view -> {
if (isDownloading) {
return;
}