Add options menu's
This commit is contained in:
parent
aa3bf5f996
commit
2501f5475a
3 changed files with 11 additions and 0 deletions
|
@ -9,6 +9,8 @@
|
|||
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
|
||||
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
||||
-->
|
||||
<string name="selected_track">Track</string>
|
||||
<string name="my_tracks">All tracks</string>
|
||||
<string name="my_favorites">My Favorites</string>
|
||||
<string name="my_data_Button">My Data</string>
|
||||
<string name="my_data_activity">My Data</string>
|
||||
|
|
|
@ -31,6 +31,8 @@ import com.actionbarsherlock.view.Window;
|
|||
public class FavouritesActivity extends SherlockFragmentActivity {
|
||||
|
||||
private static final String FAVOURITES_INFO = "FAVOURITES_INFO";
|
||||
private static final String TRACKS = "TRACKS";
|
||||
private static final String SELECTED_TRACK = "SELECTED_TRACK";
|
||||
private TabsAdapter mTabsAdapter;
|
||||
|
||||
|
||||
|
@ -55,7 +57,12 @@ public class FavouritesActivity extends SherlockFragmentActivity {
|
|||
mTabsAdapter = new TabsAdapter(this, tabHost, mViewPager, settings);
|
||||
mTabsAdapter.addTab(tabHost.newTabSpec(FAVOURITES_INFO).setIndicator(getString(R.string.my_favorites)),
|
||||
FavouritesTreeFragment.class, null);
|
||||
mTabsAdapter.addTab(tabHost.newTabSpec(TRACKS).setIndicator(getString(R.string.my_tracks)),
|
||||
FavouritesTreeFragment.class, null);
|
||||
mTabsAdapter.addTab(tabHost.newTabSpec(SELECTED_TRACK).setIndicator(getString(R.string.selected_track)),
|
||||
FavouritesTreeFragment.class, null);
|
||||
tabHost.setCurrentTab(tab);
|
||||
|
||||
// getSupportActionBar().setIcon(R.drawable.tab_search_favorites_icon);
|
||||
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ public abstract class OsmandExpandableListFragment extends SherlockFragment impl
|
|||
return (OsmandApplication)getActivity().getApplication();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, Bundle savedInstanceState) {
|
||||
View v = createView(inflater, container);
|
||||
listView = (ExpandableListView) v.findViewById(android.R.id.list);
|
||||
|
@ -38,6 +39,7 @@ public abstract class OsmandExpandableListFragment extends SherlockFragment impl
|
|||
}
|
||||
|
||||
public View createView(android.view.LayoutInflater inflater, android.view.ViewGroup container) {
|
||||
setHasOptionsMenu(true);
|
||||
return inflater.inflate(R.layout.expandable_list, container, false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue