Move method, add small changes
This commit is contained in:
parent
74f37b6c5d
commit
f8fb7279d6
2 changed files with 12 additions and 17 deletions
|
@ -117,9 +117,7 @@
|
||||||
android:id="@+id/markers_list_container"
|
android:id="@+id/markers_list_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/measurement_tool_points_list_container_height"
|
android:layout_height="@dimen/measurement_tool_points_list_container_height"
|
||||||
android:background="@color/ctx_menu_info_view_bg_dark"
|
android:background="@color/ctx_menu_info_view_bg_dark">
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible">
|
|
||||||
|
|
||||||
<android.support.v7.widget.RecyclerView
|
<android.support.v7.widget.RecyclerView
|
||||||
android:id="@+id/markers_recycler_view"
|
android:id="@+id/markers_recycler_view"
|
||||||
|
|
|
@ -128,9 +128,6 @@ public class PlanRouteFragment extends Fragment {
|
||||||
View view = View.inflate(new ContextThemeWrapper(getContext(), themeRes), R.layout.fragment_plan_route, null);
|
View view = View.inflate(new ContextThemeWrapper(getContext(), themeRes), R.layout.fragment_plan_route, null);
|
||||||
|
|
||||||
mainView = view.findViewById(R.id.main_view);
|
mainView = view.findViewById(R.id.main_view);
|
||||||
if (portrait) {
|
|
||||||
AndroidUtils.setBackground(mapActivity, mainView, nightMode, R.drawable.bg_bottom_menu_light, R.drawable.bg_bottom_menu_dark);
|
|
||||||
}
|
|
||||||
|
|
||||||
distanceTv = (TextView) mainView.findViewById(R.id.markers_distance_text_view);
|
distanceTv = (TextView) mainView.findViewById(R.id.markers_distance_text_view);
|
||||||
timeTv = (TextView) mainView.findViewById(R.id.markers_time_text_view);
|
timeTv = (TextView) mainView.findViewById(R.id.markers_time_text_view);
|
||||||
|
@ -144,6 +141,8 @@ public class PlanRouteFragment extends Fragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (portrait) {
|
if (portrait) {
|
||||||
|
AndroidUtils.setBackground(mapActivity, mainView, nightMode, R.drawable.bg_bottom_menu_light, R.drawable.bg_bottom_menu_dark);
|
||||||
|
|
||||||
((ImageView) mainView.findViewById(R.id.up_down_icon)).setImageDrawable(getContentIcon(R.drawable.ic_action_arrow_up));
|
((ImageView) mainView.findViewById(R.id.up_down_icon)).setImageDrawable(getContentIcon(R.drawable.ic_action_arrow_up));
|
||||||
|
|
||||||
mainView.findViewById(R.id.up_down_row).setOnClickListener(new View.OnClickListener() {
|
mainView.findViewById(R.id.up_down_row).setOnClickListener(new View.OnClickListener() {
|
||||||
|
@ -212,8 +211,6 @@ public class PlanRouteFragment extends Fragment {
|
||||||
listContainer.getLayoutParams().height = listContainerH;
|
listContainer.getLayoutParams().height = listContainerH;
|
||||||
listContainer.requestLayout();
|
listContainer.requestLayout();
|
||||||
|
|
||||||
showMarkersList();
|
|
||||||
|
|
||||||
ViewTreeObserver obs = mainView.getViewTreeObserver();
|
ViewTreeObserver obs = mainView.getViewTreeObserver();
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||||
obs.removeOnGlobalLayoutListener(this);
|
obs.removeOnGlobalLayoutListener(this);
|
||||||
|
@ -315,15 +312,6 @@ public class PlanRouteFragment extends Fragment {
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void optionsOnClick() {
|
|
||||||
MapActivity mapActivity = getMapActivity();
|
|
||||||
if (mapActivity != null) {
|
|
||||||
PlanRouteOptionsBottomSheetDialogFragment fragment = new PlanRouteOptionsBottomSheetDialogFragment();
|
|
||||||
fragment.setListener(createOptionsFragmentListener());
|
|
||||||
fragment.show(mapActivity.getSupportFragmentManager(), PlanRouteOptionsBottomSheetDialogFragment.TAG);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroyView() {
|
public void onDestroyView() {
|
||||||
super.onDestroyView();
|
super.onDestroyView();
|
||||||
|
@ -509,6 +497,15 @@ public class PlanRouteFragment extends Fragment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void optionsOnClick() {
|
||||||
|
MapActivity mapActivity = getMapActivity();
|
||||||
|
if (mapActivity != null) {
|
||||||
|
PlanRouteOptionsBottomSheetDialogFragment fragment = new PlanRouteOptionsBottomSheetDialogFragment();
|
||||||
|
fragment.setListener(createOptionsFragmentListener());
|
||||||
|
fragment.show(mapActivity.getSupportFragmentManager(), PlanRouteOptionsBottomSheetDialogFragment.TAG);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void updateText() {
|
private void updateText() {
|
||||||
MapActivity mapActivity = getMapActivity();
|
MapActivity mapActivity = getMapActivity();
|
||||||
if (mapActivity != null) {
|
if (mapActivity != null) {
|
||||||
|
|
Loading…
Reference in a new issue