Show 'copied to clipboard' message on Android 12L (#6745)
This commit is contained in:
parent
1d415c9f7f
commit
34c7fd576f
|
@ -332,7 +332,7 @@ public class CoverFragment extends Fragment {
|
|||
if (clipboardManager != null) {
|
||||
clipboardManager.setPrimaryClip(ClipData.newPlainText("AntennaPod", text));
|
||||
}
|
||||
if (Build.VERSION.SDK_INT < 32) {
|
||||
if (Build.VERSION.SDK_INT <= 32) {
|
||||
((MainActivity) requireActivity()).showSnackbarAbovePlayer(
|
||||
getResources().getString(R.string.copied_to_clipboard), Snackbar.LENGTH_SHORT);
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ public class FeedInfoFragment extends Fragment implements MaterialToolbar.OnMenu
|
|||
android.content.ClipboardManager cm = (android.content.ClipboardManager) getContext()
|
||||
.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
cm.setPrimaryClip(clipData);
|
||||
if (Build.VERSION.SDK_INT < 32) {
|
||||
if (Build.VERSION.SDK_INT <= 32) {
|
||||
((MainActivity) getActivity()).showSnackbarAbovePlayer(R.string.copied_to_clipboard,
|
||||
Snackbar.LENGTH_SHORT);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ public class AboutFragment extends PreferenceFragmentCompat {
|
|||
ClipData clip = ClipData.newPlainText(getString(R.string.bug_report_title),
|
||||
findPreference("about_version").getSummary());
|
||||
clipboard.setPrimaryClip(clip);
|
||||
if (Build.VERSION.SDK_INT < 32) {
|
||||
if (Build.VERSION.SDK_INT <= 32) {
|
||||
Snackbar.make(getView(), R.string.copied_to_clipboard, Snackbar.LENGTH_SHORT).show();
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -104,7 +104,7 @@ public class ShownotesWebView extends WebView implements View.OnLongClickListene
|
|||
if (clipboardManager != null) {
|
||||
clipboardManager.setPrimaryClip(ClipData.newPlainText("AntennaPod", r.getExtra()));
|
||||
}
|
||||
if (Build.VERSION.SDK_INT < 32 && this.getContext() instanceof MainActivity) {
|
||||
if (Build.VERSION.SDK_INT <= 32 && this.getContext() instanceof MainActivity) {
|
||||
((MainActivity) this.getContext()).showSnackbarAbovePlayer(
|
||||
getResources().getString(R.string.copied_to_clipboard),
|
||||
Snackbar.LENGTH_SHORT);
|
||||
|
|
Loading…
Reference in New Issue