
android
xcode_androidstudio
这个作者很懒,什么都没留下…
展开
-
时间校准网
淘宝:http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp苏宁:http://quan.suning.com/getSysTime.do时间校准网:http://time.tianqi.com/(取NSHttpResponse中head对应Date字段值)以上支持https原创 2022-10-06 14:53:47 · 1449 阅读 · 0 评论 -
android 开机动画制作
android 开机动画制作原创 2022-08-15 20:20:23 · 1449 阅读 · 0 评论 -
【Android Room数据库升级自动生成SQL语句】
Android Room数据库升级自动生成SQL语句转载 2022-08-02 17:52:27 · 701 阅读 · 0 评论 -
华为二维码扫描
https://blog.youkuaiyun.com/weixin_43500820/article/details/106693133?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-0-106693133-blog-108639072.pc_relevant_multi_platform_whitelistv2_exp3w&spm=1001.2101.3001.4242.1&ut原创 2022-07-26 21:12:35 · 307 阅读 · 0 评论 -
byte 高4位 低4位
byte 高4位 低4位原创 2022-07-02 14:59:37 · 550 阅读 · 0 评论 -
Android 使用vlc播放视频
Android 使用vlc播放视频 - 简书 (jianshu.com)转载 2022-05-09 09:14:55 · 967 阅读 · 0 评论 -
Android跳转系统界面_大全集
1、跳转Setting应用列表(所有应用)Intent intent = new Intent(Settings.ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS);this.startActivity(intent);2、跳转Setting应用列表(安装应用)Intent intent = new Intent(Settings.ACTION_MANAGE_APPLICATIONS_SETTINGS);3、跳转Setting应用列表Inte..原创 2022-05-09 09:14:05 · 958 阅读 · 0 评论 -
onCreate onStart onResumt 获取控件宽高为0
建议在以下方法获取var height:Int = 0override fun onWindowFocusChanged(hasFocus: Boolean) { super.onWindowFocusChanged(hasFocus) if(hasFocus){ height = rootView.height }}原创 2022-04-21 09:59:24 · 101 阅读 · 0 评论 -
RecyclerView EditText 键盘遮挡
android:transcriptMode="normal"android:windowSoftInputMode="stateHidden|adjustPan"原创 2022-04-20 16:42:09 · 2265 阅读 · 0 评论 -
AppUpdate
正在上传…重新上传取消https://github.com/azhon/AppUpdate原创 2022-04-21 09:56:40 · 331 阅读 · 0 评论 -
android生成唯一标识,恢复出厂也不会变
public static String getUUID() { String serial = null; String m_szDevIDShort = "11" + Build.BOARD.length() % 10 + Build.BRAND.length() % 10 + Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 + Build.DISP.原创 2022-04-20 09:49:16 · 2515 阅读 · 0 评论 -
android全屏显示
fun Activity.fullScreen() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { val controller = window.insetsController controller?.hide(WindowInsets.Type.statusBars()) } else { window.setFlags(WindowManager.LayoutPa.原创 2022-03-29 11:03:20 · 2350 阅读 · 0 评论 -
用adb 安装 apk
找不到 adb 就 cmd cd F:\C000B\AN\android-sdk\platform-tools或者 到android-sdk\platform-tools 下拷贝文件到 cmd 默认路径下没有usb 就用手机wifi ip地址链接adb connect 192.168.2.67:5555(部分手机和其他机器需要修改端口 需要问厂商要)//usb 直接安装adb devices 查看当前链接的设备 有多个就要断开没用的adb disconnect 192..原创 2022-03-25 18:21:48 · 300 阅读 · 0 评论 -
app:kaptDebugKotlin no error message
Execution failed for task ':app:kaptDebugKotlin'.> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution > java.lang.reflect.InvocationTargetException (no error message)解决方式:Run your application with ./gradl...原创 2022-03-11 22:18:43 · 4019 阅读 · 0 评论 -
RecyclerView GridLayoutManager 从右下角开始显示
val layout = GridLayoutManager(this,5)layout.setReverseLayout(true);//列表翻转\\\\Collections.reverse(list) //To sort the list by descending order<androidx.recyclerview.widget.RecyclerView android:layoutDirection="rtl" android:id="@+id..原创 2022-03-10 20:01:11 · 3159 阅读 · 0 评论 -
android 视频播放
GSYVideoPlayer https://github.com/search?q=GSYVideoPlayer饺子播放器https://github.com/lipangit/JiaoZiVideoPlayer原创 2021-10-25 15:47:05 · 2105 阅读 · 0 评论 -
android第三方库
coil ,glide 图片浏览Aria文件下载框架原创 2021-10-22 10:49:02 · 572 阅读 · 0 评论 -
依赖 libs 目录下所有的 jar 和 aar 包
//依赖libs目录下所有的jar和aar包implementationfileTree(include:['*.jar'],dir:'libs')implementationfileTree(include:['*.aar'],dir:'libs')原创 2021-10-16 09:58:33 · 624 阅读 · 0 评论 -
Room android
//kotlin DSL 不加这句话 会报警告ANTLR Tool version 4.5.3 used for code generation does not match the current runtime version 4.7.2 configurations.all { resolutionStrategy { force("org.antlr:antlr4-runtime:4.7.2") force("org.a.原创 2021-08-16 11:20:53 · 169 阅读 · 0 评论 -
AndroidQ 路径
val root = getExternalFilesDir(null)val root2 = getExternalFilesDir(Environment.DIRECTORY_PICTURES)val root3 = getExternalFilesDir(Environment.DIRECTORY_MOVIES)Log.e("gggggg", "\n\n\n")Log.e("gggggg", root?.path ?: "")Log.e("gggggg", root2?.path ?:.原创 2021-08-13 11:01:32 · 138 阅读 · 0 评论 -
监听应用程序的生命周期-ProcessLifecycleOwner
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'class AppLifeCyle:LifecycleObserver { //只会调用一次 @OnLifecycleEvent(Lifecycle.Event.ON_CREATE) fun onCreate (){} @OnLifecycleEvent(Lifecycle.Event.ON_START) fun .原创 2021-07-16 15:02:56 · 659 阅读 · 0 评论 -
自定义UI等实现Lifecycle生命周期
class MyView : LifecycleObserver { @OnLifecycleEvent(Lifecycle.Event.ON_START) fun start (){} @OnLifecycleEvent(Lifecycle.Event.ON_RESUME) fun resume (){} @OnLifecycleEvent(Lifecycle.Event.ON_STOP) fun stop (){}}o.原创 2021-07-16 14:25:18 · 461 阅读 · 0 评论 -
androidstudio历史版本
https://www.androiddevtools.cn原创 2021-05-29 16:06:45 · 200 阅读 · 0 评论 -
androidstudio修改项目名称
1先关掉项目 修改根目录文件夹名称处2打开项目重新new import 加载进来3修改setting.gradle rootProject.name = "你要修改的名称"原创 2020-11-12 09:42:24 · 344 阅读 · 0 评论 -
Room
@Daopublic interface UserDao { @Query("SELECT * FROM user") List<User> getAll(); @Query("SELECT * FROM user WHERE uid IN (:userIds)") List<User> loadAllByIds(int[] userIds); @Query("SELECT * FROM user WHERE first_name LIK...原创 2020-09-18 15:42:56 · 112 阅读 · 0 评论 -
adb server version (41) doesn‘t match this client (36)
where adb看当前adb 路径E:\DeLianFa_2020_All\ZhongKongTen>where adbC:\Windows\System32\adb.exeC:\Windows\adb.exe从你的sdkE:\android_sdk\platform-tools拷贝adb.exe 替换 上面的路径原创 2020-09-15 14:21:10 · 602 阅读 · 0 评论 -
JNI调用Java方法总结
https://blog.youkuaiyun.com/yus201120/article/details/91060274?locationNum=4&fps=1转载 2020-09-11 15:44:45 · 146 阅读 · 0 评论 -
android正常权限和危险权限
谷歌官方将权限分为了两类,一个是正常权限(Normal Permissions),这类权限不涉及用户隐私,是不需要用户进行授权的,比如访问网络,手机震动等。还有一类是危险权限(Dangerous Permissions),一般是涉及到用户隐私的,需要用户进行授权,比如操作SD卡的写入,相机,录音等。对权限的整理:正常权限(Normal Permissions):ACCESS_LOCATION_EXTRA_COMMANDSACCESS_NETWORK_STATEACCESS_NOTIFICAT原创 2020-08-28 14:10:05 · 1840 阅读 · 0 评论 -
retrofit2 @body提交String类型报错
在使用retrofit2时,由于需要发送给后台string类型的数据,因此我Body注解中使用了String类型的变量,但是发送的数据并不是json={"aa":"bb"}而是"json={\"aa\":\"bb\"}"解决方法将String替换成RequestBody即可解决public interface SampleApi { @POST("sample-endpoint") Call<ApiResponse> postThing(...转载 2020-08-27 11:24:39 · 617 阅读 · 0 评论 -
探讨ACRA
Android项目实践系列(一) - 探讨ACRA前言 ACRA 是 Application Crash Report for Android 的缩写,看其单词知其意安卓应用程序崩溃报告。 作为安卓应用程序开发者,相信你一定很关注自己的软件在用户实际应用过程中的用户体验、系统稳定性等信息,特别是当系统出现崩溃或者运行不正常的情况下,第一手的崩溃异常信息对提升软件的整体竞争力是相当重要的。而...转载 2018-11-09 10:27:32 · 635 阅读 · 0 评论 -
Android内存泄漏
什么是内存泄漏?简单点说,就是指一个对象不再使用,本应该被回收,但由于某些原因导致对象无法回收,仍然占用着内存,这就是内存泄漏。为什么会产生内存泄漏,内存泄漏会导致什么问题?相比C++需要手动去管理对象的创建和回收,Java有着自己的一套垃圾回收机制,它能够自动回收内存,但是它往往会因为某些原因而变得“不靠谱”。在Android开发中,一些不好的编码习惯就很可能会导致内存泄漏,而这些内存泄漏会导致...转载 2018-03-21 16:58:14 · 160 阅读 · 0 评论