- 博客(87)
- 收藏
- 关注
原创 字符串编码转换
UTF-8 值为 E6 B1 89。可以通过打印汉字的byte判断是什么编码。UTF-8 值为 E5AD97。GB2312 值为 D7D6。UniCode 值为 5B57。GB2312 值为 BABA。UniCode 值为 6C49。
2024-07-24 16:37:37
145
原创 lineage编译
注:OTA包既可以用代码RecoverySystem.installPackage模式、AB模式。也可以用adb命令模式。编译过程中报错 ninja failed with: exit status 137需要添加虚拟内存。注:系统签名过的所以需要刷recovery,这样ota不会提示签名错误。attr和attrs可以用lsusb命令查看。
2023-11-14 11:15:10
587
原创 TextView 设置了ellipsize后面没有省略号
android:ellipsize="end"android:lines="1"android:maxEms="10"不能有inputType,如果有则要去掉不能有 app:layout_constraintHorizontal_chainStyle="spread_inside"
2021-11-04 16:09:25
1758
原创 事件分发日志
MyRelativeLayout_dispatchTouchEvent_ACTION_DOWNMyRelativeLayout_onInterceptTouchEvent_ACTION_DOWNMyTextView_dispatchTouchEvent_ACTION_DOWNMyTextView_onTouchEvent_ACTION_DOWNMyRelativeLayout_onTouchEvent_ACTION_DOWN修改view的diapatcherTouchEvent的Do...
2021-09-01 16:56:15
111
原创 Mac 开发android配置
第一步安装mac命令行工具xcode-select --install第二部安装Homebrew/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"详细参照Homebrew
2021-08-25 15:58:45
201
原创 RecycleView动态修改分隔符
修改分隔符方法itemDecoration.setTop(22);mRecycleView.invalidateItemDecorations();
2021-06-10 17:18:42
120
原创 两个Android跳转生命周期
OneActivity->TwoActivity打开OneActivity2021-01-09 22:20:52.942 27195-27195/com.fourkgarden.oneactivity I/wangjiasheng: MainActivityonCreate2021-01-09 22:20:52.946 27195-27195/com.fourkgarden.oneactivity I/wangjiasheng: MainActivityonStart2021-01-09
2021-01-09 22:26:54
147
原创 RK系列学习
resource_tool 工具的使用./resource_tool --unpack --image=kernel.img img
2020-12-16 10:08:35
1579
原创 安卓源码下载垃圾清理
安卓源码同步过程中会失败,失败就会产生很多垃圾,占用磁盘root@ubuntu:/var/SMP/.repo/projects/frameworks/base.git/objects/pack# du -ah126M ./pack-7f89b03196ed15cbf31c759c8e19642d760a52b5.idx468M ./tmp_pack_QWmW0e3.6G ./pack-7f89b03196ed15cbf31c759c8e19642d760a52b5.pack6
2020-11-06 17:07:05
629
原创 RK3288修改ROM
git clone https://github.com/TeeFirefly/rk2918_tools.gitcd rk2918_toolsmakecp afptool img_unpack img_maker mkkrnlimg /usr/local/binimg_unpack release_update_new.img imgafptool -unpack update.img updatecd updatecd Imagesimg2img system.img system.
2020-10-19 21:10:18
1110
原创 LibIconv实现转码(会出现内存泄漏)
std::string code_convert(char* source_charset, char* to_charset, const std::string& sourceStr) //sourceStr是源编码字符串{ libiconv_t cd = libiconv_open(to_charset, source_charset);//获取转换句柄,void*类型 if (cd == 0) { libiconv_close(cd); r.
2020-10-19 13:09:40
553
1
原创 VC-Openssl编译
第一步安装 perl第二步安装nmake nasm yasm第三步打开x64 Native Tool Command Prompt for VS 2019 - nameperl Configure VC-WIN64A no-asm --prefix=F:/VisualLib/openssl/lib --openssldir=F:/VisualLib/openssl/VC-win64anmakenmake testnmake install...
2020-10-15 11:33:57
222
原创 Android JsonPP编译
第一步安装MSYS2https://repo.msys2.org/distrib/x86_64/msys2-x86_64-20200903.exe第二步更新MSYS2pacman -Syupacman -Su
2020-09-29 11:26:06
149
原创 CURL网络请求
数据流操作static size_t CurlWriteBuffer(char *buffer, size_t size, size_t nmemb, std::string* stream){ if(!stream){ LOGE("没有数据"); } //第二个参数为每个数据的大小,第三个为数据个数,最后一个为接收变量 size_t sizes = size*nmemb; if(stream == NULL) return
2020-09-28 10:53:44
851
原创 arm Openssl编译
参考https://www.cnblogs.com/areful/p/13371962.htmlexport ANDROID_NDK=/home/wjs/LIB/android-ndk-r21export TOOLCHAIN=/home/wjs/LIB/android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64/binexport SYSROOT=/home/wjs/LIB/android-ndk-r21/toolchains/llvm/prebui
2020-09-25 22:01:32
436
原创 Retrofit+Rxjava+OKhttp源码分析记录
Retrofit.Builder() .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) .addConverterFactory(IConverterFactory.create()) .baseUrl(BuildConfig.BASE_URL) .client(instance) .
2020-09-23 17:46:33
122
原创 MySql8 ubuntu安装
安装mysqlsudo apt-get install mysql-server 配置mysqlsudo mysql_secure_installation 查看自己的mysql默认密码cat /etc/mysql/debian.cnfuser = debian-sys-maintpassword = AWrFRaDLDcJr6iCp登录mysql -udebian-sys-maint -pAWrFRaDLDcJr6iCpuse mysql;upda..
2020-08-14 14:15:12
312
原创 EXOPlaye播放器播放直播Demo
第一步配置gadle implementation 'com.google.android.exoplayer:exoplayer-core:2.11.7' implementation 'com.google.android.exoplayer:exoplayer-dash:2.11.7' implementation 'com.google.android.exoplayer:exoplayer-ui:2.11.7' implementation 'com.googl
2020-08-01 10:31:20
2425
原创 ExoPlayer播放器简单使用
使用ExoPlayer首先要创建一个playerr实例SimpleExoPlayer exoPlayer=new SimpleExoPlayer.Builder(getApplicationContext()).build();有了播放器实例我们要在哪里播放exoPlayer.setVideoSurface(surfaceView.getHolder().getSurface());还需要一个播放源DefaultDataSourceFactory factory=new Defau
2020-08-01 10:16:51
2977
原创 api29默认设置
//AsyncQueryHandlerapply plugin: 'com.android.application'android { compileSdkVersion 29 buildToolsVersion '29.0.2' compileOptions.encoding = "GBK" defaultConfig { applicationId "com.example.myapplication" minSdkVers.
2020-07-27 07:57:48
382
1
原创 电视按键事件的处理(4)
前三章讲了KeyEvent事件在默认情况下的执行顺序、改变View层和ViewGroup分发逻辑对KeyEvent事件分发的影响,本章讲得是改变Activity对KeyEvent事件的影响先修改activity的dispatchTouchEvent的返回值为true @Override public boolean dispatchKeyEvent(KeyEvent event) { switch (event.getAction()){ ca
2020-07-24 14:55:23
206
原创 电视按键事件的处理(3)
上一个章节主要看的是View层对KeyEvent事件传递的影响,本章主要研究ViewGroup层对KeyEvent事件传递的影响 public boolean dispatchKeyEvent(KeyEvent event) { switch (event.getAction()){ case KeyEvent.ACTION_DOWN: Log.i("wangjiasheng_"+this.getClass().getSim
2020-07-24 14:17:19
160
原创 电视按键事件的处理(1)
首先大致看看安卓按键事件的默认分发机制package com.example.keytest;import androidx.appcompat.app.AppCompatActivity;import android.os.Bundle;import android.util.Log;import android.view.KeyEvent;import android.view.View;import android.view.ViewGroup;public class Ma
2020-07-24 13:20:53
243
原创 电视按键事件的处理(2)
接着上一章讲,此时修改MyView的dispatchKeyEvent的KeyDown事件的返回值 @Override public boolean dispatchKeyEvent(KeyEvent event) { switch (event.getAction()){ case KeyEvent.ACTION_DOWN: Log.i("wangjiasheng_"+this.getClass().getSimpl
2020-07-24 13:20:14
119
原创 RXJava之创建操作符
创建操作符 create just fromArray fromIterable Interval range repeat
2020-07-04 18:05:53
145
原创 RxJava导航
Rxjava按照网络上讲有九种操作符创建操作粗 变换操作符 过滤操作符 辅助操作符 组合操作符 错误操作符 布尔操作粗 条件操作符 转换操作符
2020-07-04 18:04:09
118
原创 newwifi mini路由器固件openwrt
先上主角openwrt-ramips-mt7620-lenovo_newifi-y1-initramfs-kernel.bin 提取码:i2wqopenwrt-ramips-mt7620-lenovo_newifi-y1-squashfs-sysupgrade.bin 提取码:2x6h
2020-06-08 09:52:10
4853
原创 recyclerview添加分割线
val itemDecoration = DividerItemDecoration(this, DividerItemDecoration.VERTICAL)itemDecoration.setDrawable(resources.getDrawable(R.drawable.recycledivider))recyclerView.addItemDecoration(itemDecora...
2019-11-13 17:33:18
129
原创 Android bug汇总
1.Edittext努比亚手机gravity="center"不能居中显示问题 <EditText android:id="@+id/goodsNumber" android:layout_width="@dimen/dp_45" android:layout_height="@dimen/dp_20" android:backgrou...
2019-10-28 10:14:34
224
原创 android 修改包的信息
buildTypes { debug { applicationIdSuffix ".dev" resValue "string", "app_name", "365壹企购-测试版" minifyEnabled false signingConfig signingConfigs.debug } releas...
2019-09-30 16:05:44
137
原创 zbar和zxing双核二维码识别
1更新gcc编译器yum install gcc gcc-c++ glibc-staticyum install -y gcc texinfo-tex flex zip libgcc.i686 glibc-devel.i686http://ftp.gnu.org/gnu/gccwget https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0....
2019-09-04 15:12:28
521
2
原创 GCC编译
yum install gcc gcc-c++ glibc-staticyum install -y gcc texinfo-tex flex zip libgcc.i686 glibc-devel.i686http://ftp.gnu.org/gnu/gccwget https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gztar -...
2019-08-15 17:05:26
188
原创 CURL编译
安卓NDK android-ndk-r14b(高版本不能通过)zlib-1.2.11.tar.gzcurl-7.65.3.tar.gzopenssl-1.1.1a.tar.gzzlib编译export NDK_HOME=/usr/NDK/android-ndk-r14bexport BASE=$NDK_HOME/toolchains/arm-linux-androide...
2019-08-13 11:40:39
596
原创 CCache安装
第一步去https://www.samba.org//ftp/ccache/下载最新ccachewgethttps://www.samba.org//ftp/ccache/ccache-3.6.tar.xztar -xvf ccache-3.6.tar.xz cd ccache-3.6./configure -prefix=/var/ccachemake -j8make inst...
2019-08-12 10:16:43
3153
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人