mirror of
https://github.com/nextcloud/android.git
synced 2024-11-28 18:28:59 +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));
|
sharePeopleText.setOnClickListener(v -> shareFile(file));
|
||||||
|
|
||||||
ImageView sharePeopleImageView = view.findViewById(R.id.share_people_icon);
|
ImageView sharePeopleImageView = view.findViewById(R.id.share_people_icon);
|
||||||
sharePeopleImageView.getBackground().setColorFilter(ThemeUtils.elementColor(), PorterDuff.Mode.SRC_IN);
|
themeShareButtonImage(sharePeopleImageView);
|
||||||
sharePeopleImageView.getDrawable().setColorFilter(ThemeUtils.fontColor(), PorterDuff.Mode.SRC_IN);
|
|
||||||
sharePeopleImageView.setOnClickListener(v -> shareFile(file));
|
sharePeopleImageView.setOnClickListener(v -> shareFile(file));
|
||||||
|
|
||||||
// Share via link button
|
// Share via link button
|
||||||
|
@ -107,8 +106,7 @@ public class SendShareDialog extends BottomSheetDialogFragment {
|
||||||
shareLinkText.setOnClickListener(v -> shareFile(file));
|
shareLinkText.setOnClickListener(v -> shareFile(file));
|
||||||
|
|
||||||
ImageView shareLinkImageView = view.findViewById(R.id.share_link_icon);
|
ImageView shareLinkImageView = view.findViewById(R.id.share_link_icon);
|
||||||
shareLinkImageView.getBackground().setColorFilter(ThemeUtils.elementColor(), PorterDuff.Mode.SRC_IN);
|
themeShareButtonImage(shareLinkImageView);
|
||||||
shareLinkImageView.getDrawable().setColorFilter(ThemeUtils.fontColor(), PorterDuff.Mode.SRC_IN);
|
|
||||||
shareLinkImageView.setOnClickListener(v -> shareFile(file));
|
shareLinkImageView.setOnClickListener(v -> shareFile(file));
|
||||||
|
|
||||||
if (file.isSharedWithMe() && !file.canReshare()) {
|
if (file.isSharedWithMe() && !file.canReshare()) {
|
||||||
|
@ -151,6 +149,11 @@ public class SendShareDialog extends BottomSheetDialogFragment {
|
||||||
return view;
|
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() {
|
private void showResharingNotAllowedSnackbar() {
|
||||||
Snackbar snackbar = Snackbar.make(view, R.string.resharing_is_not_allowed, Snackbar.LENGTH_LONG);
|
Snackbar snackbar = Snackbar.make(view, R.string.resharing_is_not_allowed, Snackbar.LENGTH_LONG);
|
||||||
snackbar.addCallback(new Snackbar.Callback() {
|
snackbar.addCallback(new Snackbar.Callback() {
|
||||||
|
|
Loading…
Reference in a new issue