Search in sources :

Example 1 with ScrollFixMapView

use of im.tny.segvault.disturbances.ui.util.ScrollFixMapView in project underlx by underlx.

the class StationLobbyFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    mapLayoutReady = false;
    // Inflate the layout for this fragment
    View view = inflater.inflate(R.layout.fragment_station_lobby, container, false);
    IntentFilter filter = new IntentFilter();
    filter.addAction(StationActivity.ACTION_MAIN_SERVICE_BOUND);
    LocalBroadcastManager bm = LocalBroadcastManager.getInstance(getContext());
    bm.registerReceiver(mBroadcastReceiver, filter);
    lobbiesLayout = (LinearLayout) view.findViewById(R.id.lobbies_layout);
    lobbyScrollView = (NestedScrollView) view.findViewById(R.id.lobby_scroll_view);
    mapView = (ScrollFixMapView) view.findViewById(R.id.map_view);
    mapView.onCreate(savedInstanceState);
    // needed to get the map to display immediately
    mapView.onResume();
    try {
        MapsInitializer.initialize(getActivity().getApplicationContext());
    } catch (Exception e) {
        e.printStackTrace();
    }
    update();
    return view;
}
Also used : IntentFilter(android.content.IntentFilter) ScrollFixMapView(im.tny.segvault.disturbances.ui.util.ScrollFixMapView) View(android.view.View) NestedScrollView(android.support.v4.widget.NestedScrollView) LobbyView(im.tny.segvault.disturbances.ui.widget.LobbyView) LocalBroadcastManager(android.support.v4.content.LocalBroadcastManager)

Example 2 with ScrollFixMapView

use of im.tny.segvault.disturbances.ui.util.ScrollFixMapView in project underlx by underlx.

the class StationPOIFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    mapLayoutReady = false;
    // Inflate the layout for this fragment
    View view = inflater.inflate(R.layout.fragment_station_poi, container, false);
    IntentFilter filter = new IntentFilter();
    filter.addAction(StationActivity.ACTION_MAIN_SERVICE_BOUND);
    LocalBroadcastManager bm = LocalBroadcastManager.getInstance(getContext());
    bm.registerReceiver(mBroadcastReceiver, filter);
    poisLayout = (LinearLayout) view.findViewById(R.id.pois_layout);
    poiScrollView = (NestedScrollView) view.findViewById(R.id.poi_scroll_view);
    mapView = (ScrollFixMapView) view.findViewById(R.id.map_view);
    mapView.onCreate(savedInstanceState);
    // needed to get the map to display immediately
    mapView.onResume();
    try {
        MapsInitializer.initialize(getActivity().getApplicationContext());
    } catch (Exception e) {
        e.printStackTrace();
    }
    update();
    return view;
}
Also used : IntentFilter(android.content.IntentFilter) ScrollFixMapView(im.tny.segvault.disturbances.ui.util.ScrollFixMapView) View(android.view.View) NestedScrollView(android.support.v4.widget.NestedScrollView) POIView(im.tny.segvault.disturbances.ui.widget.POIView) LocalBroadcastManager(android.support.v4.content.LocalBroadcastManager)

Aggregations

IntentFilter (android.content.IntentFilter)2 LocalBroadcastManager (android.support.v4.content.LocalBroadcastManager)2 NestedScrollView (android.support.v4.widget.NestedScrollView)2 View (android.view.View)2 ScrollFixMapView (im.tny.segvault.disturbances.ui.util.ScrollFixMapView)2 LobbyView (im.tny.segvault.disturbances.ui.widget.LobbyView)1 POIView (im.tny.segvault.disturbances.ui.widget.POIView)1