Merge pull request #3249 from archibishop/imagecover-playpause-fuctionality
Extend play/pause functionality to Image Cover
This commit is contained in:
commit
ce649ec087
|
@ -44,6 +44,7 @@ public class CoverFragment extends Fragment {
|
||||||
txtvPodcastTitle = root.findViewById(R.id.txtvPodcastTitle);
|
txtvPodcastTitle = root.findViewById(R.id.txtvPodcastTitle);
|
||||||
txtvEpisodeTitle = root.findViewById(R.id.txtvEpisodeTitle);
|
txtvEpisodeTitle = root.findViewById(R.id.txtvEpisodeTitle);
|
||||||
imgvCover = root.findViewById(R.id.imgvCover);
|
imgvCover = root.findViewById(R.id.imgvCover);
|
||||||
|
imgvCover.setOnClickListener(v -> onPlayPause());
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,4 +115,11 @@ public class CoverFragment extends Fragment {
|
||||||
disposable.dispose();
|
disposable.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void onPlayPause() {
|
||||||
|
if (controller == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
controller.playPause();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,8 @@
|
||||||
android:contentDescription="@string/cover_label"
|
android:contentDescription="@string/cover_label"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:transitionName="coverTransition"
|
android:transitionName="coverTransition"
|
||||||
tools:src="@android:drawable/sym_def_app_icon" />
|
tools:src="@android:drawable/sym_def_app_icon"
|
||||||
|
android:foreground="?attr/selectableItemBackground" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txtvEpisodeTitle"
|
android:id="@+id/txtvEpisodeTitle"
|
||||||
|
|
Loading…
Reference in New Issue