自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(32)
  • 收藏
  • 关注

原创 Android开发 学习知识点

2015-03-12 09:23:33 305

转载 In Depth : Android Shutdown Sequence

What happened when I long press power button ?What is shutdown sequence ?How is it different from desktop linux shutdown sequence?How to change shutdown menu ?Many questions pop-up in mind when we

2013-11-12 10:01:41 839

转载 人人滑动式菜单

文章出处:http://blog.csdn.net/knlnzhao/article/details/7920766http://www.eoeandroid.com/forum.php?mod=viewthread&tid=183314最近发现有好多软件都采用了滑动式菜单的效果,例如人人,云中书城等等。这种效果给人以耳目一新的感觉,所以自己也特别想实现一个。由于鄙人才疏学浅,属于

2012-11-22 10:34:11 342

转载 收藏 android设备的唯一标示

我认为比较好的有2个:1个是ANDROID_ID(与系统有关,刷系统后变成新值),第二个是UUID(与设备,时间有关)ANDROID_ID获取方法:    //在模拟器上获取是NULL,但是在真机上可以获取到,只要系统不变,每次获取值都一样    import android.provider.Settings.Secure;    String android_id=Secu

2012-11-19 11:02:56 263

转载 实现摇一摇功能

//感应管理器    private SensorManager mSensorManager;        //震动器    private Vibrator vibrator;        //活动管理器    ActivityManager activityManager ;            //1获得硬件信息         mSens

2012-11-14 09:43:02 417

转载 解决微信开发平台实例跑不通的问题

1 如果你的项目使用的 代码混淆,解决如下:      Q:为什么代码混淆之后,会导致无法弹出发送第三方消息的确认框?A:需要在混淆配置文件proguard.cfg中,增加如下两行代码:-keep class com.tencent.mm.sdk.openapi.WXMediaMessage { *;}-keep class com.tencent.mm.sdk.openapi.*

2012-11-14 09:42:15 504

转载 判断当前task中的运行的activity是否为当前应用

判断当前task中的运行的activity是否为当前应用,是:pass,否:打开应用主界面,同时发起震动提醒        String packageName = this.getPackageName();      List appTask = activityManager.getRunningTasks(1);                if (appTask !=

2012-11-14 09:41:25 377

转载 android上一些方法的区别和用法的注意事项

onMeasure()和onLayout() 1. onMeasure a. 属于View的方法,用来测量自己和内容的来确定宽度和高度 b. view的measure方法体中会调用onMeasure 2. onLayout a. 属于ViewGroup的方法,用来为当前ViewGroup的子元素的位置和大小 b. View的layout方法体中会调用onLayout

2012-11-13 13:58:18 227

转载 Android 自定义类库打包jar! 谁说不可以打包res 文件?

我们经常会有这种需求, 自己开发一个类库jar包, 提供给别人调用。 网上很多教程都是这么说:创建一个Android project, 用eclipse  的export 导出, 去掉AndroidManifest.xml, res 什么的, 全都不是正解!http://www.cyqdata.com/android/article-detail-37285

2012-11-13 13:45:33 366

转载 Android 中如何得到字符的像素宽度

Android 中如何得到字符串的像素宽度。? 条件是:在不同字体,和不同大小的情况下都可以 字符串宽度可以这样: Paint paint = new Paint(); float strWidth = paint.measureText(String); paint.setTextSize(tv.getTextSize()); 二. private final Pai

2012-07-09 15:55:44 2286

转载 android 小知识总结

1、判断sd卡是否存在  boolean sdCardExist = Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED); 2、TextView部分文字设置颜色  TextView tv = new TextView(this); //添加css样式 t

2012-06-28 13:28:43 1660

转载 收集的开源项目

Android PDF 阅读器http://sourceforge.net/projects/andpdf/files/个人记账工具 OnMyMeanshttp://sourceforge.net/projects/onmymeans/developAndroid电池监控 Android Battery Doghttp://sourceforge.net/projects/an

2012-06-28 09:31:04 267

转载 android开源demo下载地址

在网上看到的开源项目的地址,供更多的人学习下载:1、http://bigcateasymorse.googlecode.com/svn/trunk/      大概浏览了一下项目列表,内容很丰富,有时间的话可以自己下载学习一下哦,可以直接用svn下载到本地。2、http://easymorse.googlecode.com/svn/tags/    可以直接用s

2012-06-26 15:51:36 281

转载 内容挺丰富的blog

1、http://gundumw100.iteye.com/2、http://wang-peng1.iteye.com/3、http://blog.csdn.net/Android_Tutor?viewmode=contents4、http://blog.csdn.net/hellogv5、http://www.itivy.com/android/category/

2012-06-26 14:54:07 391

原创 关于 AChartEngine画折线图 的属性设置

