關於android文件路徑 轉 Bitmap

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     詳情請見 下載資源

 

 

 

 

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章