Fix cropper not using theme colour

This commit is contained in:
Sylvia van Os
2022-01-26 22:38:02 +01:00
parent a308634868
commit 9887e19ec9
2 changed files with 10 additions and 0 deletions

View File

@@ -1,5 +1,9 @@
# Changelog
## Unreleased - 101
- Fix cropper not using theme colour
## v2.14.1 - 100 (2022-01-15)
- Hide search, expand and sort icons until there is at least 1 card

View File

@@ -36,6 +36,7 @@ import android.widget.Toast;
import com.google.android.material.chip.Chip;
import com.google.android.material.chip.ChipGroup;
import com.google.android.material.color.MaterialColors;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import com.google.android.material.tabs.TabLayout;
@@ -687,6 +688,11 @@ public class LoyaltyCardEditActivity extends CatimaAppCompatActivity {
new AspectRatio(getResources().getString(R.string.ucrop_label_original).toUpperCase(), sourceWidth, sourceHeight),
new AspectRatio(getResources().getString(R.string.card).toUpperCase(), 85.6f, 53.98f)
);
// Fix theming
int colorPrimary = MaterialColors.getColor(this, R.attr.colorPrimary, R.color.md_theme_light_primary);
mCropperOptions.setToolbarColor(colorPrimary);
mCropperOptions.setStatusBarColor(colorPrimary);
}
@Override