摘要: private SharedPreferences sf;sf = TeLoginActivity.this.getSharedPreferences("basic_info", Context.MODE_PRIVATE);editor = sf.edit(); if (isSavePwd) { editor.putString("username", userEdit.getText().toString()); editor.putString("password", pwdEdit.... 阅读全文
posted @ 2013-06-04 08:43 double0zhou 阅读(148) 评论(0) 推荐(0) 编辑
摘要: package com.haoxee.haoxin.login.activity;import android.content.Context;import android.content.Intent;import android.os.Build;import android.os.Bundle;import android.telephony.PhoneStateListener;import android.telephony.TelephonyManager;import android.util.Log;import android.view.KeyEvent;import and 阅读全文
posted @ 2013-06-04 08:40 double0zhou 阅读(361) 评论(0) 推荐(0) 编辑
摘要: View Code pointlist .setOnCreateContextMenuListener(new OnCreateContextMenuListener() { @Override public void onCreateContextMenu(ContextMenu menu, View arg1, ContextMenuInfo arg2) { // TODO Auto-g... 阅读全文
posted @ 2013-04-18 09:36 double0zhou 阅读(130) 评论(0) 推荐(0) 编辑
摘要: ListView 简单配置1.List LayoutView Code <?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation=& 阅读全文
posted @ 2013-04-12 14:31 double0zhou 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 1.权限View Code <uses-permission android:name="android.permission.VIBRATE"/>2.初始化,实现View Code mVibrator01 = (Vibrator)getApplication().getSystemService(Service.VIBRATOR_SERVICE); clickListener = new OnClickListener() { @Override public void onClick(View v) {... 阅读全文
posted @ 2013-04-12 10:53 double0zhou 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 1.权限View Code <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>2.codeView Code public void downloadHttp(String downLoadUrl) { String urlStr = downLoadUrl; String path = "file& 阅读全文
posted @ 2013-04-09 16:20 double0zhou 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 1.权限View Code <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>2.方法View Code public void begainDownload(String downLoadUrl) { DownloadManager dm = (DownloadManager)getSystemService 阅读全文
posted @ 2013-04-09 16:18 double0zhou 阅读(511) 评论(0) 推荐(0) 编辑
摘要: View Code Intent intent = new Intent(Intent.ACTION_MAIN, null); intent.addCategory(Intent.CATEGORY_LAUNCHER); List<ResolveInfo> list = VideoActivity.this.getPackageManager().queryIntentActivities(intent, PackageManager.GET_ACTIVITIES); for (int i = 0; i < list.size(); i++) { if (list... 阅读全文
posted @ 2013-04-09 16:13 double0zhou 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 画一个圆出来,每隔0.1秒,圆向10移动10个像素。但可以清楚展示利用Handler更新UI的流程。1.首先创建简单的View,代码如下:View Code package com.ray.handler;import android.content.Context;import android.graphics.Canvas;import android.graphics.Color;import android.graphics.Paint;import android.graphics.Point;import android.graphics.drawable.Drawable;imp 阅读全文
posted @ 2013-04-09 11:39 double0zhou 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 1.定义接口View Code /** * @author zhou * */public interface CallBack { public void tellSomeOne(String str);}2.定义工具类View Code public class Tools{ public String aaa=""; public void doSomeSth() { aaa = "asdasda"; } public void CallSomeOne(CallBack call) { aaa="a1111111111111... 阅读全文
posted @ 2013-04-09 11:22 double0zhou 阅读(152) 评论(0) 推荐(0) 编辑