上一页 1 ··· 4 5 6 7 8 9 下一页
摘要: package cn.itcast.customnoti;import android.app.Activity;import android.app.Notification;import android.app.NotificationManager;import android.app.PendingIntent;import android.content.Context;import android.content.Intent;import android.net.Uri;import android.os.Bundle;import android.view.View;impor 阅读全文
posted @ 2012-07-19 07:56 ligang305 阅读(640) 评论(0) 推荐(0) 编辑
摘要: // 1. 获取到系统的notificationManager NotificationManager notficationManager; notficationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // 2. 实例化一个notification String tickerText = "IP号码 设置完毕"; long when = System.currentTimeMillis(); No... 阅读全文
posted @ 2012-07-19 07:45 ligang305 阅读(206) 评论(0) 推荐(0) 编辑
摘要: iv.setOnTouchListener(new OnTouchListener() { int startX; int startY; public boolean onTouch(View v, MotionEvent event) { // TODO Auto-generated method stub switch (event.getAction()) { case MotionEvent.ACTION_DOWN: Log.i(TAG,"手指按下"); startX = v.getLeft()+20; startY =... 阅读全文
posted @ 2012-07-18 19:50 ligang305 阅读(104) 评论(0) 推荐(0) 编辑
摘要: /** * 通过内容提供者 查询当前手机号码所对应的人名 * @param incomingNumber */ public String queryNumberName(String incomingNumber) { Uri uri = Uri.parse("content://com.android.contacts/data/phones/filter/"+incomingNumber); ContentResolver resolver = getContentResolver(); Cursor cursor = resolver.query(uri, new. 阅读全文
posted @ 2012-07-18 08:26 ligang305 阅读(419) 评论(0) 推荐(0) 编辑
摘要: blackNumberListAdapter.setBlackNumbers(blacknumbers);// blackNumberListAdapter = new BlackNumberListAdapter(CallSmsSafeActivity.this,blacknumbers);// lv_call_sms_safe.setAdapter(blackNumberListAdapter); blackNumberListAdapter.notifyDataSetChanged(); 阅读全文
posted @ 2012-07-18 08:05 ligang305 阅读(138) 评论(0) 推荐(0) 编辑
摘要: /* * 添加黑名单 */ public void addBlackNumber(View view){ AlertDialog.Builder builder = new Builder(this); LinearLayout linearLayout = new LinearLayout(this); linearLayout.layout(10, 10, 90, 90); linearLayout.setOrientation(LinearLayout.VERTICAL); final EditText et = new EditText(this); et.setHi... 阅读全文
posted @ 2012-07-18 07:43 ligang305 阅读(546) 评论(0) 推荐(0) 编辑
摘要: getview(){ TextView tv = null; if(convertView == null){ tv = new TextView(); tv.setText("hello"); }else{ tv = (TextView)convertView; }} 阅读全文
posted @ 2012-07-17 22:32 ligang305 阅读(130) 评论(0) 推荐(0) 编辑
摘要: package cn.itcast.mobilesafe.service;import java.lang.reflect.Method;import com.android.internal.telephony.ITelephony;import cn.itcast.mobilesafe.R;import cn.itcast.mobilesafe.db.dao.BlackNumberDao;import android.app.Service;import android.content.ContentResolver;import android.content.Context;impor 阅读全文
posted @ 2012-07-16 11:39 ligang305 阅读(3298) 评论(0) 推荐(0) 编辑
摘要: 1:自定义对话框(lostprotectedActivity)2: 增加一个淡入的动画效果 RelativeLayout rl = (RelativeLayout) findViewById(R.id.splash_rl); AlphaAnimation aa = new AlphaAnimation(0.1f, 1.0f); aa.setDuration(3000); rl.setAnimation(aa);3: PackageManager packageManager;//获取apk的信息 //获取packagemanager的实例 packageMana... 阅读全文
posted @ 2012-07-15 22:19 ligang305 阅读(501) 评论(0) 推荐(0) 编辑
摘要: package cn.itcast.mobilesafe.service;import android.content.Context;import android.content.SharedPreferences;import android.content.SharedPreferences.Editor;import android.location.Criteria;import android.location.Location;import android.location.LocationListener;import android.location.LocationMana 阅读全文
posted @ 2012-07-15 17:09 ligang305 阅读(1551) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 下一页