Search in sources :

Example 1 with TagsAdapter

use of io.jawg.osmcontributor.ui.adapters.TagsAdapter in project osm-contributor by jawg.

the class EditPoiFragment method onPoiForEditionLoadedEvent.

/*=========================================*/
/*------------------EVENTS-----------------*/
/*=========================================*/
@Subscribe(threadMode = ThreadMode.MAIN)
public void onPoiForEditionLoadedEvent(PoiForEditionLoadedEvent event) {
    poi = event.getPoi();
    // Set the poitype name in the action bar
    ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar();
    if (actionBar != null) {
        actionBar.setSubtitle(poi.getType().getName());
    }
    Log.i(TAG, "onPoiForEditionLoadedEvent: " + poi);
    tagsAdapter = new TagsAdapter(poi, tagItemList, getActivity(), event.getValuesMap(), sharedPreferences.getBoolean(getString(R.string.shared_prefs_expert_mode), false));
    recyclerView.setAdapter(tagsAdapter);
}
Also used : TagsAdapter(io.jawg.osmcontributor.ui.adapters.TagsAdapter) AppCompatActivity(android.support.v7.app.AppCompatActivity) ActionBar(android.support.v7.app.ActionBar) Subscribe(org.greenrobot.eventbus.Subscribe)

Aggregations

ActionBar (android.support.v7.app.ActionBar)1 AppCompatActivity (android.support.v7.app.AppCompatActivity)1 TagsAdapter (io.jawg.osmcontributor.ui.adapters.TagsAdapter)1 Subscribe (org.greenrobot.eventbus.Subscribe)1