android:overScrollMode="never"取消recyclerview linearview ScrollView动画
1 XRecyclerView 在设置适配器时,能够保持显示数据大小一致
@NonNull
@Override
public Holder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
View view = LayoutInflater.from(context).inflate(R.layout.adapter_main, viewGroup,false);
return new Holder(view);
}
2 在项目的build.gradle中
repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://jitpack.io' }
google()
jcenter()
}
这个真的是太难受了,国内开发环境真的很麻烦,有时候就直接显示无法连接,搞不清是网络问题,还是什么的,总之,保险起见吧
3 开发中 比较常用的依赖
//butterknife
implementation 'com.jakewharton:butterknife:10.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
//日志拦截器
implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'
//only Retrofit(只用Retrofit联网)!!
implementation 'com.facebook.fresco:fresco:2.3.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
//Rxjava and Retrofit(Retrofit+Rx需要添加的依赖)
implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
implementation 'io.reactivex:rxandroid:1.2.1'
implementation 'io.reactivex:rxjava:1.2.1'
//retrofit
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.0.2'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
//Rxjava
implementation 'io.reactivex:rxandroid:1.2.1'
implementation 'io.reactivex:rxjava:1.3.0'
implementation 'com.hwangjr.rxbus:rxbus:1.0.6'
//xrecyclerview
implementation 'com.jcodecraeer:xrecyclerview:1.6.0'
implementation 'org.greenrobot:eventbus:3.0.0'
// 支付宝 SDK AAR 包所需的配置
implementation(name: 'alipaySdk-15.7.9-20200727142846', ext: 'aar')
//noinspection GradleCompatible
implementation 'com.android.support:support-v4:28.0.0'
//noinspection GradleCompatible
implementation "com.android.support:appcompat-v7:28.0.0"
//wx 支付依赖(包含统计功能)
//implementation 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+'
//wx不包含统计功能
implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+'
//Xrecyclerview
implementation 'com.jcodecraeer:xrecyclerview:1.2.0'
//沉浸式状态栏
// implementation 'com.jaeger.statusbarutil:library:1.4.0'
//轮播图框架
implementation 'com.github.xiaohaibin:XBanner:androidx_v1.1.2'
implementation 'com.github.bumptech.glide:glide:4.9.0'
//折线图控件
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
//导入design控件(头部标签)
implementation 'com.google.android.material:material:1.1.0-alpha09'
//汉字转拼音
implementation 'com.belerweb:pinyin4j:2.5.1'
//侧滑
implementation 'com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.1'
//三级联动(省市区)
implementation 'com.contrarywind:Android-PickerView:4.1.6'
implementation 'com.contrarywind:wheelview:4.1.0'
//图片选择器
implementation "com.github.bumptech.glide:glide:4.11.0"
implementation 'com.github.LuckSiege.PictureSelector:picture_library:v2.5.9'
//流式布局设置单选
implementation 'com.hyman:flowlayout-lib:1.1.2'
//鲁班图片压缩
implementation 'top.zibin:Luban:1.1.3'
//仿微信气泡框
implementation 'com.github.bigdongdong:ChatView:2.0'
//第三方减少tablayout下划线宽度
implementation 'com.androidkun:XTabLayout:1.1.5'
implementation project(':mydatapicker1')
implementation "com.lzy.net:okgo:3.0.4"//okgo 网络请求
implementation 'com.google.code.gson:gson:2.8.2'//gson
implementation "org.permissionsdispatcher:permissionsdispatcher:4.3.1"//权限
annotationProcessor "org.permissionsdispatcher:permissionsdispatcher-processor:4.3.1"//权限
//加载超大长图使用
implementation 'com.davemorrissey.labs:subsampling-scale-image-view-androidx:3.10.0'
//避免软键盘遮挡
implementation 'com.blankj:utilcode:1.24.2'
//友盟社会化分享
// implementation 'com.umeng.umsdk:common:9.3.3'
implementation 'com.umeng.umsdk:asms:1.1.4'
implementation 'com.umeng.umsdk:share-alipay:7.1.4'
// 引入基础SDK
implementation 'com.huawei.hms:ml-computer-vision-bcr:1.0.3.303'
// 引入银行卡识别plugin包
implementation 'com.huawei.hms:ml-computer-card-bcr-plugin:1.0.3.300'
// 引入银行卡识别模型包
implementation 'com.huawei.hms:ml-computer-card-bcr-model:1.0.3.300'
//调色板
implementation 'androidx.palette:palette:1.0.0'
4 读取raw和assets文件夹下的文件
//读取res/raw:
InputStream is =getResources().openRawResource(R.raw.filename);
//读取assets:
AssetManager am = getAssets();
InputStream is = am.open("filename");
为以后方便吧
先记录到这里吧,后续添加
感觉有帮助的话,请大家多多关注