Code Library

Free Source Code, Program Tips and Technology Documents

Hello, MapView
Learning Address: http://androidappdocs.appspot.com/guide/tutorials/views/hello-mapview.html

HelloItemizedOverlay.java Code

package com.example.test; import java.util.ArrayList; import android.graphics.drawable.Drawable; import com.google.android.maps.ItemizedOverlay; import com.google.android.maps.OverlayItem; public class HelloItemizedOverlay extends ItemizedOverlay (private ArrayList <OverlayItem> mOverlays = new ArrayList <OverlayItem> (); public HelloItemizedOverlay (Drawable defaultMarker) (super (boundCenterBottom (defaultMarker ));// TODO Auto-generated constructor stub) @ Overridepublic int size [...]

Eclipse developed Android, TableLayout (study 4)

Hello, TableLayout

A TableLayout is a ViewGroup that will Lay child View elements into rows and columns.

Start a new project / Activity called HelloTableLayout.
Open the layout file. Make it like so:

1.0 & quot ; encoding = & quot ; utf – 8 & [...]

Hello, RelativeLayout

A RelativeLayout is a ViewGroup that allows you to layout child elements in positions relative to the parent or siblings elements.

Start a new project / Activity called HelloRelativeLayout.
Open the layout file. Make it like so:

1.0 & quot ; encoding = & [...]

Eclipse developed Android, LinearLayout (study 2)

A LinearLayout is a GroupView that will Lay child View elements vertically or horizontally.

Start a new project / Activity called HelloLinearLayout.
Open the layout file. Make it like so:

<? xml version = "1.0" encoding = "utf-8"?> <LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" android: orientation = "vertical" android: layout_width [...]

Original From: http://blog.sina.com.cn/s/blog_4ca975460100g5yj.html

Android if they had to switch on the screen solution
The time in the development of the game, some games are only horizontal screen play, so when placed in the erection of mobile phone, to keep the game screen is still horizontal screen. To achieve [...]

Android custom ContentProvider

Custom ContentProvider —- The content provider is used to deal with data sources, while the content parser (ContentResolver) responsible for operating the specific content provider. The data source can be a file or database. More content resolver can simultaneously access the content provider because it is thread – safe. [...]