發現ANDROID 3.0中啟動模擬器時太慢了,終於找到兩個TIPS可以稍微加快下1 設定模擬器的可用記憶體大點(當然你自己機器記憶體大點哦),比如設定.android\avd\device1.avd\config.ini中hw.ramSize=10242 在啟動模擬器時,在啟動選項中,勾選lanuch from snapshot和save from snapshot,然後啟動模擬器到案頭狀態,然後此時關掉模擬器,再啟動時,在啟動選項中,只選擇lanuch from snapshot速度會快點
主程式:public class AndroCamera extends Activity { private static final int IMAGE_CAPTURE = 0; private Button startBtn; private Uri imageUri; private ImageView imageView; /** Called when the activity is first created. * sets the
下面的這個例子中,實現了讀取使用者的所在位置座標的功能:public class Activity01 extends MapActivity{public MapController mapController; public MyLocationOverlay myPosition; public MapView myMapView; private static final int ZOOM_IN=Menu.FIRST; private static final
在android調用webservice時,經常要對json的格式進行處理,現在有兩種方法去處理:1 使用JSONObject 和 JSONTokener去解析2 使用GSON庫 先看第一種方法,假如有如下的json字串:{“name”: “myName”,“message”: ["myMessage1","myMessage2"],“place”: “myPlace”,“date”: ”thisDate”}第一種解決方案: public class main extends
public class AndroidGooleMapDemo extends MapActivity {/** Called when the activity is first created. */private MapView mMapView;private MapController mMapController;private GeoPoint mGeoPoint;public void onCreate(Bundle savedInstanceState)
android系統其實是linux,那麼可以在程式中去調用cat /proc/meminfo和cat/proc/cpuino去查看記憶體和CPU等情況的,下面是程式:public class CpuSpeed extends Activity { /** Called when the activity is first created. */ private TextView cpuInfo; private TextView memoryInfo; public
小結下android中的autocomplete和sqlite的知識點,順便複習下。1 SQLITE協助類 public class SQLiteCountryAssistant extends SQLiteOpenHelper {private static final String DB_NAME = "usingsqlite.db";private static final int DB_VERSION_NUMBER = 1;private static final String