11 2013 档案

摘要:1.在res/values下创建attrs.xml MyRadioButton为组件名字,随意起,attr标签定义组件的属性,name对应的是属性名,format是属性的类型,具体可参见《[Android]attrs.xml文件中属性类型format值的格式》。2.在自定义的组件中使用attrs.xml文件的定义public class MyRadioButton extends RadioButton { private String url; public MyRadioButton(Context context, AttributeSet attrs... 阅读全文
posted @ 2013-11-08 10:27 道奇兔 阅读(595) 评论(0) 推荐(0)
摘要:import java.io.ByteArrayInputStream;import java.io.ByteArrayOutputStream;import java.text.SimpleDateFormat;import java.util.Date;import android.app.Activity;import android.graphics.Bitmap;import android.graphics.BitmapFactory;import android.os.Bundle;import android.os.Environment;import android.util 阅读全文
posted @ 2013-11-07 14:57 道奇兔 阅读(7058) 评论(0) 推荐(0)
摘要:/** * @param url * @return * @throws Exception */ private String getContent(String url) throws Exception{ StringBuilder sb = new StringBuilder(); HttpClient client = new DefaultHttpClient(); ////获取一个默认的HttpClient的对象实现 HttpParams httpParams = client.getParams(); ... 阅读全文
posted @ 2013-11-07 14:48 道奇兔 阅读(517) 评论(0) 推荐(0)
摘要:Android中AndroidManifest.xml警告Should explicitly set android:allowBackup to true or false (it's true by default, and that can have some security implications for the application's data)解决方案:android:allowBackup="true"android:allowBackup="false"http://developer.android.com/re 阅读全文
posted @ 2013-11-06 15:22 道奇兔 阅读(3768) 评论(0) 推荐(0)