Very slow response after upgrade to Juno Release If you want your Juno got faster you need to add this toeclipse.ini file: Code: [Select all] [Show/ hide] -vmargs -Xms512m -Xmx1024m http://www.eclipse.org/forums/index.php/t/367243/… Read More
How to Undo Never Save Password for This Site Click in Google Chrome Chrome有一个Bug,就是一旦你不想存某个网站的保密后,下次你想存也没有的存了。 下面是恢复方法: If you’re a Google Chrome user and you’ve ever hit “Never for this site” by accident (or have girlfriend who does so consistently), it’s a little tricky finding out how to edit these “Save Password” exceptions. It’s pretty clear for Windows’ Chrome:A little snooping reveals that Chrome keeps its login information in a… Read More
Android Visual Machine http://www.android-x86.org/download http://osxdaily.com/2012/02/23/android-4-ics-virtualbox/ 早上玩了玩Android4.0的虚拟机,真的没有意思。测试还可以,但应用没有意思。学学Linux的时候再用一下可以。… Read More
About getExternalFilesDir() It is always good practice to use the getExtennalFilesDir() method to find the location of the SD Card on an Android device.(Don’t fix using \sdcard). Because Android can run on a large number of devices with different specications, the location of the SD Card directory may not always be in /sdcard.… Read More
Integer.toString(int i) vs String.valueOf(int i) In String type we have several method valueOf static String valueOf(boolean b) static String valueOf(char c) static String valueOf(char[] data) static String valueOf(char[] data, int offset, int count) static String valueOf(double d) static String valueOf(float f) static String valueOf(int i) static String valueOf(long l) static String valueOf(Object obj) As we can see those method are… Read More
Manipulating Broadcast Receivers On Demand The simplest way to monitor device state changes is to create aBroadcastReceiver for each state you’re monitoring and register each of them in your application manifest. Then within each of these receivers you simply reschedule your recurring alarms based on the current device state. A side-effect of this approach is that your app will wake the… Read More
Android 开发人员必须掌握的 10 个开发工具 –转自oschina.net Android SDK 本身包含很多帮助开发人员设计、开发、测试和发布 Android 应用的工具,在本文中,我们将讨论 10 个最常用的工具。 #1: Eclipse ADT Eclipse ADT 是 Eclipse 平台下用来开发 Android 应用程序的插件。 #2: The SDK and AVD Manager 该工具包含很多重要的功能,包括管理不同的 Android SDK 版本(构建目标),你知道的 Android 的版本众多,API上有些兼容性问题。另外该工具还用于管理 Android 虚拟设备配置 (AVD) ,用来配置模拟器。 #3: Android Debug Bridge adb(Android Debug Bridge)是Android提供的一个通用的调试工具,借助这个工具,我们可以管理设备或手机模拟器的状态。 还可以进行以下的操作: 1、快速更新设备或手机模拟器中的代码,如应用或Android系统升级; 2、在设备上运行shell命令; 3、管理设备或手机模拟器上的预定端口; 4、在设备或手机模拟器上复制或粘贴文件; #4: Dalvik Debug Monitor Server DDMS 的全称是Dalvik Debug Monitor Service,它为我们提供例如:为测试设备截屏,针对特定的进程查看正在运行的线程以及堆信息、Logcat、广播状态信息、模拟电话呼叫、接收SMS、虚拟地理坐标等等。 #5:… Read More
android的国际化和本地化 internationalization (国际化)简称 i18n,因为在i和n之间还有18个字符,localization(本地化 ),简称L10n。 一般说明一个地区的语言时,用 语言_地区的形式,如 zh_CN, zh_TW. 各国语言缩写 http://www.loc.gov/standards/iso639-2/php/code_list.php,国家和地区简写http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html android 对i18n和L10n提供了非常好的支持。android没有专门的API来提供国际化,而是通过对不同resource的命名来达到国际化,同时这种命名方法还可用于对硬件的区分,如不同的新视屏用不同的图片。 在eclipse的工程中,res目录有默认几项resource,如 drawable, layout,menu,values 其余还有 res/anim/ 用来放置动画 res/xml/ 用来放置style theme等xml定义。 res/raw/ 用来放置data数据 我们引用这些resource时候,在java代码中是通过R.resource_type.resource_name的方式来使用,如setTitle(R.string.main_title); 还有一种是在xml中直接引用,如 <TextView android:id =”@+id/hello_view” android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:text=”@string/hello” /> 引用了名字为hello的字符串。当程序运行时,通过Resource类会装载strings.xml中名字为hello的字符串。但Resource类装载strings.xml时会根据当前手机的设置来选择装载哪一个xml文件。这些手机设置有 MCC and MNC, Language and region, Screen dimensions, Wider/taller screens, Screen orientation,Screen pixel density, Touchscreen type,… Read More
Code Style Guidelines for Contributors The rules below are not guidelines or recommendations, but strict rules. Contributions to Android generally will not be accepted if they do not adhere to these rules. Not all existing code follows these rules, but all new code is expected to. In This Document Code Style Guidelines for Contributors Java Language Rules Don’t Ignore Exceptions Don’t Catch… Read More