mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 22:25:44 +03:00
extract theming method
This commit is contained in:
parent
adf12d2222
commit
c42f2d4d61
1 changed files with 7 additions and 4 deletions
|
@ -98,8 +98,7 @@ public class SendShareDialog extends BottomSheetDialogFragment {
|
|||
sharePeopleText.setOnClickListener(v -> shareFile(file));
|
||||
|
||||
ImageView sharePeopleImageView = view.findViewById(R.id.share_people_icon);
|
||||
sharePeopleImageView.getBackground().setColorFilter(ThemeUtils.elementColor(), PorterDuff.Mode.SRC_IN);
|
||||
sharePeopleImageView.getDrawable().setColorFilter(ThemeUtils.fontColor(), PorterDuff.Mode.SRC_IN);
|
||||
themeShareButtonImage(sharePeopleImageView);
|
||||
sharePeopleImageView.setOnClickListener(v -> shareFile(file));
|
||||
|
||||
// Share via link button
|
||||
|
@ -107,8 +106,7 @@ public class SendShareDialog extends BottomSheetDialogFragment {
|
|||
shareLinkText.setOnClickListener(v -> shareFile(file));
|
||||
|
||||
ImageView shareLinkImageView = view.findViewById(R.id.share_link_icon);
|
||||
shareLinkImageView.getBackground().setColorFilter(ThemeUtils.elementColor(), PorterDuff.Mode.SRC_IN);
|
||||
shareLinkImageView.getDrawable().setColorFilter(ThemeUtils.fontColor(), PorterDuff.Mode.SRC_IN);
|
||||
themeShareButtonImage(shareLinkImageView);
|
||||
shareLinkImageView.setOnClickListener(v -> shareFile(file));
|
||||
|
||||
if (file.isSharedWithMe() && !file.canReshare()) {
|
||||
|
@ -151,6 +149,11 @@ public class SendShareDialog extends BottomSheetDialogFragment {
|
|||
return view;
|
||||
}
|
||||
|
||||
private void themeShareButtonImage(ImageView shareImageView) {
|
||||
shareImageView.getBackground().setColorFilter(ThemeUtils.elementColor(), PorterDuff.Mode.SRC_IN);
|
||||
shareImageView.getDrawable().setColorFilter(ThemeUtils.fontColor(), PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
|
||||
private void showResharingNotAllowedSnackbar() {
|
||||
Snackbar snackbar = Snackbar.make(view, R.string.resharing_is_not_allowed, Snackbar.LENGTH_LONG);
|
||||
snackbar.addCallback(new Snackbar.Callback() {
|
||||
|
|
Loading…
Reference in a new issue