<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[活鱼逆流而上的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/mwp123555</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; mwp123555]]></copyright><item><title><![CDATA[ReactNative中js与原生如何交互]]></title><link>https://blog.youkuaiyun.com/mwp123555/article/details/72902403</link><guid>https://blog.youkuaiyun.com/mwp123555/article/details/72902403</guid><author>mwp123555</author><pubDate>Wed, 07 Jun 2017 17:46:16 +0800</pubDate><description><![CDATA[第一部分，在ReactNative中，原生与js交互常用的是原生通过向js发送事件，参考webview源代码。
1、定义事件与发送消息方法
public class ReactExpandListViewEvent extends Event {

    public static final String EVENT_NAME = "topExpandListViewClick";]]></description><category></category></item><item><title><![CDATA[ReactNative（嵌入到android）调用android原生组件与原生模块（比如某个方法）]]></title><link>https://blog.youkuaiyun.com/mwp123555/article/details/72867466</link><guid>https://blog.youkuaiyun.com/mwp123555/article/details/72867466</guid><author>mwp123555</author><pubDate>Mon, 05 Jun 2017 15:04:10 +0800</pubDate><description><![CDATA[官网的例子以ReactNative项目来说明，没有关于ReactNative嵌入到android是如何调用android原生组件的例子，没办法只能参考ReactNative源代码来自己调用。本文以调用android组件ExpandableListView为例。
1、创建调用原生组件模块ReactExpandableListViewManager。


package com.example]]></description><category></category></item><item><title><![CDATA[静默安装、正常安装与打开等PackageManager运用]]></title><link>https://blog.youkuaiyun.com/mwp123555/article/details/70171634</link><guid>https://blog.youkuaiyun.com/mwp123555/article/details/70171634</guid><author>mwp123555</author><pubDate>Fri, 14 Apr 2017 13:59:46 +0800</pubDate><description><![CDATA[1、正常安装

	public static void reqSystemInstall(Context context, String packagePath) {
		if (TextUtils.isEmpty(packagePath))
			return;
					
		File targetFile = new File(packagePath);
		if (!targetFil]]></description><category></category></item><item><title><![CDATA[ExpandableListView、BaseExpandableListAdapter用法]]></title><link>https://blog.youkuaiyun.com/mwp123555/article/details/69944855</link><guid>https://blog.youkuaiyun.com/mwp123555/article/details/69944855</guid><author>mwp123555</author><pubDate>Mon, 10 Apr 2017 11:35:05 +0800</pubDate><description><![CDATA[ExpandableListView是可以展开与收拢的列表，通过下面图片展示，有个初步认识，见下图：
1、折叠的时候：


2、点击“可更新的应用(6)”，进行展开的时候：


3、实现步骤主要分为：
1>构建ExpandableListView布局，如


<LinearLayout xmlns:android="http://schemas.android.com/apk/]]></description><category></category></item><item><title><![CDATA[android完全退出以及RxBinding研读]]></title><link>https://blog.youkuaiyun.com/mwp123555/article/details/65437289</link><guid>https://blog.youkuaiyun.com/mwp123555/article/details/65437289</guid><author>mwp123555</author><pubDate>Thu, 23 Mar 2017 10:02:19 +0800</pubDate><description><![CDATA[RxBinding用来处理安卓UI响应，沿用了RxJava（android）的风格，可以切换线程和变形，让代码可读性提高。上代码：
1、RxActivity
package com.example.test.activity;

