需要注意的問題

一   圖片分割

 

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

 

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