Fix space with tab in groups fragment

This commit is contained in:
PavelRatushnyi 2017-09-20 13:43:09 +03:00
parent 0eccab559c
commit 1ae780fa07

View file

@ -22,43 +22,43 @@ import net.osmand.util.MapUtils;
public class MapMarkersGroupsFragment extends Fragment implements OsmAndCompassListener, OsmAndLocationListener { public class MapMarkersGroupsFragment extends Fragment implements OsmAndCompassListener, OsmAndLocationListener {
public static final String TAG = "MapMarkersGroupsFragment"; public static final String TAG = "MapMarkersGroupsFragment";
private MapMarkersGroupsAdapter adapter; private MapMarkersGroupsAdapter adapter;
private Float heading; private Float heading;
private Location location; private Location location;
private boolean locationUpdateStarted; private boolean locationUpdateStarted;
@Nullable @Nullable
@Override @Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
final RecyclerView recyclerView = new RecyclerView(getContext()); final RecyclerView recyclerView = new RecyclerView(getContext());
recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
final MapActivity mapActivity = (MapActivity) getActivity(); final MapActivity mapActivity = (MapActivity) getActivity();
adapter = new MapMarkersGroupsAdapter(mapActivity); adapter = new MapMarkersGroupsAdapter(mapActivity);
recyclerView.setAdapter(adapter); recyclerView.setAdapter(adapter);
return recyclerView; return recyclerView;
} }
void updateAdapter() { void updateAdapter() {
if (adapter != null) { if (adapter != null) {
adapter.notifyDataSetChanged(); adapter.notifyDataSetChanged();
} }
} }
@Override @Override
public void onResume() { public void onResume() {
super.onResume(); super.onResume();
adapter.setScreenOrientation(DashLocationFragment.getScreenOrientation(getActivity())); adapter.setScreenOrientation(DashLocationFragment.getScreenOrientation(getActivity()));
startLocationUpdate(); startLocationUpdate();
} }
@Override @Override
public void onPause() { public void onPause() {
super.onPause(); super.onPause();
stopLocationUpdate(); stopLocationUpdate();
} }
void startLocationUpdate() { void startLocationUpdate() {
OsmandApplication app = getMyApplication(); OsmandApplication app = getMyApplication();