光环前端优化汇总(2020年6月第2周)0622测试:7(2) 9/10(1) https://gitlab.ghzs.com/pm/halo-app-issues/-/issues/895

This commit is contained in:
张玉久
2020-06-23 14:44:17 +08:00
parent b3c5ca6112
commit 8cdd66cd89
6 changed files with 82 additions and 19 deletions

View File

@ -271,6 +271,16 @@ public class DisplayUtils {
return metrics.heightPixels;
}
public static int getToastOffset() {
int i = Resources.getSystem().getIdentifier("toast_y_offset", "dimen", "android");
return HaloApp.getInstance().getApplication().getResources().getDimensionPixelSize(i);
}
public static int getToastDefaultGravity() {
int i = Resources.getSystem().getIdentifier("config_toastDefaultGravity", "integer", "android");
return HaloApp.getInstance().getApplication().getResources().getInteger(i);
}
public static boolean hasSoftKeys(Context context) {
if (!(context instanceof Activity)) return false;