需要注意的问题

一   图片分割

 

String images = listBean.getImages();
String[] split = images.split("\\|");
Glide.with(context).load(split[0]).into(holder.image);

二  presenter

三 constant 常量类

四  用到来的依赖

 

implementation 'com.hjm:BottomTabBar:1.1.1'
implementation 'com.youth.banner:banner:1.4.9'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.squareup.okhttp3:okhttp:3.9.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.journeyapps:zxing-android-embedded:3.5.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.android.support:multidex:1.0.1'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
implementation 'com.jph.takephoto:takephoto_library:4.0.3'
implementation 'com.yanzhenjie:permission:1.0.5'

五  转换

 

Double.parseDouble()
Integer.parseInt() 

 

 

六  防止内存溢出

 public void onDetach(){
        iSearchView = null;

    }

七  XML文件布局时 ,字太多需要设定行数 ,最后没有显示的字用...代替时 , 代码为

 

android:ellipsize="end"     //没显示的字用...代替

android:maxLines="2"      //显示行数为2

 

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