android E/eglCodecCommon 錯誤處理方式
android studio 模擬器 api 22
錯誤訊息,重複出現
E/eglCodecCommon: **** ERROR unknown type 0x0 (glSizeof,73)
E/eglCodecCommon: glUtilsParamSize: unknow param 0x00000b44
處理方式
You can solve this by adding android:hardwareAccelerated="false" in AndroidManifest.xml
2017年8月1日
2017年5月8日
Android Dialog 標題換行
Android Dialog 標題換行
TextView view = new TextView(this);view.setText(appraisal.getTitle() + "\n" + appraisal.getNoticeInfo());view.setPadding(40, 20, 0, 20);view.setTextSize(12); Dialog alertDialog = new AlertDialog.Builder(this).setCustomTitle(view);
2017年3月11日
Android 判斷手機或是平板
Android 判斷手機或是平板
public static boolean isPad(Context context) {
return (context.getResources().getConfiguration().screenLayout
& Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE;
}
回傳true就是平板
回傳false就是手機
public static boolean isPad(Context context) {
return (context.getResources().getConfiguration().screenLayout
& Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE;
}
回傳true就是平板
回傳false就是手機
訂閱:
文章 (Atom)