mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 15:15:51 +03:00
colorize/theme only the progress, don't tint the background for the progress bar
This commit is contained in:
parent
09cd54e201
commit
9560402760
2 changed files with 20 additions and 3 deletions
|
@ -305,7 +305,7 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
|
|||
mQuotaProgressBar = (ProgressBar) findQuotaViewById(R.id.drawer_quota_ProgressBar);
|
||||
mQuotaTextPercentage = (TextView) findQuotaViewById(R.id.drawer_quota_percentage);
|
||||
mQuotaTextLink = (TextView) findQuotaViewById(R.id.drawer_quota_link);
|
||||
ThemeUtils.colorHorizontalProgressBar(mQuotaProgressBar, ThemeUtils.primaryColor(this));
|
||||
ThemeUtils.colorProgressBar(mQuotaProgressBar, ThemeUtils.primaryColor(this));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -818,7 +818,8 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
|
|||
}
|
||||
|
||||
mQuotaProgressBar.setProgress(relative);
|
||||
ThemeUtils.colorHorizontalProgressBar(mQuotaProgressBar, DisplayUtils.getRelativeInfoColor(this, relative));
|
||||
|
||||
ThemeUtils.colorProgressBar(mQuotaProgressBar, DisplayUtils.getRelativeInfoColor(this, relative));
|
||||
|
||||
updateQuotaLink();
|
||||
showQuota(true);
|
||||
|
|
|
@ -279,7 +279,7 @@ public class ThemeUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* sets the coloring of the given progress bar to color_accent.
|
||||
* sets the coloring of the given progress bar to given color.
|
||||
*
|
||||
* @param progressBar the progress bar to be colored
|
||||
* @param color the color to be used
|
||||
|
@ -291,6 +291,22 @@ public class ThemeUtils {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* sets the coloring of the given progress bar's progress to given color.
|
||||
*
|
||||
* @param progressBar the progress bar to be colored
|
||||
* @param color the color to be used
|
||||
*/
|
||||
public static void colorProgressBar(ProgressBar progressBar, @ColorInt int color) {
|
||||
if (progressBar != null) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
progressBar.setProgressTintList(ColorStateList.valueOf(color));
|
||||
} else {
|
||||
ThemeUtils.colorHorizontalProgressBar(progressBar, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* sets the coloring of the given seek bar to color_accent.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue