Loading app/src/main/AndroidManifest.xml +21 −0 Original line number Diff line number Diff line Loading @@ -412,6 +412,7 @@ android:enabled="true" android:exported="true" android:icon="@mipmap/ic_launcher_bubbles" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_bubbles_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -431,6 +432,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_bubbles_ua" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_bubbles_ua_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -450,6 +452,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_bubbles_pea_green" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_bubbles_pea_green_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -468,6 +471,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_bubbles_pride" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_bubbles_pride_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -486,6 +490,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_bubbles_pink" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_bubbles_pink_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -504,6 +509,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_bubbles_pirate" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_bubbles_pirate_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -522,6 +528,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_fediverse" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_fediverse_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -538,6 +545,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_hero" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_hero_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -554,6 +562,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_atom" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_atom_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -570,6 +579,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_crash" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_crash_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -586,6 +596,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_mastalab" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_mastalab_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -602,6 +613,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_leaf" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_leaf_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -618,6 +630,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_offset" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_offset_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -634,6 +647,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_jungle" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_jungle_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -650,6 +664,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_confetti" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_confetti_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -666,6 +681,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_spaghetti" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_spaghetti_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -682,6 +698,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_warm" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_warm_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -698,6 +715,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_purple_1" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_purple_1_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -714,6 +732,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_purple_2" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_purple_2_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -730,6 +749,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_yellow_headed_red_bubble" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_yellow_headed_red_bubble_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -746,6 +766,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_mosaic" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_mosaic_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading app/src/main/java/app/fedilab/android/BaseMainActivity.java +20 −14 Original line number Diff line number Diff line Loading @@ -396,17 +396,20 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt Runnable myRunnable = () -> { if (accounts != null && accounts.size() > 0) { Helper.loadPP(activity, headerMainBinding.otherAccount1, accounts.get(0)); headerMainBinding.otherAccount1.setVisibility(View.VISIBLE); headerMainBinding.otherAccount1.setOnClickListener(v -> { headerMenuOpen = false; String account = ""; String account1; if (accounts.get(0).mastodon_account != null) { account = "@" + accounts.get(0).mastodon_account.acct + "@" + accounts.get(0).instance; account1 = "@" + accounts.get(0).mastodon_account.acct + "@" + accounts.get(0).instance; } else if (accounts.get(0).peertube_account != null) { account = "@" + accounts.get(0).peertube_account.getAcct() + "@" + accounts.get(0).instance; account1 = "@" + accounts.get(0).peertube_account.getAcct() + "@" + accounts.get(0).instance; } else { account1 = ""; } headerMainBinding.otherAccount1.setContentDescription(activity.getString(R.string.cd_switch_account, account1)); headerMainBinding.otherAccount1.setVisibility(View.VISIBLE); headerMainBinding.otherAccount1.setOnClickListener(v -> { headerMenuOpen = false; typeOfConnection = PeertubeMainActivity.TypeOfConnection.NORMAL; Toasty.info(activity, activity.getString(R.string.toast_account_changed, account), Toasty.LENGTH_LONG).show(); Toasty.info(activity, activity.getString(R.string.toast_account_changed, account1), Toasty.LENGTH_LONG).show(); BaseMainActivity.currentToken = accounts.get(0).token; BaseMainActivity.currentUserID = accounts.get(0).user_id; BaseMainActivity.currentInstance = accounts.get(0).instance; Loading @@ -425,16 +428,19 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt }); if (accounts.size() > 1) { Helper.loadPP(activity, headerMainBinding.otherAccount2, accounts.get(1)); headerMainBinding.otherAccount2.setVisibility(View.VISIBLE); headerMainBinding.otherAccount2.setOnClickListener(v -> { headerMenuOpen = false; String account = ""; String account2; if (accounts.get(1).mastodon_account != null) { account = "@" + accounts.get(1).mastodon_account.acct + "@" + accounts.get(1).instance; account2 = "@" + accounts.get(1).mastodon_account.acct + "@" + accounts.get(1).instance; } else if (accounts.get(1).peertube_account != null) { account = "@" + accounts.get(1).peertube_account.getAcct() + "@" + accounts.get(1).instance; account2 = "@" + accounts.get(1).peertube_account.getAcct() + "@" + accounts.get(1).instance; } else { account2 = ""; } Toasty.info(activity, activity.getString(R.string.toast_account_changed, account), Toasty.LENGTH_LONG).show(); headerMainBinding.otherAccount2.setContentDescription(activity.getString(R.string.cd_switch_account, account2)); headerMainBinding.otherAccount2.setVisibility(View.VISIBLE); headerMainBinding.otherAccount2.setOnClickListener(v -> { headerMenuOpen = false; Toasty.info(activity, activity.getString(R.string.toast_account_changed, account2), Toasty.LENGTH_LONG).show(); BaseMainActivity.currentToken = accounts.get(1).token; BaseMainActivity.currentUserID = accounts.get(1).user_id; BaseMainActivity.currentInstance = accounts.get(1).instance; Loading app/src/main/java/app/fedilab/android/mastodon/activities/MediaActivity.java +5 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,7 @@ public class MediaActivity extends BaseBarActivity implements OnDownloadInterfac if (translated != null) { attachments.get(mediaPosition - 1).translation = translated; binding.mediaDescriptionTranslated.setText(translated); binding.mediaDescriptionTranslated.setContentDescription(getString(R.string.cd_translated_media_description, translated)); binding.mediaDescriptionTranslated.setVisibility(View.VISIBLE); binding.mediaDescription.setVisibility(View.GONE); if (mCurrentFragment != null) { Loading @@ -214,6 +215,7 @@ public class MediaActivity extends BaseBarActivity implements OnDownloadInterfac mCurrentFragment.toggleController(false); } binding.mediaDescriptionTranslated.setText(attachments.get(mediaPosition - 1).translation); binding.mediaDescriptionTranslated.setContentDescription(getString(R.string.cd_translated_media_description, attachments.get(mediaPosition - 1).translation)); binding.mediaDescriptionTranslated.setVisibility(View.VISIBLE); } else { binding.mediaDescription.setVisibility(View.VISIBLE); Loading Loading @@ -250,6 +252,7 @@ public class MediaActivity extends BaseBarActivity implements OnDownloadInterfac if (translated != null) { attachments.get(position).translation = translated; binding.mediaDescriptionTranslated.setText(translated); binding.mediaDescriptionTranslated.setContentDescription(getString(R.string.cd_translated_media_description, translated)); binding.mediaDescriptionTranslated.setVisibility(View.VISIBLE); binding.mediaDescription.setVisibility(View.GONE); if (mCurrentFragment != null) { Loading @@ -268,6 +271,7 @@ public class MediaActivity extends BaseBarActivity implements OnDownloadInterfac mCurrentFragment.toggleController(false); } binding.mediaDescriptionTranslated.setText(attachments.get(position).translation); binding.mediaDescriptionTranslated.setContentDescription(getString(R.string.cd_translated_media_description, attachments.get(position).translation)); binding.mediaDescriptionTranslated.setVisibility(View.VISIBLE); } else { binding.mediaDescription.setVisibility(View.VISIBLE); Loading Loading @@ -437,6 +441,7 @@ public class MediaActivity extends BaseBarActivity implements OnDownloadInterfac if (attachments.get(binding.mediaViewpager.getCurrentItem()).translation != null) { binding.mediaDescription.setVisibility(View.GONE); binding.mediaDescriptionTranslated.setText(attachments.get(binding.mediaViewpager.getCurrentItem()).translation); binding.mediaDescriptionTranslated.setContentDescription(getString(R.string.cd_translated_media_description, attachments.get(binding.mediaViewpager.getCurrentItem()).translation)); binding.mediaDescriptionTranslated.setVisibility(View.VISIBLE); } else { binding.mediaDescription.setVisibility(View.VISIBLE); Loading app/src/main/java/app/fedilab/android/mastodon/ui/fragment/media/FragmentMedia.java +1 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,7 @@ public class FragmentMedia extends Fragment { enableSliding(true); } }); binding.mediaPicture.setContentDescription(attachment.description); binding.mediaPicture.setOnClickListener(v -> { if (isAdded()) { ((MediaActivity) requireActivity()).toogleFullScreen(); Loading app/src/main/res/anim/enter.xml +1 −1 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:duration="?attr/motionDurationLong1"> android:duration="@android:integer/config_shortAnimTime"> <alpha android:fromAlpha="0.0" android:toAlpha="1.0" /> Loading Loading
app/src/main/AndroidManifest.xml +21 −0 Original line number Diff line number Diff line Loading @@ -412,6 +412,7 @@ android:enabled="true" android:exported="true" android:icon="@mipmap/ic_launcher_bubbles" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_bubbles_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -431,6 +432,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_bubbles_ua" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_bubbles_ua_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -450,6 +452,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_bubbles_pea_green" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_bubbles_pea_green_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -468,6 +471,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_bubbles_pride" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_bubbles_pride_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -486,6 +490,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_bubbles_pink" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_bubbles_pink_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -504,6 +509,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_bubbles_pirate" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_bubbles_pirate_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -522,6 +528,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_fediverse" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_fediverse_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -538,6 +545,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_hero" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_hero_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -554,6 +562,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_atom" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_atom_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -570,6 +579,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_crash" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_crash_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -586,6 +596,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_mastalab" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_mastalab_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -602,6 +613,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_leaf" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_leaf_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -618,6 +630,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_offset" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_offset_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -634,6 +647,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_jungle" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_jungle_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -650,6 +664,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_confetti" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_confetti_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -666,6 +681,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_spaghetti" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_spaghetti_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -682,6 +698,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_warm" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_warm_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -698,6 +715,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_purple_1" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_purple_1_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -714,6 +732,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_purple_2" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_purple_2_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -730,6 +749,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_yellow_headed_red_bubble" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_yellow_headed_red_bubble_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading @@ -746,6 +766,7 @@ android:enabled="false" android:exported="true" android:icon="@mipmap/ic_launcher_mosaic" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_mosaic_round" android:targetActivity=".activities.MainActivity"> <intent-filter> Loading
app/src/main/java/app/fedilab/android/BaseMainActivity.java +20 −14 Original line number Diff line number Diff line Loading @@ -396,17 +396,20 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt Runnable myRunnable = () -> { if (accounts != null && accounts.size() > 0) { Helper.loadPP(activity, headerMainBinding.otherAccount1, accounts.get(0)); headerMainBinding.otherAccount1.setVisibility(View.VISIBLE); headerMainBinding.otherAccount1.setOnClickListener(v -> { headerMenuOpen = false; String account = ""; String account1; if (accounts.get(0).mastodon_account != null) { account = "@" + accounts.get(0).mastodon_account.acct + "@" + accounts.get(0).instance; account1 = "@" + accounts.get(0).mastodon_account.acct + "@" + accounts.get(0).instance; } else if (accounts.get(0).peertube_account != null) { account = "@" + accounts.get(0).peertube_account.getAcct() + "@" + accounts.get(0).instance; account1 = "@" + accounts.get(0).peertube_account.getAcct() + "@" + accounts.get(0).instance; } else { account1 = ""; } headerMainBinding.otherAccount1.setContentDescription(activity.getString(R.string.cd_switch_account, account1)); headerMainBinding.otherAccount1.setVisibility(View.VISIBLE); headerMainBinding.otherAccount1.setOnClickListener(v -> { headerMenuOpen = false; typeOfConnection = PeertubeMainActivity.TypeOfConnection.NORMAL; Toasty.info(activity, activity.getString(R.string.toast_account_changed, account), Toasty.LENGTH_LONG).show(); Toasty.info(activity, activity.getString(R.string.toast_account_changed, account1), Toasty.LENGTH_LONG).show(); BaseMainActivity.currentToken = accounts.get(0).token; BaseMainActivity.currentUserID = accounts.get(0).user_id; BaseMainActivity.currentInstance = accounts.get(0).instance; Loading @@ -425,16 +428,19 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt }); if (accounts.size() > 1) { Helper.loadPP(activity, headerMainBinding.otherAccount2, accounts.get(1)); headerMainBinding.otherAccount2.setVisibility(View.VISIBLE); headerMainBinding.otherAccount2.setOnClickListener(v -> { headerMenuOpen = false; String account = ""; String account2; if (accounts.get(1).mastodon_account != null) { account = "@" + accounts.get(1).mastodon_account.acct + "@" + accounts.get(1).instance; account2 = "@" + accounts.get(1).mastodon_account.acct + "@" + accounts.get(1).instance; } else if (accounts.get(1).peertube_account != null) { account = "@" + accounts.get(1).peertube_account.getAcct() + "@" + accounts.get(1).instance; account2 = "@" + accounts.get(1).peertube_account.getAcct() + "@" + accounts.get(1).instance; } else { account2 = ""; } Toasty.info(activity, activity.getString(R.string.toast_account_changed, account), Toasty.LENGTH_LONG).show(); headerMainBinding.otherAccount2.setContentDescription(activity.getString(R.string.cd_switch_account, account2)); headerMainBinding.otherAccount2.setVisibility(View.VISIBLE); headerMainBinding.otherAccount2.setOnClickListener(v -> { headerMenuOpen = false; Toasty.info(activity, activity.getString(R.string.toast_account_changed, account2), Toasty.LENGTH_LONG).show(); BaseMainActivity.currentToken = accounts.get(1).token; BaseMainActivity.currentUserID = accounts.get(1).user_id; BaseMainActivity.currentInstance = accounts.get(1).instance; Loading
app/src/main/java/app/fedilab/android/mastodon/activities/MediaActivity.java +5 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,7 @@ public class MediaActivity extends BaseBarActivity implements OnDownloadInterfac if (translated != null) { attachments.get(mediaPosition - 1).translation = translated; binding.mediaDescriptionTranslated.setText(translated); binding.mediaDescriptionTranslated.setContentDescription(getString(R.string.cd_translated_media_description, translated)); binding.mediaDescriptionTranslated.setVisibility(View.VISIBLE); binding.mediaDescription.setVisibility(View.GONE); if (mCurrentFragment != null) { Loading @@ -214,6 +215,7 @@ public class MediaActivity extends BaseBarActivity implements OnDownloadInterfac mCurrentFragment.toggleController(false); } binding.mediaDescriptionTranslated.setText(attachments.get(mediaPosition - 1).translation); binding.mediaDescriptionTranslated.setContentDescription(getString(R.string.cd_translated_media_description, attachments.get(mediaPosition - 1).translation)); binding.mediaDescriptionTranslated.setVisibility(View.VISIBLE); } else { binding.mediaDescription.setVisibility(View.VISIBLE); Loading Loading @@ -250,6 +252,7 @@ public class MediaActivity extends BaseBarActivity implements OnDownloadInterfac if (translated != null) { attachments.get(position).translation = translated; binding.mediaDescriptionTranslated.setText(translated); binding.mediaDescriptionTranslated.setContentDescription(getString(R.string.cd_translated_media_description, translated)); binding.mediaDescriptionTranslated.setVisibility(View.VISIBLE); binding.mediaDescription.setVisibility(View.GONE); if (mCurrentFragment != null) { Loading @@ -268,6 +271,7 @@ public class MediaActivity extends BaseBarActivity implements OnDownloadInterfac mCurrentFragment.toggleController(false); } binding.mediaDescriptionTranslated.setText(attachments.get(position).translation); binding.mediaDescriptionTranslated.setContentDescription(getString(R.string.cd_translated_media_description, attachments.get(position).translation)); binding.mediaDescriptionTranslated.setVisibility(View.VISIBLE); } else { binding.mediaDescription.setVisibility(View.VISIBLE); Loading Loading @@ -437,6 +441,7 @@ public class MediaActivity extends BaseBarActivity implements OnDownloadInterfac if (attachments.get(binding.mediaViewpager.getCurrentItem()).translation != null) { binding.mediaDescription.setVisibility(View.GONE); binding.mediaDescriptionTranslated.setText(attachments.get(binding.mediaViewpager.getCurrentItem()).translation); binding.mediaDescriptionTranslated.setContentDescription(getString(R.string.cd_translated_media_description, attachments.get(binding.mediaViewpager.getCurrentItem()).translation)); binding.mediaDescriptionTranslated.setVisibility(View.VISIBLE); } else { binding.mediaDescription.setVisibility(View.VISIBLE); Loading
app/src/main/java/app/fedilab/android/mastodon/ui/fragment/media/FragmentMedia.java +1 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,7 @@ public class FragmentMedia extends Fragment { enableSliding(true); } }); binding.mediaPicture.setContentDescription(attachment.description); binding.mediaPicture.setOnClickListener(v -> { if (isAdded()) { ((MediaActivity) requireActivity()).toogleFullScreen(); Loading
app/src/main/res/anim/enter.xml +1 −1 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:duration="?attr/motionDurationLong1"> android:duration="@android:integer/config_shortAnimTime"> <alpha android:fromAlpha="0.0" android:toAlpha="1.0" /> Loading