Fixed disappearing icons

This commit is contained in:
M66B
2019-06-22 19:36:29 +02:00
parent 8b2e83aca8
commit 131d585432
5 changed files with 4 additions and 20 deletions

View File

@@ -314,12 +314,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
seekBar = view.findViewById(R.id.seekBar);
ibDown = view.findViewById(R.id.ibDown);
ibUp = view.findViewById(R.id.ibUp);
bottom_navigation = view.findViewById(R.id.bottom_navigation);
for (int i = 0; i < bottom_navigation.getMenu().size(); i++)
bottom_navigation.getMenu().getItem(i).getIcon().mutate();
pbWait = view.findViewById(R.id.pbWait);
grpSupport = view.findViewById(R.id.grpSupport);
grpHintSupport = view.findViewById(R.id.grpHintSupport);
@@ -1162,7 +1158,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
if (dX > 0) {
// Right swipe
Drawable d = getResources().getDrawable(EntityFolder.getIcon(swipes.right_type), getContext().getTheme());
Drawable d = getResources().getDrawable(
EntityFolder.getIcon(swipes.right_type), getContext().getTheme()).mutate();
d.setAlpha(Math.round(255 * Math.min(dX / (2 * margin + size), 1.0f)));
int padding = (rect.height() - size);
d.setBounds(
@@ -1173,7 +1170,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
d.draw(canvas);
} else if (dX < 0) {
// Left swipe
Drawable d = getResources().getDrawable(EntityFolder.getIcon(swipes.left_type), getContext().getTheme());
Drawable d = getResources().getDrawable(
EntityFolder.getIcon(swipes.left_type), getContext().getTheme()).mutate();
d.setAlpha(Math.round(255 * Math.min(-dX / (2 * margin + size), 1.0f)));
int padding = (rect.height() - size);
d.setBounds(