aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/ml')
-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;
}