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...
阅读全文
摘要: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
阅读全文
摘要:/** * @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(); ...
阅读全文
摘要: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
阅读全文
浙公网安备 33010602011771号