
Android
文章平均质量分 61
anymyna
这个作者很懒,什么都没留下…
展开
-
Android 插件化框架replugin-plugin-library 源码解析
1、 replugin-plugin-library 初始化replugin-host-librarycom.qihoo360.loader2.Plugin.java doLoad 初始化插件里的Entry对象 private final boolean doLoad(String tag, Context context, ClassLoader parent, PluginCommIm...原创 2019-09-18 20:27:19 · 357 阅读 · 1 评论 -
Android Retrofit2.4.0 使用教程
demo:https://github.com/anymyna/android-example-antRetrofit是一个网络加载框架,网络请求的是OkHttp完成,Retrofit 负责网络请求接口的封装。使用注解,简化代码量。步骤:1、添加依赖dependencies { implementation 'com.squareup.retrofit2:retrofit:2.4.0' implementation 'com.squareup.retrofit2:converte原创 2020-12-26 23:06:11 · 584 阅读 · 0 评论 -
Android room使用教程
demo:https://github.com/anymyna/android-example-ant步骤:1、 初始化dependencies { def room_version = "2.2.5" implementation "androidx.room:room-runtime:$room_version" annotationProcessor "androidx.room:room-compiler:$room_version"}2、 用法2.1 a原创 2020-12-13 21:52:55 · 1252 阅读 · 2 评论 -
Android MMKV使用教程
demo:https://github.com/anymyna/android_laboratory步骤:1、 初始化dependencies { implementation 'com.jakewharton.rxbinding2:rxbinding:2.0.0' implementation 'com.jakewharton.rxbinding2:rxbinding-recyclerview-v7:2.2.0'}2、 用法点击监听 RxView.cli原创 2020-12-06 19:37:12 · 1551 阅读 · 0 评论 -
DSBridge-Android 浅析
github:https://github.com/wendux/DSBridge-Android1、Android、IOS、Javascript 三端易用,轻量且强大、安全且健壮。2、同时支持同步调用和异步调用3、支持以类的方式集中统一管理API4、支持API命名空间5、支持调试模式6、支持API存在性检测7、支持进度回调:一次调用,多次返回8、支持Javascript关闭页面事件回调9、支持Javascript 模态/非模态对话框10、支持腾讯X5内核主要功能1、 Javascr原创 2020-08-31 22:27:28 · 2245 阅读 · 0 评论 -
Android 插件化框架replugin-plugin-gradle源码解析
1、插件入口 ReClassPluging.groovypublic class ReClassPlugin implements Plugin<Project> { @Override public void apply(Project project) { ...... def restartHostAppTask = null...原创 2019-09-18 21:03:39 · 278 阅读 · 0 评论 -
Android 插件化框架replugin replugin-host-gradle源码解析
replugin-host-gradle,针对宿主应用执行的构建任务:生成带 RePlugin 插件坑位的 AndroidManifest.xml(允许自定义数量);生成 RepluginHostConfig 类,方便插件框架读取并自定义其属性;生成 plugins-builtin.json,json中含有插件应用的信息,包名,插件名,插件路径等。主要功能1、生成有坑位的组件的AndroidMa...原创 2019-09-08 17:07:21 · 466 阅读 · 0 评论 -
Android 插件化框架replugin replugin-host-library 源码解析
宿主和插件的交互Replugin默认会使用一个常驻进程作为Server端,其他插件进程和宿主进程属于Client端。如果修改不使用常驻进程,宿主的主进程将作为插件管理进程,Server端其实就是创建了一个运行在该进程中的Provider,通过Provider的query方法返回了Binder对象来实现多进程直接的沟通和数据共享,或者说是插件之间和宿主之间沟通和数据共享,插件的安装,卸载,更新,状...原创 2019-09-08 00:08:44 · 601 阅读 · 1 评论 -
Android 插件化框架replugin使用教程之本地加载replugin-host-gradle
https://github.com/Qihoo360/RePlugin1、replugin host gradle插件生成 replugin-host-gradle-2.3.3.jar replugin-host-gradle 项目中终端运行 gradlew jarreplugin-host-gradle\build\libs 目录下生成replugin-host-gradle-2.3....原创 2019-09-01 20:09:07 · 1016 阅读 · 0 评论 -
Tinker patch so 更新
patch so 生成1、BsDiffDecoder.java 对so进行patch@Overridepublic boolean patch(File oldFile, File newFile) throws IOException, TinkerPatchException { //first of all, we should check input files ...原创 2019-07-21 21:55:13 · 255 阅读 · 0 评论 -
Tinker patch dex 生成
1、soDecoder.patch(oldFile, file.toFile()); UniqueDexDiffDecoderdexPatchDecoder = new UniqueDexDiffDecoder(config, prePath + TypedValue.DEX_META_FILE, TypedValue.DEX_LOG_FILE);soPatchDecoder = ne...原创 2019-07-14 17:46:39 · 306 阅读 · 0 评论 -
Tinker patch res更新
patch res 生成1、ResDiffDecoder.java patch 新资源处理, Md5 生成,AndroidManifest.xml文件忽略@Overridepublic boolean patch(File oldFile, File newFile) throws IOException, TinkerPatchException { String name ...原创 2019-07-27 22:55:59 · 418 阅读 · 0 评论 -
Tinker gradle plugin tinkerPatchRelease
分析命令行里面调用tinkerPatchRelease过程1、 tinker-sample-android 中build.gradleif (buildWithTinker()) { apply plugin: 'com.tencent.tinker.patch'2、tinker-patch-gradle-plugin 中 TinkerPatchPlugin.groovy...原创 2019-07-13 17:18:28 · 605 阅读 · 0 评论 -
Android 使用 RoundedBitmapDrawable 实现圆角
RoundedBitmapDrawable是系统提供的类,用来实现圆角package androidx.core.graphics.drawable;/** * A Drawable that wraps a bitmap and can be drawn with rounded corners. You can create a * RoundedBitmapDrawable from a file path, an input stream, or from a * {@link andro原创 2020-07-17 23:40:23 · 914 阅读 · 1 评论 -
android单元测试Mockito框架的使用
Mockito通过Mock对象,替换原先依赖的真实对象,就可以避免外部的影响,只测试本类,得到更准确的结果。1、验证方法调用。 @Test public void testLogin() { UserManager mockUserManager = Mockito.mock(UserManager.class); LoginPresenter loginPresenter = new LoginPresenter(); loginPrese原创 2020-06-21 00:37:27 · 502 阅读 · 0 评论 -
Robot Framework Appium案例
目录1、验证Android的版本信息2、Camera测试3、WiFi测试4、遇到问题1、验证Android的版本信息示例代码*** Settings ***Suite Setup Open Settings AppLibrary AppiumLibrary*** Variables ***${EXPECTED_ANDROID_VERSION} ...原创 2020-04-25 20:34:54 · 576 阅读 · 0 评论 -
Windows appium robotframework 环境搭建步骤
一、RF环境搭建1、python 安装 下载地址 https://www.python.org/downloads/release/ 设置Python环境变量 cmd python 确认是否安装成功2、wxPython安装 pip install wxPytho...原创 2020-04-22 23:59:04 · 281 阅读 · 0 评论 -
android testing-samples 2 espresso
https://github.com/android/testing-samplesEspresso 官方文档Espresso是Google 开源的Android自动化测试框架,使用 Espresso,书写简洁、优雅、可信赖的 Android UI 测试。BasicSample 效果: ChangeTextBehaviorTest** * Basic tests show...原创 2020-04-19 20:51:42 · 281 阅读 · 0 评论 -
android testing-samples 1 AndroidJunitRunnerSample
https://github.com/android/testing-samplesJUnit 单元测试和AndroidJUnitRunner ui测试activity效果:JUnit4 单元测试** * JUnit4 unit tests for the calculator logic. */@RunWith(AndroidJUnit4.class)@SmallTestpu...原创 2020-04-18 23:43:45 · 258 阅读 · 0 评论 -
Ubuntu 18.04 编译 ijkPlayer
编译步骤:1、 搭建 linux 环境和编译工具准备编译环境 Ubuntu 18.04,不是虚拟机环境sudo apt-get updatesudo apt-get install gitsudo apt-get install makesudo apt-get install yasm2、 搭建 JDK(linux) + Android SDK(linux + NDK(l...原创 2020-03-12 08:21:51 · 323 阅读 · 0 评论 -
Android 热更新Robust 浅析
Robust是新一代热更新系统,无差别兼容Android2.3-8.0版本;无需重启补丁实时生效,快速修复线上问题,补丁修补成功率高达99.9%,优势如下:支持Android2.3-9.x版本高兼容性、高稳定性,修复成功率高达99.9%补丁实时生效,不需要重新启动支持方法级别的修复,包括静态方法支持增加方法和类支持ProGuard的混淆、内联、优化等操作需要保存打包时生成的mappi...原创 2019-12-02 22:21:12 · 1893 阅读 · 0 评论 -
Android RxBinding使用教程
demo:https://github.com/anymyna/android_laboratory步骤:1、 初始化dependencies { implementation 'com.jakewharton.rxbinding2:rxbinding:2.0.0' implementation 'com.jakewharton.rxbinding2:rxbinding-...原创 2019-11-10 16:45:41 · 476 阅读 · 0 评论 -
Android subsampling-scale-image-view 使用教程
https://github.com/davemorrissey/subsampling-scale-image-view原理:将大图分成多个小图(tile),先加载低清晰度的整体图,放大时加载可见区域高清晰度的小图。步骤:1、 添加依赖dependencies { implementation 'com.davemorrissey.labs:subsampling-scale-i...原创 2019-11-02 21:50:42 · 2298 阅读 · 0 评论 -
Android RxPermissions 使用教程
github:https://github.com/tbruyelle/RxPermissionsdemo:https://github.com/anymyna/android_laboratory步骤:1、 初始化dependencies { implementation 'io.reactivex.rxjava2:rxandroid:2.0.1' implemen...原创 2019-10-23 00:13:21 · 873 阅读 · 0 评论 -
Android ijkplayer-example 介绍
github:ijkplayer-example1、设置Player、RenderViewtv.danmaku.ijk.media.example.activities.SettingsActivitytv.danmaku.ijk.media.example.application.Settingspublic class Settings { private Context mA...原创 2019-10-21 00:31:54 · 942 阅读 · 0 评论 -
Android Studio 常用功能汇总
查找该类的所有成员方法函数与成员变量的快捷键Ctrl + F12拆分编辑器窗口当前的编辑器窗口进行了垂直的拆分的编辑窗口Android studio-”window“-“editor tabs”-“split vertically”当前的编辑器窗口进行水平的拆分的编辑窗口Android studio-”window“-“editor tabs”-“split Horizon...原创 2018-03-18 00:24:29 · 751 阅读 · 0 评论 -
理解android-architecture mvp
https://github.com/googlesamples/android-architecturetodo_mvpA contract class which defines the connection between the view and the presenter.An Activity which creates fragments and presenters.A ...原创 2019-09-20 23:08:52 · 186 阅读 · 0 评论 -
理解android-architecture mvvm
todo-mvvm-databindingThe ViewModel in the MVVM architecture plays a similar role to the Presenter in the MVP architecture. The two architectures differ in the way that the View communicates with the...原创 2019-09-21 20:19:00 · 379 阅读 · 0 评论 -
Android Flutter App 演示
github:https://github.com/anymyna/flutter-examples1、为一个创业公司生成建议的公司名称效果:参考:编写你的第一个 Flutter App原创 2019-09-22 22:12:45 · 230 阅读 · 0 评论 -
Android 质量优化工具 Booster实践
一、Booster概览Booster https://github.com/didi/booster主要由 Transformer 和 Task 组成,Transformer 主要用于对字节码进行扫描或修改(取决于 Transformer 的功能),Task 主要用于构建过程中的资源处理,为了满足特异的优化需求,Booster 提供了 Transformer SPI and VariantPro...原创 2019-09-28 11:13:14 · 2328 阅读 · 0 评论 -
Android 资源混淆AndResGuard使用教程
https://github.com/shwenzhang/AndResGuard效果:反编译资源文件效果对比:resource_mapping:步骤:1、 项目根目录下build.gradle中,添加插件的依赖 classpath 'com.tencent.mm:AndResGuard-gradle-plugin:1.2.17'2、app模块中build.gr...原创 2019-09-29 21:56:56 · 1695 阅读 · 0 评论 -
android studio 常用插件
eventbus3-intellij-pluginhttps://github.com/kgmyshin/eventbus3-intellij-pluginPlugin to navigate between events posted by EventBus.butterknifezeleznyhttps://github.com/avast/android-butterknife-ze...原创 2019-10-02 15:33:02 · 153 阅读 · 0 评论 -
android TabLayout 简单使用
demo: https://github.com/anymyna/ui效果:步骤:1、TabLayout是安卓6.0之后出现的,导入design库。implementation 'com.android.support:design:28.0.0'2、布局中加入TabLayout控件<android.support.design.widget.TabLayout an...原创 2019-08-03 19:45:50 · 542 阅读 · 2 评论 -
Android MVP代码生成插件MVPHelper使用教程
MVPHelper Github 地址https://github.com/githubwing/MVPHelperDemo Github 地址https://github.com/anymyna/ui使用步骤:1、安装MVPHelper插件MVPHelper是一款适用于 Intellij IDEA 和 Android Studio 的插件, 可用于为 MVP 架构生成接口以及实现类。...原创 2019-09-18 23:51:52 · 1877 阅读 · 0 评论 -
Android查看应用的进程和线程
1.查看应用的进程信息ps -ef|grep com.example.replugin.hostps -e 显示现行终端机下的所有程序,包括其他用户的程序ps f 用ASCII字符显示树状结构,表达程序间的相互关系2.查看进程号为的进程创建的所有线程。ps -T -p ps -T -p 4836PID 是process进程id, TID(thead id)可以理解为线程的Id。CM...原创 2019-09-08 11:26:03 · 8581 阅读 · 0 评论 -
android TabLayout 和 RecyclerView 联动
github:https://github.com/anymyna/ui效果:思路:1、 导航是TabLayout,展示内容是 RecyclerView。2、 RecyclerView滑动监听,切换TabLayout。当向下滑动RecyclerView时,tab随 着变化。3、TabLayout tab选择监听,滑动RecyclerView,当选择TabLayout时,Recycle...原创 2019-08-07 00:57:57 · 2929 阅读 · 0 评论 -
RecyclerView进阶RecyclerView实现双列表联动
最近项目中需要实现一个分类页面UI图实现要求左侧联动右侧: 点击左侧列表的某一项,背景变色,同时右侧列表中对应的分类滚动到顶部 右侧列表悬停: 右侧列表滑动的时候相应的标题栏需要在顶部悬停 标题栏可点击 右侧联动左侧: 滚动右侧列表,监听滚动的位置,左侧列表需要同步选中相应的列表对照着上面的UI要求,基本上实现了所有的需求,下面分享一下实现的思路左侧联动右侧...转载 2019-08-08 22:53:07 · 1130 阅读 · 0 评论 -
android 自定义气泡布局
Android 实现气泡布局https://github.com/wangyiwy/BubbleLayout用法1、复制BubbleLayout到项目中,2、将以下熟悉复制到res/values/attrs中, ...原创 2019-08-17 10:13:00 · 1034 阅读 · 0 评论 -
SmallestWidth适配方案
smallestWidth适配,或者叫sw限定符适配。指的是Android会识别屏幕可用高度和宽度的最小尺寸的dp值(其实就是手机的宽度值),然后根据识别到的结果去资源文件中寻找对应限定符的文件夹下的资源文件。这种机制和上文提到的宽高限定符适配原理上是一样的,都是系统通过特定的规则来选择对应的文件。举个例子,小米5的dpi是480,横向像素是1080px,根据px=dp(dpi/160...转载 2019-07-28 21:40:29 · 1566 阅读 · 0 评论 -
第三方TabLayout开源库 FlycoTabLayout
FlycoTabLayoutgithub:https://github.com/H07000223/FlycoTabLayoutSlidingTabActivity /** 默认 */ SlidingTabLayout tabLayout_1 = ViewFindUtils.find(decorView, R.id.tl_1); /**自定义部分属性*/ Sl...原创 2019-07-28 19:21:06 · 3614 阅读 · 0 评论