自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(19)
  • 资源 (2)
  • 收藏
  • 关注

原创 Working in the Background

Creating a Serviceimport android.app.Service;import android.content.Intent;import android.os.IBinder;public class MyService extends Service {@Overridepublic void onCreate() {// TODO: Actions to perform when service is created.}@Overridepublic IBinder onBin

2010-06-07 13:24:00 985 1

原创 Maps,Geocoding,and Location-Based Services

SELECTING A LOCATION PROVIDERTo get an instance of a specific provider, call getProvider, passing in the name:String providerName = LocationManager.GPS_PROVIDER;LocationProvider gpsProvider;gpsProvider = locationManager.getProvider(providerName);Finding the

2010-06-04 17:03:00 833

原创 CREATING A NEW CONTENT PROVIDER

Creating a new Content Providerimport android.content.*;import android.database.Cursor;import android.net.Uri;import android.database.SQLException;public class MyProvider extends ContentProvider {@Overridepublic boolean onCreate() {// TODO Construct the un

2010-06-03 17:50:00 823 1

原创 WORKING WITH SQLite DATABASES

Skeleton code for a standard database adapter implementationimport android.content.Context;import android.database.*;import android.database.sqlite.*;import android.database.sqlite.SQLiteDatabase.CursorFactory;import android.util.Log;public class MyDBAdapt

2010-06-03 17:17:00 472 1

原创 Files and prefernces

<br />Using the SharedPreferences class you can create named maps of key/value pairs within your<br />application that can be shared among application components running in the same application<br />context.<br /> <br /> call getSharedPreferences on the ap

2010-06-02 15:07:00 669

原创 INTRODUCING DIALOGS

<br />There are three ways to implement a dialog in Android: .<br /> <br />1. Using the Dialog class (or its extensions) As well<br />as the general-purpose AlertDialog class, Android<br />includes a number of specialist classes that extend<br />Dialog.<br

2010-06-02 11:32:00 420

原创 USING INTERNET RESOURCES

<br />There are a number of benefits to creating thick- and thin-client native applications rather than relying<br />on entirely web-based solutions:<br />Bandwidth  Caching  Native features<br /> <br />Mobile Internet GPRS, EDGE, and 3G Internet access is

2010-06-02 11:19:00 428

原创 INTRODUCING ADAPTERS

<br /> <br />Adapters are bridging classes that bind data to Views (such as List Views) used in the user interface.<br /> <br />Some Native Adapters<br /><br />ArrayAdapter The Array Adapter uses generics to bind an Adapter View to an array of<br />objects

2010-06-02 11:08:00 403

原创 INTRODUCING PENDING INTENTS

<br />// Start an Activity<br />Intent startActivityIntent = new Intent(this, MyOtherActivity.class);<br />PendingIntent.getActivity(this, 0, startActivityIntent, 0);<br />// Broadcast an Intent<br />Intent broadcastIntent = new Intent(NEW_LIFEFORM_DETECTE

2010-06-02 10:57:00 289

原创 Using Intents to Broadcast Events

<br />public static final String NEW_LIFEFORM_DETECTED ="com.paad.action.NEW_LIFEFORM";<br /> <br />Broadcasting an Intent<br /> <br />Intent intent = new Intent(NEW_LIFEFORM_DETECTED);<br />intent.putExtra("lifeformName", lifeformType);<br />intent.putExt

2010-06-02 10:34:00 376

原创 Text link

<br />Linkify<br />TextView textView = (TextView)findViewById(R.id.myTextView);<br />Linkify.addLinks(textView, Linkify.WEB_URLS|Linkify.EMAIL_ADDRESSES);<br /> <br />Use linkify in xml<br /> <br /><TextView<br />android:layout_width="fill_parent"<br />and

2010-06-02 10:17:00 505

原创 使用Intent filter 匹配相应的Activity or services

<br />1. action 用action来匹配<br />2. action 相同时用category filter<br />3. 前两者都相同时用 data来filter  <br /> <br />例如:<br /><activity android:name=".abc" android:label="@string/app_name"><br /><intent-filter><br /><action android:name="android.intent.action.PICK"></

2010-06-02 10:02:00 416

原创 Intent info

<br />Description<br /> <br />  1 明确指定start an activity or service<br />  2 broadcast that an event (or action) has occurred<br />  3 Declare your intention that an Activity or Service be started to perform an action, usually<br />with (or on) a particular

2010-06-01 17:53:00 326

原创 Android menu system

1.Icon menu icon&short text2.Expaned menu3.Submenuscreate icon menupublic boolean onCreateOptionsMenu(Menu menu){}// Create a new check box item.menu.add(0, CHECKBOX_ITEM, Menu.NONE, "CheckBox").setCheckable(true);// Create a radio button group.menu.add(RB

2010-06-01 16:52:00 751

原创 Activity 生命周期

Activty lifetimes like thisonCreate--->onRestart----->onStart---->onResume---->onRestoreInstanceState---->onSaveInstanceState---->onPause----->onStop---->onDestory其中onResume到onPause为active周期onStart到onStop 为invisible onCreate 整个生命周的第一个环节,用来初始化Activity 和 inc

2010-06-01 10:59:00 357

原创 get resource from xml

<br />Resources myResources = getResources();<br />CharSequence styledText = myResources.getText(R.string.stop_message);<br />Drawable icon = myResources.getDrawable(R.drawable.app_icon);<br />int opaqueBlue = myResources.getColor(R.color.opaque_blue);<br

2010-05-31 17:41:00 431

原创 styles and theme

<br /><?xml version="1.0" encoding="utf-8"?><br /><resources><br /><style name="BaseText"><br /><item name="android:textSize">14sp</item><br /><item name="android:textColor">#111</item><br /></style><br /><style name="SmallText" parent="BaseText"><br /><it

2010-05-31 17:00:00 285

原创 Android string format with html

<br /><string name="stop_message"><b>Stop</b>. %1$s</string><br /> <br /> <br />like this<br /> <br />String rString = getString(R.string.stop_message);<br />String fString = String.format(rString, "Collaborate and listen.");<br />CharSequence styled

2010-05-31 16:55:00 907

原创 Android simple values

android simple values

2010-05-31 16:53:00 342

Android开发教程.pdf

最好的中文Android开发教程 全面解析android应用开发

2010-09-13

liferay developersguide4.0

portal admin guid and portlet development guide

2009-08-24

空空如也

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

TA关注的人

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