- 博客(24)
- 收藏
- 关注
原创 adb 内存优化方面有用的2个命令
To simulate conditions where implicit broadcasts and background services are unavailable, enter the following command:$ adb shell cmd appops set <package_name> RUN_IN_BACKGROUND ignoreTo re-ena...
2018-03-12 15:42:56
1968
原创 Binary XML file line #0: Error inflating class TextView
catch exception:android.view.InflateException: Binary XML file line #0: Error inflating class TextView at android.view.La
2017-11-26 19:07:39
4906
2
原创 Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated{apkData=
问题描述:Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated{apkData=Main{type=MAIN, fullName=debug, filters=[]}} of type com.android.build.gradle.internal.api.ApkVar
2017-11-03 13:21:56
1662
原创 [Android] VasSonic H5加载优化加载库 源码解读及需要注意的地方
1、VasSonic是什么?一句话总结:优化webview对h5的加载速度wiki原话: VasSonic取名于世嘉游戏形象音速小子,是腾讯VAS(SNG增值产品部QQ会员)团队研发的一个轻量级的高性能的Hybrid框架,专注于提升页面首屏加载速度,完美支持静态直出页面和动态直出页面,兼容离线包等方案。 该框架使用终端应用层原生传输通道取代系统浏览器内核自身资源传输通道来请求页面主资源
2017-08-13 17:04:25
3445
1
原创 SurfaceView 闪屏 黑线问题解决
SurfaceView 闪烁 黑线 黑色1、为什么要用SurfaceView项目中经常会出现多个自定义View,并且可能会多次且频繁的调用canvas进行绘制。当优化还是无法解决界面绘制时卡顿掉帧现象时,我们可以考虑用SurfaceView来解决。它继承自View类,但是内部实现了双buffer并且是在一个单独的线程中进行进行绘制最后再post canvas到UI上。
2017-07-24 23:57:02
2089
原创 使用讯飞语音SDK时的问题
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.iflytek.cloud.SpeechSynthesizer.setParameter(java.lang.String, java.lang.String)' on a null object referencevendor/lib64, /
2017-03-10 12:09:08
9921
原创 Jar包重复问题
AGPBI: {"kind":"error","text":"warning: Ignoring InnerClasses attribute for an anonymous inner class","sources":[{}]}AGPBI: {"kind":"error","text":"(com.iflytek.sunflower.b) that doesn\u0027t come wit
2017-03-10 11:00:15
751
原创 Android 关于键盘无法弹出的坑
Android EditText 无法弹出键盘的坑1、正常情况下,只要写了EditText控件,当进入Activity时,是会直接显示软键盘的,但是如果我们的EditText是GONE或者INVISIBLE的话,当我们点击其他控件,然后让Edittext显示,并且弹出软键盘,那么这个时候就必须关注顺序的问题,必须必须先让EditText显示,在调用显示软键盘的代码才可以,如果先让软键盘弹出再让Edi
2016-12-22 11:54:38
2354
原创 Android 表情面板切换键盘闪烁问题的解决
Android 表情面板切换键盘闪烁问题的解决1、问题出现的原因<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:id="@+id/rootView"android:layout_width="match_parent"android:layout_height="wrap_conte
2016-12-21 22:39:58
1209
原创 Missing styles. Is the correct theme chosen for this layout?
Missing styles. Is the correct theme chosen for this layout?Use the Theme combo box above the layout to choose a different layout, or fix the theme style references.Failed to find '?attr/textEdi
2016-11-17 19:27:09
1097
原创 [Android]主题和样式
定义一个样式Style创建:将xml文件保存在resource/values文件夹下的一个xml文件中,文件名随意,但是必须是.xml,并且根节点必须是<Resoruces><resources> <style name="codeFont" > <item name="android:textColor">#ffffff</item> </style></res
2016-10-14 08:54:22
370
原创 UI布局知识积累
scrollView常见属性:android:fadingEdge:隐藏滚动两边的阴影,但是实际没有看出什么效果。 android:scrollbars:设置滚动条的方向 android:scrollbarThumbVertical:设置垂直滚动条的样式 android:scrollbarStyle:有四个值 insideOverlay、insideInset、outsideOverlay、o
2016-09-27 10:34:32
397
原创 Error:Configuration with name 'default' not found.
出现原因:git clone 某个项目之后,sync出现如下错误: Error:Configuration with name ‘default’ not found.我的解决办法:git 进入到项目根目录输入如下指令:git submodule update --init --recursive至于原因可参考http://blog.youkuaiyun.com/wangjia55/article/det
2016-09-23 15:39:25
467
原创 Decompiled .class file,bytecode version:52.0(Java 8) Source for 'Android API 24 Platform' not found
问题:Decompiled .class file,bytecode version:52.0(Java 8) Source for ‘Android API 24 Platform’ not found 解决办法:点击右上角的Download,但是下载完点击Refresh之后没有反应,这时候需要重新关联sdk。具体方法:File->Appearence&Behavior->System Set
2016-09-23 08:58:49
10726
原创 Android笔试之JAVA笔试题总结
1.静态块 main() 构造块 构造方法的执行顺序首先看一道题publicclass B{ publicstatic B t1 = newB(); publicstatic B t2 = newB(); { System.out.println("构造
2016-08-31 10:42:43
493
原创 View的绘制流程
绘制是从ViewRootImpl的performTraversals方法开始的1.ViewRootImpl.performTraversals()在performTraversals()方法中会调用View.measure。即调用DecorView的measure方法。进一步调用onMeasure方法。接着遍历子View,进行测量,这里就是调用ViewRoot的measure方法。2.
2016-08-30 15:23:37
283
原创 Android面试之类集合问题总结
1.HashTable和HashMap的区别(1)HashMap是线程不同步的,而HashTable是线程同步的,这就意味着HashMap在效率上要比HashTable的执行效率要高。但是如果你需要同步,那么选择HashTable是最好的。当然你也可以给HashMap提供同步。(2)HashMap中允许存一个key为空的键值对,并且允许存多个value为空的键值对。(3)HashTab
2016-08-30 10:33:58
484
原创 Error while Launching activity
在Androidstudio中报的错误如下:Error while executing: am start -n "tech.qiji.android.apps.xianyu.dev/tech.qiji.android.apps.xianyu.ui.activity.MainActivity" -a android.intent.action.MAIN -c android.intent.categ
2016-06-28 22:17:54
1424
原创 [Android] Drawable总结(一)
前言最近看了一遍Android中的Drawable,因为Drawable的分类很多,而且Drawable在UI方面的开发工作中显的尤为重要,因为我在这里对Drawable做个总结。BitmapDrawable语法:<?xml version="1.0" encoding="utf-8"?> <bitmap xmlns:android="http://schemas.android.c
2016-06-27 09:45:06
302
原创 [Android] 使用Cookie保持会话
前言关于如何保持保持登录的状态,个人的处理方法的总结,当然可能有其他比较好的保持登录状态的方法。也希望大家能够告诉我。接下来我说一下我自己做的一个app中时如何保存会话的状态的,顺便做个总结。代码protected User doInBackground(User... params) {User user = params[0];HttpClient httpClient = new Def
2016-06-20 09:51:22
1163
原创 [Android] TextView.setError()(二)
前言上一篇的最后我们讲到了Editor的showError()方法,并且这个方法是最后的核心部分,我们将在这一讲中对这一部分进行详细的讲解。首先我们再来回顾一下这个函数。源码分析//代码区域1private void showError() {if (mTextView.getWindowToken() == null) { mShowErrorAfterAttach = true;
2016-06-15 22:35:18
1915
原创 [Android] TextView.setError()(一)
前言今天讲述一下TextView.setError()这个方法。这个方法主要是作用是对用户友好提示一些信息。比如说在用户输入密码格式不正确的时候,以一种友好的界面形式展现出来。效果图方法实现首先看主Aciticity写法://代码区域1public class MainActivity extends AppCompatActivity { private EditText text;
2016-06-06 19:47:03
3962
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人