Merge remote-tracking branch 'FineFindus/fix/home-overflow-menu-visibility'
# Conflicts: # mastodon/src/main/java/org/joinmastodon/android/ui/utils/UiUtils.java
This commit is contained in:
@@ -358,7 +358,7 @@ public class HomeTabFragment extends MastodonToolbarFragment implements Scrollab
|
|||||||
addListsToOverflowMenu();
|
addListsToOverflowMenu();
|
||||||
addHashtagsToOverflowMenu();
|
addHashtagsToOverflowMenu();
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && !UiUtils.isEMUI()) {
|
||||||
m.setGroupDividerEnabled(true);
|
m.setGroupDividerEnabled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1177,7 +1177,19 @@ public class UiUtils{
|
|||||||
return !TextUtils.isEmpty(getSystemProperty("ro.miui.ui.version.code"));
|
return !TextUtils.isEmpty(getSystemProperty("ro.miui.ui.version.code"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean pickAccountForCompose(Activity activity, String accountID, String prefilledText){
|
public static boolean isEMUI() {
|
||||||
|
return !TextUtils.isEmpty(getSystemProperty("ro.build.version.emui"));
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean pickAccountForCompose(Activity activity, String accountID, String prefilledText) {
|
||||||
Bundle args = new Bundle();
|
Bundle args = new Bundle();
|
||||||
if (prefilledText != null) args.putString("prefilledText", prefilledText);
|
if (prefilledText != null) args.putString("prefilledText", prefilledText);
|
||||||
return pickAccountForCompose(activity, accountID, args);
|
return pickAccountForCompose(activity, accountID, args);
|
||||||
|
|||||||
Reference in New Issue
Block a user