implementation ‘com.github.bumptech.glide:glide:4.13.2’
Glide.with(getContext()).load(new File(imageConfig.getPath())).into(sizeDetect);
<meta-data
android:name="design_width_in_dp"
android:value="1280"/>
<meta-data
android:name="design_height_in_dp"
android:value="720"/>
在Application中使用
AutoSize.initCompatMultiProcess(sContext);
AutoSizeConfig.getInstance().setCustomFragment(true).setBaseOnWidth(true);
implementation 'com.github.JessYanCoding:AndroidAutoSize:v1.2.1'
遇到是Service添加的window add的view 那么就需要在Service中使用到
```java
@Override
public Resources getResources() {
AutoSizeCompat.autoConvertDensityOfGlobal(super.getResources());//如果没有自定义需求用这个方法
return super.getResources();
}
implementation ‘com.google.code.gson:gson:2.9.1’
String json = FactoryTestItemJsonUtil.getJson(this);
Gson gson = new Gson();
if(json!= null && !json.isEmpty()){
FactoryTestItems factoryTestItems = gson.fromJson(json, FactoryTestItems.class);
FactoryTestItemJsonUtil.setFactoryTestItems(factoryTestItems);
}
使用getJson读取json文件里面的内容,然后使用gson.fromJson配合item项读取factorytextItem,最后setItem
<litepal>
<dbname value="SignalSource" >dbname>
<version value="1" >version>
<list>
<mapping class="com.nmv.sourcesettings.bean.SignalSourceBean">mapping>
<mapping class="com.nmv.sourcesettings.bean.SoundModeBean">mapping>
<mapping class="com.nmv.sourcesettings.bean.VgaSettingBean">mapping>
list>
litepal>
保存数据使用mSignalSourceBean.save();这样就可以保存数据库中的数据