More onboarding updates

This commit is contained in:
Grishka
2023-01-26 01:38:29 +03:00
parent a1798b6666
commit bcb3e217cd
8 changed files with 214 additions and 71 deletions

View File

@@ -601,4 +601,12 @@ public class UiUtils{
public static boolean isMIUI(){
return !TextUtils.isEmpty(getSystemProperty("ro.miui.ui.version.code"));
}
public static int alphaBlendColors(int color1, int color2, float alpha){
float alpha0=1f-alpha;
int r=Math.round(((color1 >> 16) & 0xFF)*alpha0+((color2 >> 16) & 0xFF)*alpha);
int g=Math.round(((color1 >> 8) & 0xFF)*alpha0+((color2 >> 8) & 0xFF)*alpha);
int b=Math.round((color1 & 0xFF)*alpha0+(color2 & 0xFF)*alpha);
return 0xFF000000 | (r << 16) | (g << 8) | b;
}
}