`
hilary3113
  • 浏览: 262638 次
  • 性别: Icon_minigender_1
  • 来自: 邯郸
社区版块
存档分类
最新评论
文章列表
在使用eclpise时,有时选中变量时,其它相同的变量也变灰或高亮显示不生效,用起来很不方便,怕以后忘了,记下来: Preferences-->java-->Edit-->Mark Occurrentces 第一个打上对号
在Eclipse中找到Run-Debug Configurations-Remote Java Application下找到相应工程在connect的tag下设置port为8000, 如果还不能用的话,你把Remote Java Application下的  WebViewHistory全部删除,不新建,直接Dubg运行,这样Eclipse会自动为你创建一个默认的WebViewHistory。
有时在更新UI时,会报这个错:Only the original thread that created a view hierarchy can touch its views. 在修改UI时需要自己添加一个新的线程,不然的话会阻塞UI主线程,所以只需要我们把代码放到我们自己添加的线程中就可以了,但这里需要注意的是,需要把代码放到我们所创建的线程Hander中,别且Hander是被抛出的。不然的话有可能还会报同样的错误。但是我不知道在线程中创建的Hander和被发送出的Hander有什么区别?     还有在平时使用时,会忽略一个重要的问题就是。Hander必须在主线程中生成,否侧还 ...
      在写WebView时,感觉LoadUrl太浪费流量,而且加载起来有点慢,就考虑用其它的方法来实现。在加载页面时,如果只加载数据,页面模板提前写好放到项目中,这样就可以来更快的加载页面,用户体验会好些。       如果不用loadUrl,省下的就只有LoadData和loadDataWithBaseURL了,下面来说下LoadData和loadDataWithBaseURL 的用法;       loadData: public void loadData (String data, String mimeType, String 
dispatchKeyEvent 是监听Activity类的所有Key事件,正如API文档中所说: Called to process key events. You can override this to intercept all key events before they are dispatched to the window. Be sure to call this implementation for key events that should be handled normally. 当开生Key事件时,你可以在Activity中重写此监听,它可以拦截所有的Ke ...
  package com.hilary; import java.lang.reflect.Method; /** * @Author: hilary * @Date: 2011-7-26 **/ public class Fanshe { /** * @param args */ public static void main(String[] args) { try { Class cls = Class.forName("com.hilary.MyObject"); Method[] me ...
在做Menu菜单时,系统为我们提供的Menu菜单在实际开发时,并不能满足我们的要求,于是想起来了PopupWindow,SDK API是对样对PopupWindow定义的:A popup window that can be used to display an arbitrary view. The popup windows is a floating container that appears on top of the current activity.  大概意思是这样:这是一个可以显示任意的View的弹出窗口,这个窗口是浮动在当前的Activity上的, <!--Start ...
java.lang.IllegalAccessException: access to class not allowed 你要跳转的类,不是公共类,没有设置public属性
 遍历SD卡:     package com.hilary; import java.io.File; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; /** * @Author: hilary * @Date: 2011-6-25 * * 遍历SD卡的 ...
接着Android环境的搭建,本人继续做了一些整理,主要讲解项目结构目录,用法,内部运行流程,详细见附件
花了一天时间弄重新整理了下Android环境的搭建及一些需要注意的地方。详细见附件
在看源码时,发现里面应用了很多回调函数,于是关注了回调函数,下面举个例子: 首先定义一个接口,用来传递参数   public interface CallBackInterface { public void method(); }    再定义一个回调函数   public class Caller { public CallBackInterface clallBack; public void setCaller(CallBackInterface callBack){ this.clallBack = callBack; } public ...
"Copy" did not complete normally. Please see the log for more information.   这个错误是由于你开着有道词典的问题,把词典的划词翻译关了就好了
  package com.action; import android.app.Activity; import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; publi ...
文件pdf文件,有兴趣的朋友请下载
Global site tag (gtag.js) - Google Analytics