Fix cards with long title
This commit is contained in:
parent
c2c780f58e
commit
360d7a6952
|
@ -527,7 +527,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
|
||||||
popup.setOnMenuItemClickListener(item -> {
|
popup.setOnMenuItemClickListener(item -> {
|
||||||
int itemId = item.getItemId();
|
int itemId = item.getItemId();
|
||||||
if (itemId == R.id.action_logout_account) {
|
if (itemId == R.id.action_logout_account) {
|
||||||
AlertDialog.Builder alt_bld = new AlertDialog.Builder(BaseMainActivity.this);
|
AlertDialog.Builder alt_bld = new AlertDialog.Builder(BaseMainActivity.this, Helper.dialogStyle());
|
||||||
alt_bld.setTitle(R.string.action_logout);
|
alt_bld.setTitle(R.string.action_logout);
|
||||||
if (currentAccount.mastodon_account != null && currentAccount.mastodon_account.username != null && currentAccount.instance != null) {
|
if (currentAccount.mastodon_account != null && currentAccount.mastodon_account.username != null && currentAccount.instance != null) {
|
||||||
alt_bld.setMessage(getString(R.string.logout_account_confirmation, currentAccount.mastodon_account.username, currentAccount.instance));
|
alt_bld.setMessage(getString(R.string.logout_account_confirmation, currentAccount.mastodon_account.username, currentAccount.instance));
|
||||||
|
@ -1174,7 +1174,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
|
||||||
itemShowReplies.setChecked(show_replies);
|
itemShowReplies.setChecked(show_replies);
|
||||||
editor.apply();
|
editor.apply();
|
||||||
} else if (itemId == R.id.action_filter) {
|
} else if (itemId == R.id.action_filter) {
|
||||||
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(BaseMainActivity.this);
|
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(BaseMainActivity.this, Helper.dialogStyle());
|
||||||
LayoutInflater inflater = getLayoutInflater();
|
LayoutInflater inflater = getLayoutInflater();
|
||||||
View dialogView = inflater.inflate(R.layout.popup_filter_regex, new LinearLayout(BaseMainActivity.this), false);
|
View dialogView = inflater.inflate(R.layout.popup_filter_regex, new LinearLayout(BaseMainActivity.this), false);
|
||||||
dialogBuilder.setView(dialogView);
|
dialogBuilder.setView(dialogView);
|
||||||
|
@ -1495,7 +1495,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
if (item.getItemId() == R.id.action_logout) {
|
if (item.getItemId() == R.id.action_logout) {
|
||||||
AlertDialog.Builder alt_bld = new AlertDialog.Builder(BaseMainActivity.this);
|
AlertDialog.Builder alt_bld = new AlertDialog.Builder(BaseMainActivity.this, Helper.dialogStyle());
|
||||||
alt_bld.setTitle(R.string.action_logout);
|
alt_bld.setTitle(R.string.action_logout);
|
||||||
alt_bld.setMessage(getString(R.string.logout_account_confirmation, account.mastodon_account.username, account.instance));
|
alt_bld.setMessage(getString(R.string.logout_account_confirmation, account.mastodon_account.username, account.instance));
|
||||||
alt_bld.setPositiveButton(R.string.action_logout, (dialog, id) -> {
|
alt_bld.setPositiveButton(R.string.action_logout, (dialog, id) -> {
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class CacheActivity extends BaseBarActivity {
|
||||||
finish();
|
finish();
|
||||||
return true;
|
return true;
|
||||||
} else if (item.getItemId() == R.id.action_clear) {
|
} else if (item.getItemId() == R.id.action_clear) {
|
||||||
AlertDialog.Builder deleteConfirm = new AlertDialog.Builder(CacheActivity.this);
|
AlertDialog.Builder deleteConfirm = new AlertDialog.Builder(CacheActivity.this, Helper.dialogStyle());
|
||||||
deleteConfirm.setTitle(getString(R.string.delete_cache));
|
deleteConfirm.setTitle(getString(R.string.delete_cache));
|
||||||
deleteConfirm.setMessage(getString(R.string.delete_cache_message));
|
deleteConfirm.setMessage(getString(R.string.delete_cache_message));
|
||||||
deleteConfirm.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
deleteConfirm.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
||||||
|
@ -129,7 +129,7 @@ public class CacheActivity extends BaseBarActivity {
|
||||||
size = size / 1000000.0f;
|
size = size / 1000000.0f;
|
||||||
}
|
}
|
||||||
binding.fileCacheSize.setText(String.format("%s %s", String.format(Locale.getDefault(), "%.2f", size), getString(R.string.cache_units)));
|
binding.fileCacheSize.setText(String.format("%s %s", String.format(Locale.getDefault(), "%.2f", size), getString(R.string.cache_units)));
|
||||||
AlertDialog.Builder restartBuilder = new AlertDialog.Builder(CacheActivity.this);
|
AlertDialog.Builder restartBuilder = new AlertDialog.Builder(CacheActivity.this, Helper.dialogStyle());
|
||||||
restartBuilder.setMessage(getString(R.string.restart_the_app));
|
restartBuilder.setMessage(getString(R.string.restart_the_app));
|
||||||
restartBuilder.setNegativeButton(R.string.no, (dialogRestart, whichRestart) -> {
|
restartBuilder.setNegativeButton(R.string.no, (dialogRestart, whichRestart) -> {
|
||||||
recreate();
|
recreate();
|
||||||
|
|
|
@ -214,7 +214,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
|
||||||
}
|
}
|
||||||
if (canBeSent(statusDraft)) {
|
if (canBeSent(statusDraft)) {
|
||||||
if (promptSaveDraft) {
|
if (promptSaveDraft) {
|
||||||
AlertDialog.Builder alt_bld = new AlertDialog.Builder(ComposeActivity.this);
|
AlertDialog.Builder alt_bld = new AlertDialog.Builder(ComposeActivity.this, Helper.dialogStyle());
|
||||||
alt_bld.setMessage(R.string.save_draft);
|
alt_bld.setMessage(R.string.save_draft);
|
||||||
alt_bld.setPositiveButton(R.string.save, (dialog, id) -> {
|
alt_bld.setPositiveButton(R.string.save, (dialog, id) -> {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
|
@ -315,7 +315,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
|
||||||
} else if (item.getItemId() == R.id.action_photo_camera) {
|
} else if (item.getItemId() == R.id.action_photo_camera) {
|
||||||
photoFileUri = MediaHelper.dispatchTakePictureIntent(ComposeActivity.this);
|
photoFileUri = MediaHelper.dispatchTakePictureIntent(ComposeActivity.this);
|
||||||
} else if (item.getItemId() == R.id.action_contacts) {
|
} else if (item.getItemId() == R.id.action_contacts) {
|
||||||
AlertDialog.Builder builderSingle = new AlertDialog.Builder(ComposeActivity.this);
|
AlertDialog.Builder builderSingle = new AlertDialog.Builder(ComposeActivity.this, Helper.dialogStyle());
|
||||||
|
|
||||||
builderSingle.setTitle(getString(R.string.select_accounts));
|
builderSingle.setTitle(getString(R.string.select_accounts));
|
||||||
PopupContactBinding popupContactBinding = PopupContactBinding.inflate(getLayoutInflater(), new LinearLayout(ComposeActivity.this), false);
|
PopupContactBinding popupContactBinding = PopupContactBinding.inflate(getLayoutInflater(), new LinearLayout(ComposeActivity.this), false);
|
||||||
|
|
|
@ -43,6 +43,7 @@ import app.fedilab.android.client.entities.api.Status;
|
||||||
import app.fedilab.android.client.entities.app.StatusDraft;
|
import app.fedilab.android.client.entities.app.StatusDraft;
|
||||||
import app.fedilab.android.databinding.ActivityDraftsBinding;
|
import app.fedilab.android.databinding.ActivityDraftsBinding;
|
||||||
import app.fedilab.android.exception.DBException;
|
import app.fedilab.android.exception.DBException;
|
||||||
|
import app.fedilab.android.helper.Helper;
|
||||||
import app.fedilab.android.ui.drawer.StatusDraftAdapter;
|
import app.fedilab.android.ui.drawer.StatusDraftAdapter;
|
||||||
import app.fedilab.android.viewmodel.mastodon.TimelinesVM;
|
import app.fedilab.android.viewmodel.mastodon.TimelinesVM;
|
||||||
|
|
||||||
|
@ -97,7 +98,7 @@ public class DraftActivity extends BaseActivity implements StatusDraftAdapter.Dr
|
||||||
finish();
|
finish();
|
||||||
return true;
|
return true;
|
||||||
} else if (item.getItemId() == R.id.action_delete) {
|
} else if (item.getItemId() == R.id.action_delete) {
|
||||||
AlertDialog.Builder unfollowConfirm = new AlertDialog.Builder(DraftActivity.this);
|
AlertDialog.Builder unfollowConfirm = new AlertDialog.Builder(DraftActivity.this, Helper.dialogStyle());
|
||||||
unfollowConfirm.setTitle(getString(R.string.delete_all));
|
unfollowConfirm.setTitle(getString(R.string.delete_all));
|
||||||
unfollowConfirm.setMessage(getString(R.string.remove_draft));
|
unfollowConfirm.setMessage(getString(R.string.remove_draft));
|
||||||
unfollowConfirm.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
unfollowConfirm.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
||||||
|
|
|
@ -135,7 +135,7 @@ public class EditProfileActivity extends BaseBarActivity {
|
||||||
value = Html.fromHtml(field.value).toString();
|
value = Html.fromHtml(field.value).toString();
|
||||||
fieldItemBinding.value.setText(value);
|
fieldItemBinding.value.setText(value);
|
||||||
fieldItemBinding.remove.setOnClickListener(v -> {
|
fieldItemBinding.remove.setOnClickListener(v -> {
|
||||||
AlertDialog.Builder deleteConfirm = new AlertDialog.Builder(EditProfileActivity.this);
|
AlertDialog.Builder deleteConfirm = new AlertDialog.Builder(EditProfileActivity.this, Helper.dialogStyle());
|
||||||
deleteConfirm.setTitle(getString(R.string.delete_field));
|
deleteConfirm.setTitle(getString(R.string.delete_field));
|
||||||
deleteConfirm.setMessage(getString(R.string.delete_field_confirm));
|
deleteConfirm.setMessage(getString(R.string.delete_field_confirm));
|
||||||
deleteConfirm.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
deleteConfirm.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
||||||
|
@ -157,7 +157,7 @@ public class EditProfileActivity extends BaseBarActivity {
|
||||||
binding.addField.setOnClickListener(view -> {
|
binding.addField.setOnClickListener(view -> {
|
||||||
AccountFieldItemBinding fieldItemBinding = AccountFieldItemBinding.inflate(getLayoutInflater());
|
AccountFieldItemBinding fieldItemBinding = AccountFieldItemBinding.inflate(getLayoutInflater());
|
||||||
fieldItemBinding.remove.setOnClickListener(v -> {
|
fieldItemBinding.remove.setOnClickListener(v -> {
|
||||||
AlertDialog.Builder deleteConfirm = new AlertDialog.Builder(EditProfileActivity.this);
|
AlertDialog.Builder deleteConfirm = new AlertDialog.Builder(EditProfileActivity.this, Helper.dialogStyle());
|
||||||
deleteConfirm.setTitle(getString(R.string.delete_field));
|
deleteConfirm.setTitle(getString(R.string.delete_field));
|
||||||
deleteConfirm.setMessage(getString(R.string.delete_field_confirm));
|
deleteConfirm.setMessage(getString(R.string.delete_field_confirm));
|
||||||
deleteConfirm.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
deleteConfirm.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
||||||
|
|
|
@ -41,6 +41,7 @@ import app.fedilab.android.R;
|
||||||
import app.fedilab.android.client.entities.api.Filter;
|
import app.fedilab.android.client.entities.api.Filter;
|
||||||
import app.fedilab.android.databinding.ActivityFiltersBinding;
|
import app.fedilab.android.databinding.ActivityFiltersBinding;
|
||||||
import app.fedilab.android.databinding.PopupAddFilterBinding;
|
import app.fedilab.android.databinding.PopupAddFilterBinding;
|
||||||
|
import app.fedilab.android.helper.Helper;
|
||||||
import app.fedilab.android.ui.drawer.FilterAdapter;
|
import app.fedilab.android.ui.drawer.FilterAdapter;
|
||||||
import app.fedilab.android.ui.drawer.KeywordAdapter;
|
import app.fedilab.android.ui.drawer.KeywordAdapter;
|
||||||
import app.fedilab.android.viewmodel.mastodon.FiltersVM;
|
import app.fedilab.android.viewmodel.mastodon.FiltersVM;
|
||||||
|
@ -59,7 +60,7 @@ public class FilterActivity extends BaseBarActivity implements FilterAdapter.Del
|
||||||
* @param listener - {@link FilterAdapter.FilterAction}
|
* @param listener - {@link FilterAdapter.FilterAction}
|
||||||
*/
|
*/
|
||||||
public static void addEditFilter(Context context, Filter filter, FilterAdapter.FilterAction listener) {
|
public static void addEditFilter(Context context, Filter filter, FilterAdapter.FilterAction listener) {
|
||||||
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context);
|
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
PopupAddFilterBinding popupAddFilterBinding = PopupAddFilterBinding.inflate(LayoutInflater.from(context));
|
PopupAddFilterBinding popupAddFilterBinding = PopupAddFilterBinding.inflate(LayoutInflater.from(context));
|
||||||
FiltersVM filtersVM = new ViewModelProvider((ViewModelStoreOwner) context).get(FiltersVM.class);
|
FiltersVM filtersVM = new ViewModelProvider((ViewModelStoreOwner) context).get(FiltersVM.class);
|
||||||
dialogBuilder.setView(popupAddFilterBinding.getRoot());
|
dialogBuilder.setView(popupAddFilterBinding.getRoot());
|
||||||
|
|
|
@ -88,7 +88,7 @@ public class FollowedTagActivity extends BaseBarActivity implements FollowedTagA
|
||||||
onBackPressed();
|
onBackPressed();
|
||||||
return true;
|
return true;
|
||||||
} else if (item.getItemId() == R.id.action_unfollow && tag != null) {
|
} else if (item.getItemId() == R.id.action_unfollow && tag != null) {
|
||||||
AlertDialog.Builder alt_bld = new AlertDialog.Builder(FollowedTagActivity.this);
|
AlertDialog.Builder alt_bld = new AlertDialog.Builder(FollowedTagActivity.this, Helper.dialogStyle());
|
||||||
alt_bld.setTitle(R.string.action_unfollow_tag);
|
alt_bld.setTitle(R.string.action_unfollow_tag);
|
||||||
alt_bld.setMessage(R.string.action_unfollow_tag_confirm);
|
alt_bld.setMessage(R.string.action_unfollow_tag_confirm);
|
||||||
alt_bld.setPositiveButton(R.string.unfollow, (dialog, id) -> {
|
alt_bld.setPositiveButton(R.string.unfollow, (dialog, id) -> {
|
||||||
|
@ -120,7 +120,7 @@ public class FollowedTagActivity extends BaseBarActivity implements FollowedTagA
|
||||||
AlertDialog alert = alt_bld.create();
|
AlertDialog alert = alt_bld.create();
|
||||||
alert.show();
|
alert.show();
|
||||||
} else if (item.getItemId() == R.id.action_follow_tag) {
|
} else if (item.getItemId() == R.id.action_follow_tag) {
|
||||||
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(FollowedTagActivity.this);
|
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(FollowedTagActivity.this, Helper.dialogStyle());
|
||||||
PopupAddFollowedTagtBinding popupAddFollowedTagtBinding = PopupAddFollowedTagtBinding.inflate(getLayoutInflater());
|
PopupAddFollowedTagtBinding popupAddFollowedTagtBinding = PopupAddFollowedTagtBinding.inflate(getLayoutInflater());
|
||||||
dialogBuilder.setView(popupAddFollowedTagtBinding.getRoot());
|
dialogBuilder.setView(popupAddFollowedTagtBinding.getRoot());
|
||||||
popupAddFollowedTagtBinding.addTag.setFilters(new InputFilter[]{new InputFilter.LengthFilter(255)});
|
popupAddFollowedTagtBinding.addTag.setFilters(new InputFilter[]{new InputFilter.LengthFilter(255)});
|
||||||
|
|
|
@ -144,7 +144,7 @@ public class MastodonListActivity extends BaseBarActivity implements MastodonLis
|
||||||
onBackPressed();
|
onBackPressed();
|
||||||
return true;
|
return true;
|
||||||
} else if (item.getItemId() == R.id.action_manage_users) {
|
} else if (item.getItemId() == R.id.action_manage_users) {
|
||||||
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(MastodonListActivity.this);
|
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(MastodonListActivity.this, Helper.dialogStyle());
|
||||||
PopupManageAccountsListBinding popupManageAccountsListBinding = PopupManageAccountsListBinding.inflate(getLayoutInflater());
|
PopupManageAccountsListBinding popupManageAccountsListBinding = PopupManageAccountsListBinding.inflate(getLayoutInflater());
|
||||||
dialogBuilder.setView(popupManageAccountsListBinding.getRoot());
|
dialogBuilder.setView(popupManageAccountsListBinding.getRoot());
|
||||||
popupManageAccountsListBinding.loader.setVisibility(View.VISIBLE);
|
popupManageAccountsListBinding.loader.setVisibility(View.VISIBLE);
|
||||||
|
@ -241,7 +241,7 @@ public class MastodonListActivity extends BaseBarActivity implements MastodonLis
|
||||||
dialogBuilder.setPositiveButton(R.string.close, (dialog, id) -> dialog.dismiss());
|
dialogBuilder.setPositiveButton(R.string.close, (dialog, id) -> dialog.dismiss());
|
||||||
dialogBuilder.create().show();
|
dialogBuilder.create().show();
|
||||||
} else if (item.getItemId() == R.id.action_delete && mastodonList != null) {
|
} else if (item.getItemId() == R.id.action_delete && mastodonList != null) {
|
||||||
AlertDialog.Builder alt_bld = new AlertDialog.Builder(MastodonListActivity.this);
|
AlertDialog.Builder alt_bld = new AlertDialog.Builder(MastodonListActivity.this, Helper.dialogStyle());
|
||||||
alt_bld.setTitle(R.string.action_lists_delete);
|
alt_bld.setTitle(R.string.action_lists_delete);
|
||||||
alt_bld.setMessage(R.string.action_lists_confirm_delete);
|
alt_bld.setMessage(R.string.action_lists_confirm_delete);
|
||||||
alt_bld.setPositiveButton(R.string.delete, (dialog, id) -> {
|
alt_bld.setPositiveButton(R.string.delete, (dialog, id) -> {
|
||||||
|
@ -279,7 +279,7 @@ public class MastodonListActivity extends BaseBarActivity implements MastodonLis
|
||||||
AlertDialog alert = alt_bld.create();
|
AlertDialog alert = alt_bld.create();
|
||||||
alert.show();
|
alert.show();
|
||||||
} else if (item.getItemId() == R.id.action_add_list) {
|
} else if (item.getItemId() == R.id.action_add_list) {
|
||||||
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(MastodonListActivity.this);
|
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(MastodonListActivity.this, Helper.dialogStyle());
|
||||||
PopupAddListBinding popupAddListBinding = PopupAddListBinding.inflate(getLayoutInflater());
|
PopupAddListBinding popupAddListBinding = PopupAddListBinding.inflate(getLayoutInflater());
|
||||||
dialogBuilder.setView(popupAddListBinding.getRoot());
|
dialogBuilder.setView(popupAddListBinding.getRoot());
|
||||||
popupAddListBinding.addList.setFilters(new InputFilter[]{new InputFilter.LengthFilter(255)});
|
popupAddListBinding.addList.setFilters(new InputFilter[]{new InputFilter.LengthFilter(255)});
|
||||||
|
@ -319,7 +319,7 @@ public class MastodonListActivity extends BaseBarActivity implements MastodonLis
|
||||||
dialogBuilder.setNegativeButton(R.string.cancel, (dialog, id) -> dialog.dismiss());
|
dialogBuilder.setNegativeButton(R.string.cancel, (dialog, id) -> dialog.dismiss());
|
||||||
dialogBuilder.create().show();
|
dialogBuilder.create().show();
|
||||||
} else if (item.getItemId() == R.id.action_edit) {
|
} else if (item.getItemId() == R.id.action_edit) {
|
||||||
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(MastodonListActivity.this);
|
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(MastodonListActivity.this, Helper.dialogStyle());
|
||||||
PopupAddListBinding popupAddListBinding = PopupAddListBinding.inflate(getLayoutInflater());
|
PopupAddListBinding popupAddListBinding = PopupAddListBinding.inflate(getLayoutInflater());
|
||||||
dialogBuilder.setView(popupAddListBinding.getRoot());
|
dialogBuilder.setView(popupAddListBinding.getRoot());
|
||||||
popupAddListBinding.addList.setFilters(new InputFilter[]{new InputFilter.LengthFilter(255)});
|
popupAddListBinding.addList.setFilters(new InputFilter[]{new InputFilter.LengthFilter(255)});
|
||||||
|
|
|
@ -422,7 +422,7 @@ public class ProfileActivity extends BaseActivity {
|
||||||
} else if (doAction == action.UNFOLLOW) {
|
} else if (doAction == action.UNFOLLOW) {
|
||||||
boolean confirm_unfollow = sharedpreferences.getBoolean(getString(R.string.SET_UNFOLLOW_VALIDATION), true);
|
boolean confirm_unfollow = sharedpreferences.getBoolean(getString(R.string.SET_UNFOLLOW_VALIDATION), true);
|
||||||
if (confirm_unfollow) {
|
if (confirm_unfollow) {
|
||||||
AlertDialog.Builder unfollowConfirm = new AlertDialog.Builder(ProfileActivity.this);
|
AlertDialog.Builder unfollowConfirm = new AlertDialog.Builder(ProfileActivity.this, Helper.dialogStyle());
|
||||||
unfollowConfirm.setTitle(getString(R.string.unfollow_confirm));
|
unfollowConfirm.setTitle(getString(R.string.unfollow_confirm));
|
||||||
unfollowConfirm.setMessage(account.acct);
|
unfollowConfirm.setMessage(account.acct);
|
||||||
unfollowConfirm.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
unfollowConfirm.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
||||||
|
@ -507,7 +507,7 @@ public class ProfileActivity extends BaseActivity {
|
||||||
//Recyclerview for identity proof has not been inflated yet
|
//Recyclerview for identity proof has not been inflated yet
|
||||||
if (identityProofsRecycler == null) {
|
if (identityProofsRecycler == null) {
|
||||||
identity_proofs_indicator.setOnClickListener(v -> {
|
identity_proofs_indicator.setOnClickListener(v -> {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(ProfileActivity.this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(ProfileActivity.this, Helper.dialogStyle());
|
||||||
identityProofsRecycler = new RecyclerView(ProfileActivity.this);
|
identityProofsRecycler = new RecyclerView(ProfileActivity.this);
|
||||||
LinearLayoutManager mLayoutManager = new LinearLayoutManager(ProfileActivity.this);
|
LinearLayoutManager mLayoutManager = new LinearLayoutManager(ProfileActivity.this);
|
||||||
identityProofsRecycler.setLayoutManager(mLayoutManager);
|
identityProofsRecycler.setLayoutManager(mLayoutManager);
|
||||||
|
@ -596,7 +596,7 @@ public class ProfileActivity extends BaseActivity {
|
||||||
binding.personalNote.setText(relationship.note);
|
binding.personalNote.setText(relationship.note);
|
||||||
}
|
}
|
||||||
binding.personalNote.setOnClickListener(view -> {
|
binding.personalNote.setOnClickListener(view -> {
|
||||||
AlertDialog.Builder builderInner = new AlertDialog.Builder(ProfileActivity.this);
|
AlertDialog.Builder builderInner = new AlertDialog.Builder(ProfileActivity.this, Helper.dialogStyle());
|
||||||
builderInner.setTitle(R.string.note_for_account);
|
builderInner.setTitle(R.string.note_for_account);
|
||||||
EditText input = new EditText(ProfileActivity.this);
|
EditText input = new EditText(ProfileActivity.this);
|
||||||
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
|
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
|
||||||
|
@ -771,7 +771,7 @@ public class ProfileActivity extends BaseActivity {
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
} else if (itemId == R.id.action_filter) {
|
} else if (itemId == R.id.action_filter) {
|
||||||
AlertDialog.Builder filterTagDialog = new AlertDialog.Builder(ProfileActivity.this);
|
AlertDialog.Builder filterTagDialog = new AlertDialog.Builder(ProfileActivity.this, Helper.dialogStyle());
|
||||||
Set<String> featuredTagsSet = sharedpreferences.getStringSet(getString(R.string.SET_FEATURED_TAGS), null);
|
Set<String> featuredTagsSet = sharedpreferences.getStringSet(getString(R.string.SET_FEATURED_TAGS), null);
|
||||||
List<String> tags = new ArrayList<>();
|
List<String> tags = new ArrayList<>();
|
||||||
if (featuredTagsSet != null) {
|
if (featuredTagsSet != null) {
|
||||||
|
@ -840,7 +840,7 @@ public class ProfileActivity extends BaseActivity {
|
||||||
}
|
}
|
||||||
accountsVM.getListContainingAccount(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, account.id)
|
accountsVM.getListContainingAccount(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, account.id)
|
||||||
.observe(ProfileActivity.this, mastodonListUserIs -> {
|
.observe(ProfileActivity.this, mastodonListUserIs -> {
|
||||||
AlertDialog.Builder builderSingle = new AlertDialog.Builder(ProfileActivity.this);
|
AlertDialog.Builder builderSingle = new AlertDialog.Builder(ProfileActivity.this, Helper.dialogStyle());
|
||||||
builderSingle.setTitle(getString(R.string.action_lists_add_to));
|
builderSingle.setTitle(getString(R.string.action_lists_add_to));
|
||||||
builderSingle.setPositiveButton(R.string.close, (dialog, which) -> dialog.dismiss());
|
builderSingle.setPositiveButton(R.string.close, (dialog, which) -> dialog.dismiss());
|
||||||
String[] listsId = new String[mastodonLists.size()];
|
String[] listsId = new String[mastodonLists.size()];
|
||||||
|
@ -928,7 +928,7 @@ public class ProfileActivity extends BaseActivity {
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
builderInner = new AlertDialog.Builder(ProfileActivity.this);
|
builderInner = new AlertDialog.Builder(ProfileActivity.this, Helper.dialogStyle());
|
||||||
builderInner.setTitle(stringArrayConf[0]);
|
builderInner.setTitle(stringArrayConf[0]);
|
||||||
|
|
||||||
builderInner.setNeutralButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
builderInner.setNeutralButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
||||||
|
@ -956,7 +956,7 @@ public class ProfileActivity extends BaseActivity {
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
} else if (itemId == R.id.action_report) {
|
} else if (itemId == R.id.action_report) {
|
||||||
AlertDialog.Builder builderInner = new AlertDialog.Builder(ProfileActivity.this);
|
AlertDialog.Builder builderInner = new AlertDialog.Builder(ProfileActivity.this, Helper.dialogStyle());
|
||||||
builderInner.setTitle(R.string.report_account);
|
builderInner.setTitle(R.string.report_account);
|
||||||
//Text for report
|
//Text for report
|
||||||
EditText input = new EditText(ProfileActivity.this);
|
EditText input = new EditText(ProfileActivity.this);
|
||||||
|
@ -976,7 +976,7 @@ public class ProfileActivity extends BaseActivity {
|
||||||
builderInner.show();
|
builderInner.show();
|
||||||
return true;
|
return true;
|
||||||
} else if (itemId == R.id.action_block) {
|
} else if (itemId == R.id.action_block) {
|
||||||
AlertDialog.Builder builderInner = new AlertDialog.Builder(ProfileActivity.this);
|
AlertDialog.Builder builderInner = new AlertDialog.Builder(ProfileActivity.this, Helper.dialogStyle());
|
||||||
if (relationship != null) {
|
if (relationship != null) {
|
||||||
if (relationship.blocking) {
|
if (relationship.blocking) {
|
||||||
builderInner.setTitle(stringArrayConf[5]);
|
builderInner.setTitle(stringArrayConf[5]);
|
||||||
|
@ -1016,7 +1016,7 @@ public class ProfileActivity extends BaseActivity {
|
||||||
});
|
});
|
||||||
builderInner.show();
|
builderInner.show();
|
||||||
} else if (itemId == R.id.action_block_instance) {
|
} else if (itemId == R.id.action_block_instance) {
|
||||||
AlertDialog.Builder builderInner = new AlertDialog.Builder(ProfileActivity.this);
|
AlertDialog.Builder builderInner = new AlertDialog.Builder(ProfileActivity.this, Helper.dialogStyle());
|
||||||
String domain = account.acct.split("@")[1];
|
String domain = account.acct.split("@")[1];
|
||||||
builderInner.setMessage(getString(R.string.block_domain_confirm_message, domain));
|
builderInner.setMessage(getString(R.string.block_domain_confirm_message, domain));
|
||||||
builderInner.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
builderInner.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
||||||
|
|
|
@ -170,7 +170,7 @@ public class ReorderTimelinesActivity extends BaseBarActivity implements OnStart
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addInstance() {
|
private void addInstance() {
|
||||||
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(ReorderTimelinesActivity.this);
|
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(ReorderTimelinesActivity.this, Helper.dialogStyle());
|
||||||
PopupSearchInstanceBinding popupSearchInstanceBinding = PopupSearchInstanceBinding.inflate(getLayoutInflater());
|
PopupSearchInstanceBinding popupSearchInstanceBinding = PopupSearchInstanceBinding.inflate(getLayoutInflater());
|
||||||
dialogBuilder.setView(popupSearchInstanceBinding.getRoot());
|
dialogBuilder.setView(popupSearchInstanceBinding.getRoot());
|
||||||
TextWatcher textWatcher = autoComplete(popupSearchInstanceBinding);
|
TextWatcher textWatcher = autoComplete(popupSearchInstanceBinding);
|
||||||
|
|
|
@ -190,7 +190,7 @@ public class WebviewActivity extends BaseActivity {
|
||||||
final ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(WebviewActivity.this, R.layout.domains_blocked);
|
final ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(WebviewActivity.this, R.layout.domains_blocked);
|
||||||
arrayAdapter.addAll(domains);
|
arrayAdapter.addAll(domains);
|
||||||
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(WebviewActivity.this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(WebviewActivity.this, Helper.dialogStyle());
|
||||||
builder.setTitle(R.string.list_of_blocked_domains);
|
builder.setTitle(R.string.list_of_blocked_domains);
|
||||||
|
|
||||||
builder.setNegativeButton(R.string.close, (dialog, which) -> dialog.dismiss());
|
builder.setNegativeButton(R.string.close, (dialog, which) -> dialog.dismiss());
|
||||||
|
|
|
@ -164,7 +164,7 @@ public class AdminActionActivity extends BaseBarActivity {
|
||||||
return true;
|
return true;
|
||||||
} else if (item.getItemId() == R.id.action_filter) {
|
} else if (item.getItemId() == R.id.action_filter) {
|
||||||
if (getTitle().toString().equalsIgnoreCase(getString(R.string.accounts))) {
|
if (getTitle().toString().equalsIgnoreCase(getString(R.string.accounts))) {
|
||||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(AdminActionActivity.this);
|
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(AdminActionActivity.this, Helper.dialogStyle());
|
||||||
PopupAdminFilterAccountsBinding binding = PopupAdminFilterAccountsBinding.inflate(getLayoutInflater());
|
PopupAdminFilterAccountsBinding binding = PopupAdminFilterAccountsBinding.inflate(getLayoutInflater());
|
||||||
alertDialogBuilder.setView(binding.getRoot());
|
alertDialogBuilder.setView(binding.getRoot());
|
||||||
if (local != null && remote == null) {
|
if (local != null && remote == null) {
|
||||||
|
@ -258,7 +258,7 @@ public class AdminActionActivity extends BaseBarActivity {
|
||||||
AlertDialog alert = alertDialogBuilder.create();
|
AlertDialog alert = alertDialogBuilder.create();
|
||||||
alert.show();
|
alert.show();
|
||||||
} else {
|
} else {
|
||||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(AdminActionActivity.this);
|
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(AdminActionActivity.this, Helper.dialogStyle());
|
||||||
PopupAdminFilterReportsBinding binding = PopupAdminFilterReportsBinding.inflate(getLayoutInflater());
|
PopupAdminFilterReportsBinding binding = PopupAdminFilterReportsBinding.inflate(getLayoutInflater());
|
||||||
alertDialogBuilder.setView(binding.getRoot());
|
alertDialogBuilder.setView(binding.getRoot());
|
||||||
if (resolved == null) {
|
if (resolved == null) {
|
||||||
|
|
|
@ -129,7 +129,7 @@ public class AdminDomainBlockActivity extends BaseBarActivity {
|
||||||
return true;
|
return true;
|
||||||
} else if (itemId == R.id.action_delete) {
|
} else if (itemId == R.id.action_delete) {
|
||||||
if (adminDomainBlock.id != null) {
|
if (adminDomainBlock.id != null) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(AdminDomainBlockActivity.this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(AdminDomainBlockActivity.this, Helper.dialogStyle());
|
||||||
builder.setMessage(getString(R.string.unblock_domain_confirm, adminDomainBlock.domain));
|
builder.setMessage(getString(R.string.unblock_domain_confirm, adminDomainBlock.domain));
|
||||||
builder
|
builder
|
||||||
.setPositiveButton(R.string.unblock_domain, (dialog, which) -> {
|
.setPositiveButton(R.string.unblock_domain, (dialog, which) -> {
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class CrossActionHelper {
|
||||||
}
|
}
|
||||||
Handler mainHandler = new Handler(Looper.getMainLooper());
|
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||||
Runnable myRunnable = () -> {
|
Runnable myRunnable = () -> {
|
||||||
AlertDialog.Builder builderSingle = new AlertDialog.Builder(context);
|
AlertDialog.Builder builderSingle = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
builderSingle.setTitle(context.getString(R.string.choose_accounts));
|
builderSingle.setTitle(context.getString(R.string.choose_accounts));
|
||||||
final AccountsSearchAdapter accountsSearchAdapter = new AccountsSearchAdapter(context, accountList);
|
final AccountsSearchAdapter accountsSearchAdapter = new AccountsSearchAdapter(context, accountList);
|
||||||
final BaseAccount[] accountArray = new BaseAccount[accounts.size()];
|
final BaseAccount[] accountArray = new BaseAccount[accounts.size()];
|
||||||
|
@ -96,7 +96,7 @@ public class CrossActionHelper {
|
||||||
boolean confirmBoost = sharedpreferences.getBoolean(context.getString(R.string.SET_NOTIF_VALIDATION), true);
|
boolean confirmBoost = sharedpreferences.getBoolean(context.getString(R.string.SET_NOTIF_VALIDATION), true);
|
||||||
BaseAccount selectedAccount = accountArray[which];
|
BaseAccount selectedAccount = accountArray[which];
|
||||||
if ((actionType == TypeOfCrossAction.REBLOG_ACTION && confirmBoost) || (actionType == TypeOfCrossAction.FAVOURITE_ACTION && confirmFav)) {
|
if ((actionType == TypeOfCrossAction.REBLOG_ACTION && confirmBoost) || (actionType == TypeOfCrossAction.FAVOURITE_ACTION && confirmFav)) {
|
||||||
AlertDialog.Builder alt_bld = new AlertDialog.Builder(context);
|
AlertDialog.Builder alt_bld = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
if (actionType == TypeOfCrossAction.REBLOG_ACTION) {
|
if (actionType == TypeOfCrossAction.REBLOG_ACTION) {
|
||||||
alt_bld.setMessage(context.getString(R.string.reblog_add));
|
alt_bld.setMessage(context.getString(R.string.reblog_add));
|
||||||
} else {
|
} else {
|
||||||
|
@ -409,7 +409,7 @@ public class CrossActionHelper {
|
||||||
context.startActivity(intentToot);
|
context.startActivity(intentToot);
|
||||||
((BaseActivity) context).finish();
|
((BaseActivity) context).finish();
|
||||||
} else {
|
} else {
|
||||||
AlertDialog.Builder builderSingle = new AlertDialog.Builder(context);
|
AlertDialog.Builder builderSingle = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
builderSingle.setTitle(context.getString(R.string.choose_accounts));
|
builderSingle.setTitle(context.getString(R.string.choose_accounts));
|
||||||
final AccountsSearchAdapter accountsSearchAdapter = new AccountsSearchAdapter(context, accountList);
|
final AccountsSearchAdapter accountsSearchAdapter = new AccountsSearchAdapter(context, accountList);
|
||||||
final BaseAccount[] accountArray = new BaseAccount[accounts.size()];
|
final BaseAccount[] accountArray = new BaseAccount[accounts.size()];
|
||||||
|
|
|
@ -474,7 +474,7 @@ public class Helper {
|
||||||
* @param url String download url
|
* @param url String download url
|
||||||
*/
|
*/
|
||||||
public static void manageDownloads(final Context context, final String url) {
|
public static void manageDownloads(final Context context, final String url) {
|
||||||
final AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
final AlertDialog.Builder builder = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
final DownloadManager.Request request;
|
final DownloadManager.Request request;
|
||||||
try {
|
try {
|
||||||
request = new DownloadManager.Request(Uri.parse(url.trim()));
|
request = new DownloadManager.Request(Uri.parse(url.trim()));
|
||||||
|
|
|
@ -357,7 +357,7 @@ public class MastodonHelper {
|
||||||
* @param status {@link Status}
|
* @param status {@link Status}
|
||||||
*/
|
*/
|
||||||
public static void scheduleBoost(Context context, ScheduleType scheduleType, Status status, Account account, TimedMuted listener) {
|
public static void scheduleBoost(Context context, ScheduleType scheduleType, Status status, Account account, TimedMuted listener) {
|
||||||
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context);
|
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
DatetimePickerBinding binding = DatetimePickerBinding.inflate(((Activity) context).getLayoutInflater());
|
DatetimePickerBinding binding = DatetimePickerBinding.inflate(((Activity) context).getLayoutInflater());
|
||||||
dialogBuilder.setView(binding.getRoot());
|
dialogBuilder.setView(binding.getRoot());
|
||||||
final AlertDialog alertDialogBoost = dialogBuilder.create();
|
final AlertDialog alertDialogBoost = dialogBuilder.create();
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class PushHelper {
|
||||||
Runnable myRunnable = () -> {
|
Runnable myRunnable = () -> {
|
||||||
List<String> distributors = UnifiedPush.getDistributors(context, new ArrayList<>());
|
List<String> distributors = UnifiedPush.getDistributors(context, new ArrayList<>());
|
||||||
if (distributors.size() == 0) {
|
if (distributors.size() == 0) {
|
||||||
AlertDialog.Builder alert = new AlertDialog.Builder(context);
|
AlertDialog.Builder alert = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
alert.setTitle(R.string.no_distributors_found);
|
alert.setTitle(R.string.no_distributors_found);
|
||||||
final TextView message = new TextView(context);
|
final TextView message = new TextView(context);
|
||||||
String link = "https://fedilab.app/wiki/features/push-notifications/";
|
String link = "https://fedilab.app/wiki/features/push-notifications/";
|
||||||
|
@ -134,7 +134,7 @@ public class PushHelper {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AlertDialog.Builder alert = new AlertDialog.Builder(context);
|
AlertDialog.Builder alert = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
alert.setTitle(R.string.select_distributors);
|
alert.setTitle(R.string.select_distributors);
|
||||||
String[] distributorsStr = distributors.toArray(new String[0]);
|
String[] distributorsStr = distributors.toArray(new String[0]);
|
||||||
alert.setSingleChoiceItems(distributorsStr, -1, (dialog, item) -> {
|
alert.setSingleChoiceItems(distributorsStr, -1, (dialog, item) -> {
|
||||||
|
|
|
@ -897,7 +897,7 @@ public class SpannableHelper {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
AlertDialog.Builder builder = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
builder.setMessage(context.getString(R.string.mute_tag, tag));
|
builder.setMessage(context.getString(R.string.mute_tag, tag));
|
||||||
builder
|
builder
|
||||||
.setPositiveButton(R.string.yes, (dialog, which) -> {
|
.setPositiveButton(R.string.yes, (dialog, which) -> {
|
||||||
|
|
|
@ -200,7 +200,7 @@ public class AccountAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
||||||
} else if (finalDoAction == ProfileActivity.action.UNFOLLOW) {
|
} else if (finalDoAction == ProfileActivity.action.UNFOLLOW) {
|
||||||
boolean confirm_unfollow = sharedpreferences.getBoolean(context.getString(R.string.SET_UNFOLLOW_VALIDATION), true);
|
boolean confirm_unfollow = sharedpreferences.getBoolean(context.getString(R.string.SET_UNFOLLOW_VALIDATION), true);
|
||||||
if (confirm_unfollow) {
|
if (confirm_unfollow) {
|
||||||
AlertDialog.Builder unfollowConfirm = new AlertDialog.Builder(context);
|
AlertDialog.Builder unfollowConfirm = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
unfollowConfirm.setTitle(context.getString(R.string.unfollow_confirm));
|
unfollowConfirm.setTitle(context.getString(R.string.unfollow_confirm));
|
||||||
unfollowConfirm.setMessage(account.acct);
|
unfollowConfirm.setMessage(account.acct);
|
||||||
unfollowConfirm.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
unfollowConfirm.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
||||||
|
|
|
@ -147,7 +147,7 @@ public class AnnouncementAdapter extends RecyclerView.Adapter<AnnouncementAdapte
|
||||||
emojiPopup.toggle();
|
emojiPopup.toggle();
|
||||||
});
|
});
|
||||||
holder.binding.statusAddCustomEmoji.setOnClickListener(v -> {
|
holder.binding.statusAddCustomEmoji.setOnClickListener(v -> {
|
||||||
final AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
final AlertDialog.Builder builder = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
int paddingPixel = 15;
|
int paddingPixel = 15;
|
||||||
float density = context.getResources().getDisplayMetrics().density;
|
float density = context.getResources().getDisplayMetrics().density;
|
||||||
int paddingDp = (int) (paddingPixel * density);
|
int paddingDp = (int) (paddingPixel * density);
|
||||||
|
|
|
@ -952,7 +952,7 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
});
|
});
|
||||||
composeAttachmentItemBinding.buttonDescription.setOnClickListener(v -> {
|
composeAttachmentItemBinding.buttonDescription.setOnClickListener(v -> {
|
||||||
AlertDialog.Builder builderInner = new AlertDialog.Builder(context);
|
AlertDialog.Builder builderInner = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
builderInner.setTitle(R.string.upload_form_description);
|
builderInner.setTitle(R.string.upload_form_description);
|
||||||
PopupMediaDescriptionBinding popupMediaDescriptionBinding = PopupMediaDescriptionBinding.inflate(LayoutInflater.from(context), null, false);
|
PopupMediaDescriptionBinding popupMediaDescriptionBinding = PopupMediaDescriptionBinding.inflate(LayoutInflater.from(context), null, false);
|
||||||
builderInner.setView(popupMediaDescriptionBinding.getRoot());
|
builderInner.setView(popupMediaDescriptionBinding.getRoot());
|
||||||
|
@ -1009,7 +1009,7 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
composeAttachmentItemBinding.buttonRemove.setOnClickListener(v -> {
|
composeAttachmentItemBinding.buttonRemove.setOnClickListener(v -> {
|
||||||
AlertDialog.Builder builderInner = new AlertDialog.Builder(context);
|
AlertDialog.Builder builderInner = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
builderInner.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
builderInner.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
||||||
builderInner.setPositiveButton(R.string.delete, (dialog, which) -> {
|
builderInner.setPositiveButton(R.string.delete, (dialog, which) -> {
|
||||||
attachmentList.remove(attachment);
|
attachmentList.remove(attachment);
|
||||||
|
@ -1420,7 +1420,7 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
||||||
}
|
}
|
||||||
|
|
||||||
SharedPreferences.Editor editor = sharedpreferences.edit();
|
SharedPreferences.Editor editor = sharedpreferences.edit();
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
AlertDialog.Builder builder = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
builder.setTitle(context.getString(R.string.message_language));
|
builder.setTitle(context.getString(R.string.message_language));
|
||||||
|
|
||||||
builder.setSingleChoiceItems(languagesArr, selection, null);
|
builder.setSingleChoiceItems(languagesArr, selection, null);
|
||||||
|
@ -1454,7 +1454,7 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
||||||
* @param position - int position
|
* @param position - int position
|
||||||
*/
|
*/
|
||||||
private void displayPollPopup(ComposeViewHolder holder, Status statusDraft, int position) {
|
private void displayPollPopup(ComposeViewHolder holder, Status statusDraft, int position) {
|
||||||
AlertDialog.Builder alertPoll = new AlertDialog.Builder(context);
|
AlertDialog.Builder alertPoll = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
alertPoll.setTitle(R.string.create_poll);
|
alertPoll.setTitle(R.string.create_poll);
|
||||||
ComposePollBinding composePollBinding = ComposePollBinding.inflate(LayoutInflater.from(context), new LinearLayout(context), false);
|
ComposePollBinding composePollBinding = ComposePollBinding.inflate(LayoutInflater.from(context), new LinearLayout(context), false);
|
||||||
alertPoll.setView(composePollBinding.getRoot());
|
alertPoll.setView(composePollBinding.getRoot());
|
||||||
|
@ -1672,7 +1672,7 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
||||||
*/
|
*/
|
||||||
private void displayEmojiPicker(ComposeViewHolder holder) throws DBException {
|
private void displayEmojiPicker(ComposeViewHolder holder) throws DBException {
|
||||||
|
|
||||||
final AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
final AlertDialog.Builder builder = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
int paddingPixel = 15;
|
int paddingPixel = 15;
|
||||||
float density = context.getResources().getDisplayMetrics().density;
|
float density = context.getResources().getDisplayMetrics().density;
|
||||||
int paddingDp = (int) (paddingPixel * density);
|
int paddingDp = (int) (paddingPixel * density);
|
||||||
|
|
|
@ -29,6 +29,7 @@ import java.util.List;
|
||||||
import app.fedilab.android.R;
|
import app.fedilab.android.R;
|
||||||
import app.fedilab.android.activities.MainActivity;
|
import app.fedilab.android.activities.MainActivity;
|
||||||
import app.fedilab.android.databinding.DrawerDomainBlockBinding;
|
import app.fedilab.android.databinding.DrawerDomainBlockBinding;
|
||||||
|
import app.fedilab.android.helper.Helper;
|
||||||
import app.fedilab.android.viewmodel.mastodon.AccountsVM;
|
import app.fedilab.android.viewmodel.mastodon.AccountsVM;
|
||||||
|
|
||||||
|
|
||||||
|
@ -63,7 +64,7 @@ public class DomainBlockAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
|
||||||
holder.binding.domainName.setText(domain);
|
holder.binding.domainName.setText(domain);
|
||||||
AccountsVM accountsVM = new ViewModelProvider((ViewModelStoreOwner) context).get(AccountsVM.class);
|
AccountsVM accountsVM = new ViewModelProvider((ViewModelStoreOwner) context).get(AccountsVM.class);
|
||||||
holder.binding.unblockDomain.setOnClickListener(v -> {
|
holder.binding.unblockDomain.setOnClickListener(v -> {
|
||||||
AlertDialog.Builder alt_bld = new AlertDialog.Builder(context);
|
AlertDialog.Builder alt_bld = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
alt_bld.setMessage(context.getString(R.string.unblock_domain_confirm, domain));
|
alt_bld.setMessage(context.getString(R.string.unblock_domain_confirm, domain));
|
||||||
alt_bld.setPositiveButton(R.string.yes, (dialog, id) -> {
|
alt_bld.setPositiveButton(R.string.yes, (dialog, id) -> {
|
||||||
accountsVM.removeDomainBlocks(MainActivity.currentInstance, MainActivity.currentToken, domain);
|
accountsVM.removeDomainBlocks(MainActivity.currentInstance, MainActivity.currentToken, domain);
|
||||||
|
|
|
@ -32,6 +32,7 @@ import app.fedilab.android.R;
|
||||||
import app.fedilab.android.activities.FilterActivity;
|
import app.fedilab.android.activities.FilterActivity;
|
||||||
import app.fedilab.android.client.entities.api.Filter;
|
import app.fedilab.android.client.entities.api.Filter;
|
||||||
import app.fedilab.android.databinding.DrawerFilterBinding;
|
import app.fedilab.android.databinding.DrawerFilterBinding;
|
||||||
|
import app.fedilab.android.helper.Helper;
|
||||||
import app.fedilab.android.viewmodel.mastodon.FiltersVM;
|
import app.fedilab.android.viewmodel.mastodon.FiltersVM;
|
||||||
|
|
||||||
|
|
||||||
|
@ -87,7 +88,7 @@ public class FilterAdapter extends RecyclerView.Adapter<FilterAdapter.FilterView
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
holder.binding.deleteFilter.setOnClickListener(v -> {
|
holder.binding.deleteFilter.setOnClickListener(v -> {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
AlertDialog.Builder builder = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
builder.setTitle(R.string.action_filter_delete);
|
builder.setTitle(R.string.action_filter_delete);
|
||||||
builder.setMessage(R.string.action_lists_confirm_delete);
|
builder.setMessage(R.string.action_lists_confirm_delete);
|
||||||
builder.setIcon(android.R.drawable.ic_dialog_alert)
|
builder.setIcon(android.R.drawable.ic_dialog_alert)
|
||||||
|
|
|
@ -39,6 +39,7 @@ import app.fedilab.android.client.entities.app.PinnedTimeline;
|
||||||
import app.fedilab.android.client.entities.app.Timeline;
|
import app.fedilab.android.client.entities.app.Timeline;
|
||||||
import app.fedilab.android.databinding.DrawerReorderBinding;
|
import app.fedilab.android.databinding.DrawerReorderBinding;
|
||||||
import app.fedilab.android.exception.DBException;
|
import app.fedilab.android.exception.DBException;
|
||||||
|
import app.fedilab.android.helper.Helper;
|
||||||
import app.fedilab.android.helper.itemtouchhelper.ItemTouchHelperAdapter;
|
import app.fedilab.android.helper.itemtouchhelper.ItemTouchHelperAdapter;
|
||||||
import app.fedilab.android.helper.itemtouchhelper.ItemTouchHelperViewHolder;
|
import app.fedilab.android.helper.itemtouchhelper.ItemTouchHelperViewHolder;
|
||||||
import app.fedilab.android.helper.itemtouchhelper.OnStartDragListener;
|
import app.fedilab.android.helper.itemtouchhelper.OnStartDragListener;
|
||||||
|
@ -169,7 +170,7 @@ public class ReorderTabAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
||||||
}
|
}
|
||||||
holder.binding.delete.setOnClickListener(v -> {
|
holder.binding.delete.setOnClickListener(v -> {
|
||||||
if (item.type == Timeline.TimeLineEnum.TAG || item.type == Timeline.TimeLineEnum.REMOTE || item.type == Timeline.TimeLineEnum.LIST) {
|
if (item.type == Timeline.TimeLineEnum.TAG || item.type == Timeline.TimeLineEnum.REMOTE || item.type == Timeline.TimeLineEnum.LIST) {
|
||||||
AlertDialog.Builder alt_bld = new AlertDialog.Builder(context);
|
AlertDialog.Builder alt_bld = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
String title = "";
|
String title = "";
|
||||||
String message = "";
|
String message = "";
|
||||||
alt_bld.setTitle(R.string.action_lists_delete);
|
alt_bld.setTitle(R.string.action_lists_delete);
|
||||||
|
|
|
@ -436,7 +436,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
});
|
});
|
||||||
holder.binding.statusAddCustomEmoji.setOnClickListener(v -> {
|
holder.binding.statusAddCustomEmoji.setOnClickListener(v -> {
|
||||||
|
|
||||||
final AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
final AlertDialog.Builder builder = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
int paddingPixel = 15;
|
int paddingPixel = 15;
|
||||||
float density = context.getResources().getDisplayMetrics().density;
|
float density = context.getResources().getDisplayMetrics().density;
|
||||||
int paddingDp = (int) (paddingPixel * density);
|
int paddingDp = (int) (paddingPixel * density);
|
||||||
|
@ -711,7 +711,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
});
|
});
|
||||||
holder.binding.actionButtonBoost.setOnClickListener(v -> {
|
holder.binding.actionButtonBoost.setOnClickListener(v -> {
|
||||||
if (confirmBoost) {
|
if (confirmBoost) {
|
||||||
AlertDialog.Builder alt_bld = new AlertDialog.Builder(context);
|
AlertDialog.Builder alt_bld = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
if (statusToDeal.reblogged) {
|
if (statusToDeal.reblogged) {
|
||||||
alt_bld.setMessage(context.getString(R.string.reblog_remove));
|
alt_bld.setMessage(context.getString(R.string.reblog_remove));
|
||||||
} else {
|
} else {
|
||||||
|
@ -781,7 +781,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
});
|
});
|
||||||
holder.binding.actionButtonFavorite.setOnClickListener(v -> {
|
holder.binding.actionButtonFavorite.setOnClickListener(v -> {
|
||||||
if (confirmFav) {
|
if (confirmFav) {
|
||||||
AlertDialog.Builder alt_bld = new AlertDialog.Builder(context);
|
AlertDialog.Builder alt_bld = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
if (status.favourited) {
|
if (status.favourited) {
|
||||||
alt_bld.setMessage(context.getString(R.string.favourite_remove));
|
alt_bld.setMessage(context.getString(R.string.favourite_remove));
|
||||||
} else {
|
} else {
|
||||||
|
@ -1663,7 +1663,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
popup.setOnMenuItemClickListener(item -> {
|
popup.setOnMenuItemClickListener(item -> {
|
||||||
int itemId = item.getItemId();
|
int itemId = item.getItemId();
|
||||||
if (itemId == R.id.action_redraft) {
|
if (itemId == R.id.action_redraft) {
|
||||||
AlertDialog.Builder builderInner = new AlertDialog.Builder(context);
|
AlertDialog.Builder builderInner = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
builderInner.setTitle(stringArrayConf[1]);
|
builderInner.setTitle(stringArrayConf[1]);
|
||||||
builderInner.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
builderInner.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
||||||
builderInner.setPositiveButton(R.string.yes, (dialog, which) -> {
|
builderInner.setPositiveButton(R.string.yes, (dialog, which) -> {
|
||||||
|
@ -1719,7 +1719,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
} else if (itemId == R.id.action_open_browser) {
|
} else if (itemId == R.id.action_open_browser) {
|
||||||
Helper.openBrowser(context, statusToDeal.url);
|
Helper.openBrowser(context, statusToDeal.url);
|
||||||
} else if (itemId == R.id.action_remove) {
|
} else if (itemId == R.id.action_remove) {
|
||||||
AlertDialog.Builder builderInner = new AlertDialog.Builder(context);
|
AlertDialog.Builder builderInner = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
builderInner.setTitle(stringArrayConf[0]);
|
builderInner.setTitle(stringArrayConf[0]);
|
||||||
builderInner.setMessage(statusToDeal.content);
|
builderInner.setMessage(statusToDeal.content);
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
||||||
|
@ -1736,7 +1736,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
}));
|
}));
|
||||||
builderInner.show();
|
builderInner.show();
|
||||||
} else if (itemId == R.id.action_block_domain) {
|
} else if (itemId == R.id.action_block_domain) {
|
||||||
AlertDialog.Builder builderInner = new AlertDialog.Builder(context);
|
AlertDialog.Builder builderInner = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
builderInner.setTitle(stringArrayConf[3]);
|
builderInner.setTitle(stringArrayConf[3]);
|
||||||
String domain = statusToDeal.account.acct.split("@")[1];
|
String domain = statusToDeal.account.acct.split("@")[1];
|
||||||
builderInner.setMessage(context.getString(R.string.block_domain_confirm_message, domain));
|
builderInner.setMessage(context.getString(R.string.block_domain_confirm_message, domain));
|
||||||
|
@ -1747,7 +1747,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
});
|
});
|
||||||
builderInner.show();
|
builderInner.show();
|
||||||
} else if (itemId == R.id.action_mute) {
|
} else if (itemId == R.id.action_mute) {
|
||||||
AlertDialog.Builder builderInner = new AlertDialog.Builder(context);
|
AlertDialog.Builder builderInner = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
builderInner.setTitle(stringArrayConf[0]);
|
builderInner.setTitle(stringArrayConf[0]);
|
||||||
builderInner.setMessage(statusToDeal.account.acct);
|
builderInner.setMessage(statusToDeal.account.acct);
|
||||||
builderInner.setNeutralButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
builderInner.setNeutralButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
||||||
|
@ -1786,7 +1786,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
MastodonHelper.scheduleBoost(context, MastodonHelper.ScheduleType.TIMED_MUTED, statusToDeal, null, null);
|
MastodonHelper.scheduleBoost(context, MastodonHelper.ScheduleType.TIMED_MUTED, statusToDeal, null, null);
|
||||||
return true;
|
return true;
|
||||||
} else if (itemId == R.id.action_block) {
|
} else if (itemId == R.id.action_block) {
|
||||||
AlertDialog.Builder builderInner = new AlertDialog.Builder(context);
|
AlertDialog.Builder builderInner = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
builderInner.setTitle(stringArrayConf[1]);
|
builderInner.setTitle(stringArrayConf[1]);
|
||||||
builderInner.setMessage(statusToDeal.account.acct);
|
builderInner.setMessage(statusToDeal.account.acct);
|
||||||
builderInner.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
builderInner.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
||||||
|
@ -1909,7 +1909,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
}
|
}
|
||||||
Handler mainHandler = new Handler(Looper.getMainLooper());
|
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||||
Runnable myRunnable = () -> {
|
Runnable myRunnable = () -> {
|
||||||
AlertDialog.Builder builderSingle = new AlertDialog.Builder(context);
|
AlertDialog.Builder builderSingle = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
builderSingle.setTitle(context.getString(R.string.choose_accounts));
|
builderSingle.setTitle(context.getString(R.string.choose_accounts));
|
||||||
final AccountsSearchAdapter accountsSearchAdapter = new AccountsSearchAdapter(context, accountList);
|
final AccountsSearchAdapter accountsSearchAdapter = new AccountsSearchAdapter(context, accountList);
|
||||||
final BaseAccount[] accountArray = new BaseAccount[accounts.size()];
|
final BaseAccount[] accountArray = new BaseAccount[accounts.size()];
|
||||||
|
|
|
@ -95,7 +95,7 @@ public class StatusDraftAdapter extends RecyclerView.Adapter<StatusDraftAdapter.
|
||||||
|
|
||||||
|
|
||||||
holder.binding.delete.setOnClickListener(v -> {
|
holder.binding.delete.setOnClickListener(v -> {
|
||||||
AlertDialog.Builder unfollowConfirm = new AlertDialog.Builder(context);
|
AlertDialog.Builder unfollowConfirm = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
unfollowConfirm.setMessage(context.getString(R.string.remove_draft));
|
unfollowConfirm.setMessage(context.getString(R.string.remove_draft));
|
||||||
unfollowConfirm.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
unfollowConfirm.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
||||||
unfollowConfirm.setPositiveButton(R.string.delete, (dialog, which) -> {
|
unfollowConfirm.setPositiveButton(R.string.delete, (dialog, which) -> {
|
||||||
|
|
|
@ -130,7 +130,7 @@ public class StatusScheduledAdapter extends RecyclerView.Adapter<StatusScheduled
|
||||||
|
|
||||||
});
|
});
|
||||||
holder.binding.delete.setOnClickListener(v -> {
|
holder.binding.delete.setOnClickListener(v -> {
|
||||||
AlertDialog.Builder unfollowConfirm = new AlertDialog.Builder(context);
|
AlertDialog.Builder unfollowConfirm = new AlertDialog.Builder(context, Helper.dialogStyle());
|
||||||
unfollowConfirm.setMessage(context.getString(R.string.remove_scheduled));
|
unfollowConfirm.setMessage(context.getString(R.string.remove_scheduled));
|
||||||
unfollowConfirm.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
unfollowConfirm.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
||||||
unfollowConfirm.setPositiveButton(R.string.delete, (dialog, which) -> {
|
unfollowConfirm.setPositiveButton(R.string.delete, (dialog, which) -> {
|
||||||
|
|
|
@ -357,6 +357,7 @@
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/card_title"
|
android:id="@+id/card_title"
|
||||||
|
android:maxLines="2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:text="Title" />
|
tools:text="Title" />
|
||||||
|
|
Loading…
Reference in New Issue