![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
移动开发
Kila_
这个作者很懒,什么都没留下…
展开
-
【Android笔记-异常-8】在引入AndResGuard时异常
在引入AndResGuard时,classpath 'com.tencent.mm:AndResGuard-gradle-plugin:1.2.0'提示Error:Could not find com.tencent.mm:AndResGuard-gradle-plugin:1.2.0.Searched in the following locations:原创 2017-12-04 21:07:21 · 2418 阅读 · 1 评论 -
【iOS笔记-异常-1】
Failed to initiate service connection to simulator Error returned in reply: Connection invalid关闭所有xcode和模拟器,重新运行即可正常。原创 2017-12-15 20:40:53 · 283 阅读 · 0 评论 -
【iOS(swift)笔记-2】iOS MVP总结
【M】DataModel 服务端数据或本地数据对应的实体类【M】Service(这里也可以先抽象出ServiceProtocol然后Service继承ServiceProtocol实现其抽象方法,则Presenter持有的是ServiceProtocol实例)请求本地或服务端数据【M】ServiceListener针对Service请求的回调监听,监听也是Protocol,需要...原创 2017-12-23 22:17:14 · 218 阅读 · 0 评论 -
【iOS(swift)笔记-3】swift使用SnapKit创建高度自适应的cell方法
//// BlogTableViewCell.swift// App//// Created by kila on 16/02/2018.// Copyright © 2018 kila. All rights reserved.//import UIKit// 自定义cell类class MyTableViewCell: UITableViewCell { var uImg...原创 2018-02-17 14:34:58 · 1703 阅读 · 0 评论 -
【iOS(swift)笔记-4】Push页面隐藏tabor,Pop回来自动显示tabbar(这样tabbar就不会有从下往上弹出的动作)
先设置hidesBottomBarWhenPushed = true然后紧接着在跳转页面的代码后设置hidesBottomBarWhenPushed = falseself.hidesBottomBarWhenPushed = trueself.navigationController?.pushViewController(LoginViewController(), animated: tru...原创 2018-02-18 08:24:57 · 1007 阅读 · 1 评论 -
【iOS(swift)笔记-6】自定义ObjectMapper的时间转换
ObjectMapper内置的时间转换模式有限,有时候从服务端获取的时间数据不能正常转换,这种时候就需要通过自定义时间转换模式来解决。第1步:实现协议TransformType//// HxDateTransform.swift// App//// Created by kila on 17/02/2018.// Copyright © 2018 kila. All rights rese...原创 2018-02-18 09:05:11 · 2260 阅读 · 0 评论 -
【iOS(swift)笔记-7】自定义九宫格图片布局(基于SnapKit)
调用方法:// 我这里是将HxNineGridView添加到UITableViewCell里,你可以将它用在其他地方let nineGridView = HxNineGridView()self.contentView.addSubview(nineGridView) nineGridView.snp.makeConstraints { (make) -> Void i...原创 2018-02-20 21:13:56 · 3444 阅读 · 0 评论 -
【安卓笔记-13】dagger2 @Qulifier
Dagger2是根据返回类型来进行依赖注入的,如何我们有@Inject多个相同类型的变量,怎么一一对应@Provides方法提供的实例呢?解决方法就是用@Qulifier标签,@Qulifier定义的过程稍微又有点繁琐,这个时候可以用@Name标签代替@Qulifier简化过程。...原创 2018-05-12 08:34:10 · 389 阅读 · 0 评论 -
【安卓笔记-14】利用第三方框架FlycoTabLayout做出中间凸起tab按钮
如何利用FlycoTabLayout做出中间凸起按钮?我的方式很简单——就是不用FlycoTabLayout,直接创建一个新的view置于FlycoTabLayout之上。为了事件不相互影响,本人对源码的CommonTabLayout类的setCurrentTab方法进行了适当修改。demo链接https://github.com/1987151729/FlycoTabLayoutWithBigC...原创 2018-05-14 19:50:49 · 3002 阅读 · 1 评论 -
【安卓笔记-15】ViewPager作为容器展示Fragment,控制保留不销毁页面的数量
ViewPager作为容器展示Fragment时,默认只保留2个页面,例如有3个页面时当切换到2、3页面时,1页面已经调用ViewDestroyed方法销毁了view,当再次需要展示它时,又会重新ViewCreated,为了控制保留不销毁页面的数量,ViewPager对应有一个方法叫setOffscreenPageLimit,可以设置其页面数量。...原创 2018-06-07 21:12:35 · 424 阅读 · 0 评论 -
【Android笔记-9】如果服务端是用的IIS,则需要配置mime类型,安卓客户端才能正常下载apk安装包。
如果服务端是用的IIS,则需要配置mime类型,安卓客户端才能正常下载apk安装包。原创 2017-09-21 11:56:04 · 237 阅读 · 0 评论 -
【Android笔记-异常-7】FrameLayout要嵌套在LinearLayout里否则布局有问题。
FrameLayout要嵌套在LinearLayout里否则布局有问题。原创 2017-09-18 16:55:23 · 1763 阅读 · 1 评论 -
【Android笔记-异常-6】不能在子线程中创建handle
不能在子线程中创建handle。原创 2017-09-08 18:31:56 · 351 阅读 · 1 评论 -
【Android笔记-异常-1】
添加新代码后,无法理解的异常,卸载app重新安装!原创 2017-09-03 20:24:16 · 158 阅读 · 0 评论 -
【Android笔记-异常-2】Caused by: java.lang.ClassCastException: android.support.v7.widget.AppCompatButton c
Caused by: java.lang.ClassCastException: android.support.v7.widget.AppCompatButton cannot be cast to android.widget.LinearLayout.元素之间转换的问题,可能原因:1、公用了同一个id,但是元素类型不一样;2、id的标识没有生成“形如publi原创 2017-09-03 20:27:30 · 6092 阅读 · 0 评论 -
【Android笔记-8】Android:ellipsize
android:ellipsize 用于设定当文本内容超出控 件宽度时,文本的缩略方式,这里指定成 end 表示在尾部进行缩略。原创 2017-08-29 17:51:12 · 218 阅读 · 0 评论 -
【Android笔记-7】Fragment碎片
Fragment碎片SelfDefineFragment fragment = new SelfDefineFragment();FragmentManager fragmentManager = getFragmentManager();FragmentTransaction transaction = fragmentManager.beginTransaction()原创 2017-08-25 18:02:11 · 186 阅读 · 0 评论 -
【Android笔记-6】strings.xml文件
文字一定要写在 string文件里,你老板会突然有一天告诉你——“我们出个海外版”。原创 2017-08-22 15:20:31 · 168 阅读 · 0 评论 -
【Android笔记-5】ListView adapter.notifyDataSetChanged
adapter.notifyDataSetChanged(); 用于通知 列表的数据发生了变化,这样新增的数据才能够在 ListView中显示 。原创 2017-08-18 16:02:13 · 245 阅读 · 0 评论 -
【Android笔记-4】ListView Android:divider
ListView 中用到了一个 android:divider属性,它可以指定 ListView分隔线的颜色,#0000 表示将分隔线设为透明色。原创 2017-08-17 17:11:23 · 277 阅读 · 0 评论 -
【Android笔记-3】启动活动的最佳写法
个人认为启动活动的最佳写法:SecondActivity:public class SecondActivity extends BaseActivity {public static void actionStart(Context context, String data1, String data2) { Intent intent = new原创 2017-08-16 17:31:30 · 251 阅读 · 0 评论 -
【Android笔记-异常-3】数字在TextView中显示一定要先转换为字符串。String.valueOf(数字)
数字在TextView中显示一定要先转换为字符串。String.valueOf(数字)原创 2017-09-07 18:03:00 · 1051 阅读 · 0 评论 -
【Android笔记-异常-4】定义一个临时的数组变量承接数据,ListView的数据以及通知数据更新要放到同一个线程(主线程)。避免出现异常"The content of the adapter
定义一个临时的数组变量承接数据,ListView的数据以及通知数据更新要放到同一个线程(主线程)。避免出现异常"The content of the adapter has changed but ListView did not receive a notification"。public class WordFragment extends BaseFragme原创 2017-09-07 18:15:01 · 228 阅读 · 0 评论 -
【Android笔记-异常-5】Error:(1, 0) Minimum supported Gradle version is 3.3. Current version is 2.14.1.
Error:(1, 0) Minimum supported Gradle version is 3.3. Current version is 2.14.1. If using the gradle wrapper, try editing the distributionUrl in /Users/kila/AndroidStudioProjects/Cat/gradle/wrapper/gr原创 2017-09-08 18:23:33 · 730 阅读 · 0 评论 -
【安卓笔记-16】使用butterknife时别忘了先注册绑定,不然会报空指针异常
Activity @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_simple); ButterKnife.bind(this); // TODO Use field...原创 2018-07-09 08:17:49 · 390 阅读 · 0 评论