- 博客(13)
- 收藏
- 关注
原创 Android Lifecyle
Lifecycle笔记主要记录一下自己看源码的过程既然我们要感知Activity的生命周期,首先我们需要一个观察者:interface IObserer{ //可以把你需要的生命周期单独拿出来 @OnLifecycleEvent(Lifecycle.Event.ON_CREATE) fun onCreate(owner:LifecycleOwner) ...
2018-07-13 13:58:25 292
原创 Base64学习
Base64学习 (图片来自 https://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000/001431954588961d6b6f51000ca4279a3415ce14ed9d709000)b1、b2、b3代表普通的字符串,如”a”,”b”,”c” n1、n2、n3、n4代表...
2018-03-02 16:10:21 346
原创 Toolbar修改右边的三个点
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> ... ... <item name="actionOverflowButtonStyle">@style/ToolbarOverflow</item></style> <style name="ToolbarOverflow" parent
2017-06-23 14:42:53 4226 2
原创 AndroidStudio 配置Kotlin
1、下载插件2、在项目的Gralde中配置:buildscript { ext.kotlin_version = '1.1.2-5' ext.kotlin_version = '1.1.2-4' repositories { jcenter() } dependencies { classpath 'com.android.to
2017-06-15 16:03:28 665
原创 Kotlin Coroutine 协程Gradle配置
Kotlin Coroutine 协程Gradle配置工程的Gradle中: dependencies { classpath 'com.android.tools.build:gradle:2.2.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" //
2017-06-15 15:56:20 2396
原创 Android消息机制浅析
private Handler handler=new Handler(){ public void handleMessage(Message msg){ //... }}new Thread(new Runnable(){ public void run(){ //... //... //...
2016-07-20 13:18:21 482
原创 View的事件分发机制
View事件的分发规则public boolean dispatchTouchEvent(MotionEvent ev)public boolean onInterceptTouchEvent(MotionEvent ev)public boolean onTouchEvent(MotionEvent event)注意:只有ViewGroup有onInterceptTouchEvent事件V
2016-07-18 17:55:46 337
原创 反编译
准备工具: apktool目录下:目录介绍:apktool:用来反编译出资源文件 dex2jar:将apk反编译成java源码 jd-gui.exe:用来打开java源码操作: 1、获取资源文件 将apk文件放到apktool目录下 运行cmd,定位到apktool.bat所在目录,然后执行 apktool.bat d -f weixin.apk -o weixin 会在目录下生
2016-04-25 12:04:59 316
原创 PopupWindow
PopupWindow构造函数:PopupWindow(View contentView, int width, int height);PopupWindow(View contentView, int width, int height, boolean focusable);PopupWindow(int width, int height)focusable=false的话,多次new会
2016-04-22 16:33:55 246
原创 ViewPager自定义滑动条
1、准备好Fragment及其布局 2、准备FragmentPagerAdapter,里面传一个FragmentManager和ArrayList<Fragment> 3、在java代码中动态添加滑动条 img = new ImageView(this); lp = new LinearLayout.LayoutParams(0, 0); img.setBackground
2016-04-22 09:37:56 380
原创 Android中XML文件的读写
写入:XmlSerializer serializer=Xml.newSerializer();//out:需要一个输出流serializer.setOutput(out,"UTF-8");//This method can only be called just after setOutput//若值是 ”true” 表示没有呼叫外部规则文件,若值是 ”false” 则表示有呼叫外部规则文件。
2016-04-21 10:06:18 1205
原创 在右键菜单中添加应用程序
cmd regedit路径:” HKEY_CLASSES_ROOT*\shell “1、shell文件夹右键 新建项,命名为要添加的应用程序名,比如UltraEdit。2、UltraEdit右键 新建项 command,将command右边的默认数据改为:应用程序路径+空格+%1 3、UltraEdit右键,新建字符串值,名字为icon,值设为应用程序路径 4、注销一下就OK了
2016-04-08 10:54:01 695
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人