import android.widget.Button;
import android.widget.CheckBox;
import android.widget]]></description><category></category></item><item><title><![CDATA[BaseAdapter使用总结]]></title><link>https://blog.youkuaiyun.com/mwp123555/article/details/62233318</link><guid>https://blog.youkuaiyun.com/mwp123555/article/details/62233318</guid><author>mwp123555</author><pubDate>Wed, 15 Mar 2017 18:02:53 +0800</pubDate><description><![CDATA[BaseAdapter用于ListView、Spinner，作为数据适配器，很多地方会使用到它。当我们实现它时，需要实现以下几个方法：
public int getViewTypeCount();//每种数据来源种类的总个数
public int getCount();//总个数
public int getItemViewType(int position);//当前选定的这项所对应的数据来源]]></description><category></category></item><item><title><![CDATA[WebView使用总结]]></title><link>https://blog.youkuaiyun.com/mwp123555/article/details/61199940</link><guid>https://blog.youkuaiyun.com/mwp123555/article/details/61199940</guid><author>mwp123555</author><pubDate>Fri, 10 Mar 2017 16:41:20 +0800</pubDate><description><![CDATA[目前开发android、ios客户端，为了保持可移植性（苹果、chrome、android浏览器都是用的webkit引擎），一般会采用原生与h5交互（新的方法Native React、Weex等已经流行）。WebView作为android重要组件，非常有必要了解下。那么，我们写个较为完整的例子。
1、布局文件webview.xml

<LinearLayout xmlns:android="h]]></description><category></category></item><item><title><![CDATA[Activity生命周期与启动方式]]></title><link>https://blog.youkuaiyun.com/mwp123555/article/details/59107941</link><guid>https://blog.youkuaiyun.com/mwp123555/article/details/59107941</guid><author>mwp123555</author><pubDate>Wed, 01 Mar 2017 14:52:35 +0800</pubDate><description><![CDATA[一、生命周期经典图


二、测试代码如下：
1、LifeCycleMainActivity.java

package com.example.test;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android]]></description><category></category></item><item><title><![CDATA[Handler使用方法总结]]></title><link>https://blog.youkuaiyun.com/mwp123555/article/details/58645434</link><guid>https://blog.youkuaiyun.com/mwp123555/article/details/58645434</guid><author>mwp123555</author><pubDate>Tue, 28 Feb 2017 20:35:59 +0800</pubDate><description><![CDATA[在看这篇博客之前，最好看看《Anroid异步消息机制（Handler、Looper、Message、MessageQueue）以及ThreadLocal运用》了解Handler原理。
Handler使用，主要有以下几种方式：
Thread+Handler、Timer+TimerTask+Handler、Handler.postXXX(Runnable r,...)、Handler.sendXX]]></description><category></category></item><item><title><![CDATA[在Android中，非主线程不能更新UI]]></title><link>https://blog.youkuaiyun.com/mwp123555/article/details/58285561</link><guid>https://blog.youkuaiyun.com/mwp123555/article/details/58285561</guid><author>mwp123555</author><pubDate>Mon, 27 Feb 2017 21:57:41 +0800</pubDate><description><![CDATA[上一篇文章《Anroid异步消息机制（Handler、Looper、Message、MessageQueue）以及ThreadLocal运用》提到，在Android中，非主线程不能更新UI(ViewRootImpl在主线程中创建，所以我们要在主线程中更新UI。同理，如果ViewRootImpl在子线程中创建的话，那么也可以在子线程中更新UI，也就是说在哪里更新UI和ViewRootImpl在哪里创]]></description><category></category></item><item><title><![CDATA[Anroid异步消息机制（Handler、Looper、Message、MessageQueue）以及ThreadLocal运用]]></title><link>https://blog.youkuaiyun.com/mwp123555/article/details/57129257</link><guid>https://blog.youkuaiyun.com/mwp123555/article/details/57129257</guid><author>mwp123555</author><pubDate>Sat, 25 Feb 2017 22:01:09 +0800</pubDate><description><![CDATA[在Android中，非主线程不能更新UI，这时候我们可以借助Handler来实现；但Handler实现机制是什么？见下图所示

从上图，我们可以发现几个重要信息：
1、Handler可以关联多个Looper
2、一个线程只能有一个Looper
3、ThreadLocal是线程内共享的局部变量，这里为了共享Looper实例，以实现唯一性]]></description><category></category></item></channel></rss>