Search in sources :

Example 1 with ROUTING

use of net.osmand.plus.importfiles.ImportHelper.ImportType.ROUTING in project Osmand by osmandapp.

the class SelectNavProfileBottomSheet method createOfflineFooter.

private void createOfflineFooter() {
    items.add(new LongDescriptionItem(app.getString(R.string.osmand_routing_promo)));
    addButtonItem(R.string.import_routing_file, R.drawable.ic_action_folder, v -> {
        MapActivity mapActivity = getMapActivity();
        if (mapActivity == null) {
            return;
        }
        mapActivity.getImportHelper().chooseFileToImport(ROUTING, (CallbackWithObject<Builder>) builder -> {
            updateMenuItems();
            return false;
        });
    });
}
Also used : Bundle(android.os.Bundle) NonNull(androidx.annotation.NonNull) ImageView(android.widget.ImageView) OnlineRoutingHelper(net.osmand.plus.onlinerouting.OnlineRoutingHelper) ProfileDataObject(net.osmand.plus.profiles.data.ProfileDataObject) R(net.osmand.plus.R) NONE_VEHICLE(net.osmand.plus.onlinerouting.engine.OnlineRoutingEngine.NONE_VEHICLE) Drawable(android.graphics.drawable.Drawable) FragmentActivity(androidx.fragment.app.FragmentActivity) EngineParameter(net.osmand.plus.onlinerouting.EngineParameter) ApplicationMode(net.osmand.plus.settings.backend.ApplicationMode) ArrayList(java.util.ArrayList) UiUtilities(net.osmand.plus.utils.UiUtilities) CallbackWithObject(net.osmand.CallbackWithObject) RoutingDataUtils(net.osmand.plus.profiles.data.RoutingDataUtils) Fragment(androidx.fragment.app.Fragment) LongDescriptionItem(net.osmand.plus.base.bottomsheetmenu.simpleitems.LongDescriptionItem) View(android.view.View) OnlineRoutingEngine(net.osmand.plus.onlinerouting.engine.OnlineRoutingEngine) OnlineRoutingEngineFragment(net.osmand.plus.onlinerouting.ui.OnlineRoutingEngineFragment) TextRadioItem(net.osmand.plus.widgets.multistatetoggle.TextToggleButton.TextRadioItem) Build(android.os.Build) Algorithms(net.osmand.util.Algorithms) ContextCompat(androidx.core.content.ContextCompat) ROUTING(net.osmand.plus.importfiles.ImportHelper.ImportType.ROUTING) AndroidUtils(net.osmand.plus.utils.AndroidUtils) FragmentManager(androidx.fragment.app.FragmentManager) ProfilesGroup(net.osmand.plus.profiles.data.ProfilesGroup) CompoundButton(android.widget.CompoundButton) BaseBottomSheetItem(net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem) LayoutInflater(android.view.LayoutInflater) PredefinedProfilesGroup(net.osmand.plus.profiles.data.PredefinedProfilesGroup) EngineType(net.osmand.plus.onlinerouting.engine.EngineType) List(java.util.List) TextView(android.widget.TextView) Nullable(androidx.annotation.Nullable) TitleItem(net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem) Builder(net.osmand.router.RoutingConfiguration.Builder) MapActivity(net.osmand.plus.activities.MapActivity) RoutingDataObject(net.osmand.plus.profiles.data.RoutingDataObject) LongDescriptionItem(net.osmand.plus.base.bottomsheetmenu.simpleitems.LongDescriptionItem) Builder(net.osmand.router.RoutingConfiguration.Builder) MapActivity(net.osmand.plus.activities.MapActivity)

Aggregations

Drawable (android.graphics.drawable.Drawable)1 Build (android.os.Build)1 Bundle (android.os.Bundle)1 LayoutInflater (android.view.LayoutInflater)1 View (android.view.View)1 CompoundButton (android.widget.CompoundButton)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 NonNull (androidx.annotation.NonNull)1 Nullable (androidx.annotation.Nullable)1 ContextCompat (androidx.core.content.ContextCompat)1 Fragment (androidx.fragment.app.Fragment)1 FragmentActivity (androidx.fragment.app.FragmentActivity)1 FragmentManager (androidx.fragment.app.FragmentManager)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 CallbackWithObject (net.osmand.CallbackWithObject)1 R (net.osmand.plus.R)1 MapActivity (net.osmand.plus.activities.MapActivity)1 BaseBottomSheetItem (net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem)1