其實我有2個片段,一個是Menu,另一個是Content Fragment。現在我需要將Google Map添加到Content Fragment。我已經添加了ABS的Google Maps Plugin。但是如何在碎片中使用它。我可以ActionBarSherlock Tabs + Fragments + MapView
public class MapActivity extends SherlockMapActivity
而是如何使它在做了Fragment
,如:public class MapFragment extends SherlockMapFragment
其實我想在一個片段(比如片段B)使用兩個選項卡,並顯示在一個一定的TextView其他片段中的標籤和mapview。我有FragmentActivy(Home),它有兩個片段A和B.A是滑動菜單,B是內容菜單。
可以在片段中顯示兩個選項卡,並在兩個選項卡中使用兩種不同的佈局?
我不能extends SherlockMapActivity
,因爲我需要在Fragment
:(
偉大的教程。有效。但是,當通過滑動菜單選擇其他片段時,我現在正在丟失它的內容。如何避免這種情況? :( –
這真的取決於你的滑動菜單的實現 –
我正在使用這個https://github.com/jfeinstein10/SlidingMenu –