`
文章列表

I am back.

    博客分类:
  • LIFE
I am back after several years.Finding the real life.Struggling with the real world.Drunking with career.I have to take responsibilty for myself,don't rely on anybody.
在classpath中加载了jar包,但WEB-INF/lib下没有jar包。解决方法,把jar包拷贝到WEB-INF/lib,然后再添加到类路径中
1、自己加载自己的快速滚动条; 2、直接用系统的快速滚动条;
输出xml: output(resp, resultXML, encoding, "text/xml;charset=" + encoding); 输出html:output(resp, outStr, encoding, "text/html;charset=" + encoding);     private static void output(HttpServletResponse resp, String outStr, String encoding, String contenttype) {  OutputStream output ...
mywebproject\.settings\org.eclipse.wst.common.project.facet.core.xml中有关tomcat的配置   <?xml version="1.0" encoding="UTF-8"?><faceted-project>  <runtime name="Apache Tomcat v5.5"/>  <fixed facet="jst.web"/>  <fixed facet="jst.java& ...
broadcastreceiver的onReceiver方法运行在主线程中,可停留的时间可能和具体的手机有关。目前测试的手机大概可以停留四、五十秒的时候报ANR异常。当然这是在同一个.apk中只有一个receiver时测试的数据。具体情况最好测试下。
android中可以使用NinePatch处理PNG图片的失真问题。效果超级棒。哈哈。
1、创建一个android项目 2、在android项目根目录下创建libs目录、在assets目录下创建www目录; 3、解压phonegap包,将phonegap.0.9.4.jar放在libs中,然后点击右键添加到build path中;      将phonegap.0.9.4.js脚本放在www目录中;      在www目录中创建一个index.html文件; 4、改造android的启动activity:      将父类改为DroidGap;将setContentView(R.layout.main);替换为super.loadUrl ("file:///a ...

android发送短信

SmsManager smsMessager = SmsManager.getDefault();Intent i = new Intent("SENT_SMS_ACTION");PendingIntent pi = PendingIntent.getBroadcast(context, 0, i, 0);ArrayList<String> msgs = smsMessager.divideMessage("短信内容");for (String msg : msgs) {      smsMessager.sendTextMessage(&qu ...
android的默认jar包中有些类并不包含,虽然可以通过反射来实现但,如果只是想测试下显得有些麻烦。 这时可以把完全的jar包添加进去。注意添加的时候要以库的形式添加进去,而不要以jar包的形式添加。
异常: Activity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@48031788 that was originally added here   原因: 创建了dialog后,又紧接着finish()当前的activity
最近几天突然google map打不开了,原因,环境问题。以前每次都根据C盘的用户目录下的.android\debug.keystore创建指纹,然后创建apiKey,以前都成功的,不知怎么搞的,突然我的window\preferences\android\build中的default debug keystore的值和C盘下的debug.keystore不一样。导致生产的apiKey不一样。而我每次运行程序时是根据eclipse中的默认的keystore发布的。这样就导致发布时用的debug.keystore文件和生成apiKey的debug.keystore文件不一致。这样地图始终出不来。终 ...
if(view instanceof ImageView){     ((ImageView)view).setImageResource(background);}   设置背景用: viewgroup.setBackgroundResource(background);
转:http://dev.10086.cn/cmdn/wiki/index.php?doc-view-6074.html 1、参照方法一,设置系统变量,启动模拟器 2、依次进入 settings->Wireless controls->Mobile networks->Access Point Names  3、设置以下参数: - Proxy : your proxy address  - Port : your proxy p ...

R文件丢失

今天添加了一些资源后R文件突然丢失了。原来是因为res中有非法的资源文件。不小心将一个layout文件放到drawable中了。汗。
Global site tag (gtag.js) - Google Analytics