String filePath = "你的文件路徑" Bitmap bitmap = BitmapFactory.decodeFile(filePath);
系統 SystemTimeMills 轉指定格式
public static String format(Date d, String s){ SimpleDateFormat sdf=new SimpleDateFormat(s); return sdf.format(d); }
常見json轉List 需要導入
implementation 'com.google.code.gson:gson:2.8.6'
JsonUtils.fromJson(data,new TypeToken<List<MainItemBean>>() {});
Android Studio 直接到 第三方 jar 可避免手動導入的報錯
File ---------> ProjectStuctor ------------>Dependencies-------> model -------> LibJar
啓用Java 8特性
compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 }
線程池 ThreadPoolManager 詳情請見 下載資源