<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[发现科技的专栏]]></title><description><![CDATA[分享android技术为主，ios，前端，服务器技术为辅]]></description><link>https://blog.youkuaiyun.com/handongyu2011</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; handongyu2011]]></copyright><item><title><![CDATA[最新[Android地图sdk] 踩坑经验分享 DistanceUtil.getDistance报错]]></title><link>https://blog.youkuaiyun.com/handongyu2011/article/details/73754660</link><guid>https://blog.youkuaiyun.com/handongyu2011/article/details/73754660</guid><author>handongyu2011</author><pubDate>Mon, 26 Jun 2017 23:28:31 +0800</pubDate><description><![CDATA[下午一直在报这个错误，坑了一下午：大家牢记。java.lang.UnsatisfiedLinkError: No implementation found for boolean com.baidu.platform.comjni.tools.JNITools.CoordinateEncryptEx(float, float, java.lang.String, java.lang.Object)]]></description><category></category></item><item><title><![CDATA[Kotlin最简单的入门教程——与Java互相调用]]></title><link>https://blog.youkuaiyun.com/handongyu2011/article/details/73276822</link><guid>https://blog.youkuaiyun.com/handongyu2011/article/details/73276822</guid><author>handongyu2011</author><pubDate>Thu, 15 Jun 2017 10:49:29 +0800</pubDate><description><![CDATA[Kotlin 中调用 Java 代码import java.util.*fun demo(source: List<Int>) {
    val list = ArrayList<Int>()
    // “for”-循环用于 Java 集合：
    for (item in source) {
        list.add(item)
    }
    // 操作符约定同样有效：]]></description><category></category></item><item><title><![CDATA[Kotlin最简单的入门教程——关键字，操作符，异常，空指针]]></title><link>https://blog.youkuaiyun.com/handongyu2011/article/details/73276809</link><guid>https://blog.youkuaiyun.com/handongyu2011/article/details/73276809</guid><author>handongyu2011</author><pubDate>Thu, 15 Jun 2017 10:48:15 +0800</pubDate><description><![CDATA[1 区间表达式区间表达式由具有操作符形式 .. 的 rangeTo 函数辅以 in 和 !in 形成。if (i in 1..10) { // 等同于 1 <= i && i <= 10
    println(i)
}倒序迭代数字   downTo() 函数for (i in 4 downTo 1) print(i) // 输出“4321”能否以不等于 1 的任意步长迭代数字？ 当然没问题， st]]></description><category></category></item><item><title><![CDATA[Kotlin最简单的入门教程——集合]]></title><link>https://blog.youkuaiyun.com/handongyu2011/article/details/73276786</link><guid>https://blog.youkuaiyun.com/handongyu2011/article/details/73276786</guid><author>handongyu2011</author><pubDate>Thu, 15 Jun 2017 10:47:45 +0800</pubDate><description><![CDATA[集合Kotlin 区分可变集合和不可变集合（lists、sets、maps 等）Kotlin 的 List 类型是一个提供只读操作如 size、get等的接口。和 Java 类似，它继承自 Collection 进而继承自 Iterable。改变 list 的方法是由 MutableList 加入的。这一模式同样适用于 Set/MutableSet 及 MapKotlin中的集合根据“是否可变”，分]]></description><category></category></item><item><title><![CDATA[Kotlin最简单的入门教程——神秘的Lambda]]></title><link>https://blog.youkuaiyun.com/handongyu2011/article/details/73276756</link><guid>https://blog.youkuaiyun.com/handongyu2011/article/details/73276756</guid><author>handongyu2011</author><pubDate>Thu, 15 Jun 2017 10:47:13 +0800</pubDate><description><![CDATA[Lambda 表达式lambda 表达式总是被大括号括着， 完整语法形式的参数声明放在括号内，并有可选的类型标注， 函数体跟在一个 -> 符号之后。如果推断出的该 lambda 的返回类型不是 Unit，那么该 lambda 主体中的最后一个（或可能是单个）表达式会视为返回值。例如：val sum = { x: Int, y: Int -> x + y }我们可以使用限定的返回语法从 lambda]]></description><category></category></item><item><title><![CDATA[Kotlin最简单的入门教程——委托]]></title><link>https://blog.youkuaiyun.com/handongyu2011/article/details/73276338</link><guid>https://blog.youkuaiyun.com/handongyu2011/article/details/73276338</guid><author>handongyu2011</author><pubDate>Thu, 15 Jun 2017 10:44:04 +0800</pubDate><description><![CDATA[我感觉委托还是比较重要的，所以还是要看一下，不然后面用到都不知道是什么1 类委托委托模式已经证明是实现继承的一个很好的替代方式， 而 Kotlin 可以零样板代码地原生支持它。 类 Derived 可以继承一个接口 Base，并将其所有共有的方法委托给一个指定的对象：interface Base {
    fun print()
}class BaseImpl(val x: Int) : Base]]></description><category></category></item><item><title><![CDATA[Kotlin最简单的入门教程——可见性修饰符，扩展，数据类，密封类]]></title><link>https://blog.youkuaiyun.com/handongyu2011/article/details/73276222</link><guid>https://blog.youkuaiyun.com/handongyu2011/article/details/73276222</guid><author>handongyu2011</author><pubDate>Thu, 15 Jun 2017 10:42:05 +0800</pubDate><description><![CDATA[1 可见性修饰符在 Kotlin 中有这四个可见性修饰符：private、 protected、 internal 和 public。 如果没有显式指定修饰符的话，默认可见性是 public文件名和类名可以不同// 文件名：example.kt
package foofun baz() {}
class Bar {}对于类内部声明的成员：private 意味着只在这个类内部（包含其所有成员）可见；]]></description><category></category></item><item><title><![CDATA[Kotlin最简单的入门教程——类和继承]]></title><link>https://blog.youkuaiyun.com/handongyu2011/article/details/73276125</link><guid>https://blog.youkuaiyun.com/handongyu2011/article/details/73276125</guid><author>handongyu2011</author><pubDate>Thu, 15 Jun 2017 10:41:26 +0800</pubDate><description><![CDATA[Kotlin 中类和java中的类声明都是用关键字class两者的区别主要在于构造函数：java中没有主构造函数次构造函数之分，但是kotlin有1 主构造函数在 Kotlin 中的一个类可以有一个主构造函数和一个或多个次构造函数。主 构造函数是类头的一部分：它跟在类名（和可选的类型参数）后。class Person constructor(firstName: String) {
}如果主构造函数]]></description><category></category></item><item><title><![CDATA[Kotlin最简单的入门教程——基础类型（二）]]></title><link>https://blog.youkuaiyun.com/handongyu2011/article/details/73275999</link><guid>https://blog.youkuaiyun.com/handongyu2011/article/details/73275999</guid><author>handongyu2011</author><pubDate>Thu, 15 Jun 2017 10:40:48 +0800</pubDate><description><![CDATA[8 If表达式在 Kotlin 中，if是一个表达式，即它会返回一个值。 因此就不需要三元运算符（条件 ? 然后 : 否则），因为普通的 if 就能胜任这个角色。// 传统用法
var max = a 
if (a < b) max = b// With else 
var max: Int
if (a > b) {
    max = a
} else {
    max = b
}// 作为表达]]></description><category></category></item><item><title><![CDATA[Kotlin最简单的入门教程——基础类型（一）]]></title><link>https://blog.youkuaiyun.com/handongyu2011/article/details/73275907</link><guid>https://blog.youkuaiyun.com/handongyu2011/article/details/73275907</guid><author>handongyu2011</author><pubDate>Thu, 15 Jun 2017 10:38:31 +0800</pubDate><description><![CDATA[写在前面首先像java一样新建一个kotlin的文件 
文件建好之后直接写main函数，程序入口，像这样fun  main(args:Array<String>){
   println("你好，主函数")
}不用新建类，可以直接写主函数，然后右键运行，看控制台打印的信息开始，kotlin的基本数据类型#声明一个变量
/**
    * 首先说明  Kotlin中有两个关键字定义变量
     *]]></description><category></category></item><item><title><![CDATA[Kotlin最简单的入门教程——环境]]></title><link>https://blog.youkuaiyun.com/handongyu2011/article/details/73275827</link><guid>https://blog.youkuaiyun.com/handongyu2011/article/details/73275827</guid><author>handongyu2011</author><pubDate>Thu, 15 Jun 2017 10:36:58 +0800</pubDate><description><![CDATA[第一步：打开setting———> plugin  搜索kotlin插件安装完成之后新建kotlinActivity：生成activity后选择配置kotlin，如图： 
点击ok，等待完成配置然后你的app下的build.gradle的配置就多了如下内容：还有你的kotlinHelloword下的build.gradle下多了这些内容：然后在你的新建的HelloWorldActivty的xml里面]]></description><category></category></item><item><title><![CDATA[微信内H5唤醒本地安装应用终于有解决方案了]]></title><link>https://blog.youkuaiyun.com/handongyu2011/article/details/73275549</link><guid>https://blog.youkuaiyun.com/handongyu2011/article/details/73275549</guid><author>handongyu2011</author><pubDate>Thu, 15 Jun 2017 10:31:32 +0800</pubDate><description><![CDATA[我之前做了好多工作，就是解决不了在微信内打开的H5唤醒我的本地应用并且跳转到指定的页面。之前我是这么做的1 主要是在AndroidManifest.xml里面的配置，配置你的应用中从头到尾不会被回收掉的那个activity上* 注意：android:scheme 是你app在微信开发者申请的appid，微信使用的是qq浏览器的内核，内部把这一层拦截了，这就是你用手机上的浏览器可以打开，在微信里就打不]]></description><category></category></item><item><title><![CDATA[Android自动化测试monkey的使用]]></title><link>https://blog.youkuaiyun.com/handongyu2011/article/details/52185374</link><guid>https://blog.youkuaiyun.com/handongyu2011/article/details/52185374</guid><author>handongyu2011</author><pubDate>Thu, 11 Aug 2016 18:25:33 +0800</pubDate><description><![CDATA[Android自动化测试monkey的使用monkey命令使用
  adb shell monkey -p com.test -v 30000  >E:\text.txt 
  adb shell monkey -p 包名 -v 执行次数  >导出的路径
还有一种更复杂的方式
  adb shell monkey -p com.lenovo.ideafriend –ignore-crashes –i]]></description><category></category></item><item><title><![CDATA[Android 性能优化注意事项]]></title><link>https://blog.youkuaiyun.com/handongyu2011/article/details/51220309</link><guid>https://blog.youkuaiyun.com/handongyu2011/article/details/51220309</guid><author>handongyu2011</author><pubDate>Fri, 22 Apr 2016 15:04:13 +0800</pubDate><description><![CDATA[避免“坏”表现

避免堵塞主线程避免可能引发大范围重绘的不必要的重绘用 RelativeLayout 来减少布局层级避免在 LinearLayout 中使用嵌套的 weight 属性（因为weight属性会使每个子View进行两次measure）避免使用没有恰当处理的自定义View避免创建没必要的对象将常量声明为 static final（static比普通变量快 15% - 20%）使用基本]]></description><category></category></item></channel></rss>