fix for android 2.3 - disable action-bar spinner-button for now.
This commit is contained in:
parent
06251da1b8
commit
99e361d8a0
@ -34,6 +34,7 @@ import android.content.SharedPreferences;
|
|||||||
import android.location.Criteria;
|
import android.location.Criteria;
|
||||||
import android.location.Location;
|
import android.location.Location;
|
||||||
import android.location.LocationManager;
|
import android.location.LocationManager;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.PowerManager;
|
import android.os.PowerManager;
|
||||||
import android.os.PowerManager.WakeLock;
|
import android.os.PowerManager.WakeLock;
|
||||||
@ -59,7 +60,7 @@ import android.widget.ToggleButton;
|
|||||||
* location. A simple file browser for selecting the map file is also included. Some preferences can be adjusted via the
|
* location. A simple file browser for selecting the map file is also included. Some preferences can be adjusted via the
|
||||||
* {@link EditPreferences} activity.
|
* {@link EditPreferences} activity.
|
||||||
*/
|
*/
|
||||||
public class TileMap extends MapActivity implements ActionBar.OnNavigationListener {
|
public class TileMap extends MapActivity { // implements ActionBar.OnNavigationListener {
|
||||||
private static final String BUNDLE_CENTER_AT_FIRST_FIX = "centerAtFirstFix";
|
private static final String BUNDLE_CENTER_AT_FIRST_FIX = "centerAtFirstFix";
|
||||||
private static final String BUNDLE_SHOW_MY_LOCATION = "showMyLocation";
|
private static final String BUNDLE_SHOW_MY_LOCATION = "showMyLocation";
|
||||||
private static final String BUNDLE_SNAP_TO_LOCATION = "snapToLocation";
|
private static final String BUNDLE_SNAP_TO_LOCATION = "snapToLocation";
|
||||||
@ -320,14 +321,16 @@ public class TileMap extends MapActivity implements ActionBar.OnNavigationListen
|
|||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||||
mSpinnerAdapter = ArrayAdapter.createFromResource(this,
|
mSpinnerAdapter = ArrayAdapter.createFromResource(this,
|
||||||
R.array.view_sections,
|
R.array.view_sections,
|
||||||
android.R.layout.simple_spinner_dropdown_item);
|
android.R.layout.simple_spinner_dropdown_item);
|
||||||
ActionBar actionBar = getActionBar();
|
ActionBar actionBar = getActionBar();
|
||||||
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
|
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
|
||||||
|
|
||||||
actionBar.setListNavigationCallbacks(mSpinnerAdapter, this);
|
// actionBar.setListNavigationCallbacks(mSpinnerAdapter, this);
|
||||||
actionBar.setDisplayShowTitleEnabled(false);
|
actionBar.setDisplayShowTitleEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
// getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
|
// getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
|
||||||
// getActionBar().setBackgroundDrawable(
|
// getActionBar().setBackgroundDrawable(
|
||||||
@ -563,6 +566,7 @@ public class TileMap extends MapActivity implements ActionBar.OnNavigationListen
|
|||||||
mapDatabaseInternalNew = MapDatabaseInternal.POSTGIS_READER;
|
mapDatabaseInternalNew = MapDatabaseInternal.POSTGIS_READER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// mapDatabaseInternalNew = MapDatabaseInternal.JSON_READER;
|
||||||
Log.d("VectorTileMap", "set map database " + mapDatabaseInternalNew);
|
Log.d("VectorTileMap", "set map database " + mapDatabaseInternalNew);
|
||||||
|
|
||||||
if (mapDatabaseInternalNew != mMapDatabaseInternal) {
|
if (mapDatabaseInternalNew != mMapDatabaseInternal) {
|
||||||
@ -718,9 +722,9 @@ public class TileMap extends MapActivity implements ActionBar.OnNavigationListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
// @Override
|
||||||
public boolean onNavigationItemSelected(int arg0, long arg1) {
|
// public boolean onNavigationItemSelected(int arg0, long arg1) {
|
||||||
// TODO Auto-generated method stub
|
// // TODO Auto-generated method stub
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user