文章分类 -  安卓

摘要:package cn.itcast.mobilesafe.service;import java.util.GregorianCalendar;import cn.itcast.mobilesafe.R;import cn.itcast.mobilesafe.engine.NumberAddress... 阅读全文
posted @ 2014-05-04 17:33 宝贝,我永远都在 阅读(110) 评论(0) 推荐(0)
摘要:1.新建Java类package cn.itcast.mobilesafe.receiver;import android.app.admin.DeviceAdminReceiver;public class MyAdmin extends DeviceAdminReceiver {}2.在Andr... 阅读全文
posted @ 2014-05-04 16:29 宝贝,我永远都在 阅读(234) 评论(0) 推荐(0)
摘要:package cn.itcast.mobilesafe.receiver;import cn.itcast.mobilesafe.R;import cn.itcast.mobilesafe.engine.GPSInfoProvider;import android.app.admin.Device... 阅读全文
posted @ 2014-05-04 16:11 宝贝,我永远都在 阅读(128) 评论(0) 推荐(0)
摘要:package cn.itcast.mobilesafe.engine;import android.content.Context;import android.content.SharedPreferences;import android.content.SharedPreferences.E... 阅读全文
posted @ 2014-05-04 16:08 宝贝,我永远都在 阅读(168) 评论(0) 推荐(0)
摘要:Java代码:package cn.itcast.mobilesafe.receiver;import android.content.BroadcastReceiver;import android.content.Context;import android.content.Intent;imp... 阅读全文
posted @ 2014-05-04 16:04 宝贝,我永远都在 阅读(124) 评论(0) 推荐(0)
摘要:xml. Java代码:public List getContactInfos(){ ContentResolver resolver = context.getContentResolver(); //1.获取联系人的id //2.根据联系人的id 获取联系人名字 //3.根... 阅读全文
posted @ 2014-05-04 15:53 宝贝,我永远都在 阅读(110) 评论(0) 推荐(0)
摘要:case R.id.bt_next: Intent intent = new Intent(this,SetupGudie2Activity.class); //一定要把当前的activity从任务栈里面移除 finish(); startActivity(intent); //... 阅读全文
posted @ 2014-05-04 15:35 宝贝,我永远都在 阅读(422) 评论(0) 推荐(0)
摘要:在value/style.xml添加使用如下: 阅读全文
posted @ 2014-05-04 14:12 宝贝,我永远都在 阅读(84) 评论(0) 推荐(0)
摘要:在drawable文件夹下面创建selector.xml文件在按钮中使用选择器: 阅读全文
posted @ 2014-05-04 14:07 宝贝,我永远都在 阅读(93) 评论(0) 推荐(0)
摘要:在values 文件夹下面创建.style.xml文件 在java中使用对话框:private Dialog dialog;dialog = new Dialog(this, R.style.MyDialog); View view = View.i... 阅读全文
posted @ 2014-05-04 14:02 宝贝,我永远都在 阅读(127) 评论(0) 推荐(0)
摘要://3列 private GridView gv_main;gv_main.setAdapter(adapter); gv_main.setOnItemClickListener(this); gv_main.setOnItemLongClickListener(new OnItemLon... 阅读全文
posted @ 2014-05-04 13:36 宝贝,我永远都在 阅读(159) 评论(0) 推荐(0)
摘要:获取AndroidManifest.xml里面的版本号和名字android.content.pm.PackageManager manager = getPackageManager(); android.content.pm.PackageInfo info = manager.getPack... 阅读全文
posted @ 2014-05-04 13:33 宝贝,我永远都在 阅读(249) 评论(0) 推荐(0)
摘要:item.xml 方法1. hashmap相对应,不过扩展不是怎么行view = (ListView) this.findViewById(R.id.listview);private void sho... 阅读全文
posted @ 2014-05-04 02:10 宝贝,我永远都在 阅读(118) 评论(0) 推荐(0)
摘要://增加 public void add_testSw(Student stu,Student s) { SQLiteDatabase sd = this.getWritableDatabase(); sd.beginTransaction(); try { sd.execSQL("in... 阅读全文
posted @ 2014-05-04 02:03 宝贝,我永远都在 阅读(79) 评论(0) 推荐(0)
摘要:package com.example.database;import java.util.ArrayList;import java.util.List;import com.example.entites.Student;import android.content.Context;import... 阅读全文
posted @ 2014-05-04 02:00 宝贝,我永远都在 阅读(231) 评论(0) 推荐(0)
摘要:package com.example.xml;import java.io.IOException;import java.io.OutputStream;import java.util.ArrayList;import java.util.List;import org.xmlpull.v1.... 阅读全文
posted @ 2014-05-04 01:58 宝贝,我永远都在 阅读(169) 评论(0) 推荐(0)
摘要:/** * 保存参数到 data/data/包名/shared_prefs这个文件夹里面 * @param context * @param name * @param age */ public static void saveSharePrefer(Context context,... 阅读全文
posted @ 2014-05-04 01:56 宝贝,我永远都在 阅读(123) 评论(0) 推荐(0)
摘要:在程序中访问SDCard,你需要申请访问SDCard的权限。在AndroidManifest.xml中加入访问SDCard的权限如下: public static void saveToSd(String fileName, String content) throws IOException { ... 阅读全文
posted @ 2014-05-04 01:53 宝贝,我永远都在 阅读(179) 评论(0) 推荐(0)
摘要:// 自带存储空间操作*************************************************************** // 自带存储空间操作***************************************************************... 阅读全文
posted @ 2014-05-04 01:46 宝贝,我永远都在 阅读(143) 评论(0) 推荐(0)
摘要:... 阅读全文
posted @ 2014-05-04 01:41 宝贝,我永远都在 阅读(103) 评论(0) 推荐(0)