InAppUpdater
InAppUpdater copied to clipboard
[BUG] Working fine but my colorAccent is black, so it not showing with black Snackbar
** RESTART ** Working fine but if my colorAccent is black/blue, then it is not showing with black Snackbar. RESTART button of snack bar not showing because of color.
@STPLAmrut Thanks for reporting this issue. Could you please share the material library version your using in the app?
@STPLAmrut Thanks for reporting this issue. Could you please share the material library version your using in the app?
Latest one :1.3.0
You can add a function to the library for users to be able to set the color they want so it can match their theme.
private String notificationColor = "#2E7D32";
...
public void setNotificationColor(String color){
try {
notificationColor = color;
} catch (Exception e){
notificationColor = "#2E7D32";
}
}
...
private void popupSnackbarForCompleteUpdate() {
Snackbar snackbar =
Snackbar.make(
getActivity().getWindow().getDecorView().findViewById(android.R.id.content),
"An update has just been downloaded.",
Snackbar.LENGTH_INDEFINITE);
snackbar.setAction("RESTART", v -> appUpdateManager.completeUpdate());
snackbar.setBackgroundTint(Color.parseColor(notificationColor)); // Set snackbar color here
snackbar.show();
}
Hi @cmy82 , really value your contribution. But I'm quite busy these days. It will be great if you can send a PR for the above feature.