Android 记录开发中的一些问题

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");

为以后方便吧

先记录到这里吧,后续添加
感觉有帮助的话,请大家多多关注
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
为了满足广大Android开发爱好者与从业者的学习需求,我们精心整理并上传了一份全面而实用的Android项目资源包。这份资源包内容丰富,涵盖了从基础知识到实战应用的全方位内容,旨在为开发者们提供一个便捷、高效的学习平台。 一、文件手册 资源包的文件手册部分,详细记录Android开发的核心知识点和常用技术。无论是初学者还是有一定经验的开发者,都能从找到所需的学习资料。手册采用了简洁明了的排版方式,使得查阅更加方便快捷。同时,手册内容深入浅出,既适合新手入门,也能为老手提供有价值的参考。 二、项目实战与练习 为了让学习者能够将理论知识与实践相结合,我们特别准备了项目实战与练习部分。这部分内容包含了多个精心设计的Android项目案例,从需求分析、设计思路到实现过程,都有详细的讲解和代码示例。学习者可以通过实际操作,深入了解Android开发的整个流程,提升自己的实战能力。 此外,我们还提供了一系列练习题,旨在巩固所学知识,检验学习成果。这些练习题既有基础题,也有难度较高的挑战题,适合不同层次的学习者进行练习。 三、Android开发工具集 在Android开发过程,选择合适的工具能够大大提高开发效率。因此,我们整理了常用的Android开发工具集,包括开发工具、测试工具、性能优化工具等。这些工具都是经过我们精心筛选和测试的,能够帮助开发者们更加高效地进行Android开发工作。 总的来说,这份Android项目资源包是一份不可多得的学习资料,无论你是初学者还是有一定经验的开发者,都能从受益匪浅。我们希望通过这份资源包,为广大Android开发爱好者与从业者提供一个更加便捷、高效的学习平台,共同推动Android开发领域的发展。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值