1.显示折线上点的数值  render.setDisplayChartValues(true) ; 2.设置 线的粗细?   XYSeriesRenderer.setLineWidth(float lineWidth)方法 3.禁止报表的拖动   renderer.setPanEnabled(false, false); achartengine  http

2012-06-26 14:47:32 3733

转载 Android开发者必须深入学习的10个应用开源项目

Android开发又将带来新一轮热潮,很多开发者都投入到这个浪潮中去了,创造了许许多多相当优秀的应用。其中也有许许多多的开发者提供了应用开 源项 目,贡献出他们的智慧和创造力。学习开源代码是掌握技术的一个最佳方式。下面推荐几个应用开源项目,这些项目不仅提供了优秀的创意,也可以直接掌握 Android内核的接口使用:1.Android团队提供的示例项目如果不是从学习Android S

2012-06-26 14:42:52 350

原创 android 常规

 /** 常规* */ //***发送 SMS // AndroidManifest.xml must have the following permission:// SmsManager m = SmsManager.getDefault();String destinationNumber ="0123456789";  String te

2011-06-19 18:43:00 238

原创 android 系统服务

/** 系统服务* */ //***活动管理器 // AndroidManifest.xml must have the following permission://ActivityManager activityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);

2011-06-19 18:43:00 552

原创 android 菜单

/** 菜单* */ //***构造和处理选项菜单/** Add this in your Activity*/private final int MENU_ITEM_0 = 0;  private final int MENU_ITEM_1 = 1;    /**  * Add menu items *  * @see andr

2011-06-19 18:42:00 203

原创 android 数据库

/** 数据库* */ //***数据库 - 创建/打开 SQLiteDatabase db =openOrCreateDatabase("MyDatabaseName", MODE_PRIVATE, null); //***数据库 - 删除 boolean success = deleteDatabase("MyDatabaseName"); 

2011-06-19 18:42:00 246

原创 android 屏幕

/** 屏幕* */ //***全屏显示Activity getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); //***获取屏幕大小 Display display = ((Windo

2011-06-19 18:41:00 243

原创 android 对话框

/** 对话框* */ //***提示对话框 AlertDialog.Builder builder = new AlertDialog.Builder(this);builder.setMessage("Put your question here?")       .setCancelable(false)       .setPositiveBut

2011-06-19 18:41:00 300

原创 android GpS

/** GpS* */ //***获取当前的 GPS 坐标 // AndroidManifest.xml must have the following permission:// LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SER

2011-06-19 18:40:00 476

原创 android Preferences

/** Preferences* */  //***取得Shared Preference - 已命名Preferences文件 // Use MODE_WORLD_READABLE and/or MODE_WORLD_WRITEABLE to grant access to other applicationsSharedPreferences prefe

2011-06-19 18:39:00 274

原创 android 媒体

/** 媒体* */ //***播放应用程序自带的音频或视频文件 // Put the media file into the res/raw folder of your applicationMediaPlayer mp = MediaPlayer.create(this, R.raw.yourSoundId);mp.start(); //***

2011-06-19 18:39:00 196

原创 android 资源和Assets

/** 资源和Assets* */ //***列出应用程序的Assets String fileArray[] = this.getAssets().list(""); //***将Assets打开为字节流 InputStream is = this.getAssets().open(fileName); //***打开资源,以解析XML

2011-06-19 18:38:00 490

原创 android 本地化

/** 本地化* */ //***获取本地化字符串 String text = getResources().getString(R.string.yourStringID); //***获取本地化的可绘制资源 Drawable drawable = getResources().getDrawable(R.drawable.yourDrawable

2011-06-19 18:37:00 684

原创 android 蓝牙

/** 蓝牙* */ //***验证是否支持蓝牙 // AndroidManifest.xml must have the following permission://// Trying to get the adapterBluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter()

2011-06-19 18:36:00 411

原创 android SQL

 /** SQL* */  //***创建表 CREATE TABLE songs(    id  INTEGER,    name  TEXT,             genre  TEXT,     rate  REAL,         some_raw_data BLOB      ); //***使用其他表的数据创建表

2011-06-19 18:35:00 280

原创 android Web和Web服务

/* * Web和Web服务 */ //***执行GET请求 // AndroidManifest.xml must have the following permission://URI myURI = null;try { myURI = new URI("www.webserver.org");} catch (URISyntaxExcepti

2011-06-19 18:33:00 444

原创 android 传感器

//***检测传感器 // This code requires API level 3 (Android 1.5) or higherSensorManager manager = (SensorManager) getSystemService(SENSOR_SERVICE);boolean isAccelerometerSupported = true;if(mana

2011-06-19 18:32:00 291

原创 android 常用UI使用工具代码片段

/* * 常用UI使用工具 *///***与像素密度无关的触控笔势 private static final float DISTANCE_DIP = 16.0f;private static final float PATH_DIP = 40.0f;// convert dip measurements to pixelsfinal float sc

2011-06-19 18:24:00 251

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除