根據前一篇改寫MainActivity的兩個方法decideDevice()和decideFragment()
void decideDevice()
{
switch (getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK)
{
根據前一篇改寫MainActivity的兩個方法decideDevice()和decideFragment()
void decideDevice()
{
switch (getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK)
{
1.利用FrameLayout把Fragment包起來~如下:
<FrameLayout
android:id="@+id/frameLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
1.在MainActivity類別最外面建立
Map<String, String> map = new HashMap<String, String>();
傳遞String參數
2.建立一個getMap()方法
public Map getMap()
1.製作Person類別 並 implemens Parcelable介面
2.定義屬性name等等..
3.實作Parcelable內的方法
protected Person(Parcel in) {
name = in.readString();
GoogleMap V2使用+ViewPager+連線判斷+GPS在6.0權限用法