solved free space after visibility(Gone) inside nearby routes

This commit is contained in:
Chumva 2018-02-16 12:25:39 +02:00
parent 0507517ddb
commit ecdd546fbb
2 changed files with 4 additions and 3 deletions

View file

@ -86,6 +86,7 @@
android:verticalSpacing="@dimen/context_menu_transport_grid_spacing" android:verticalSpacing="@dimen/context_menu_transport_grid_spacing"
android:visibility="gone"/> android:visibility="gone"/>
<LinearLayout <LinearLayout
android:id="@+id/nearby_routes_to_hide"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/context_menu_direction_margin" android:layout_marginBottom="@dimen/context_menu_direction_margin"

View file

@ -492,6 +492,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
GridView localTransportStopRoutesGrid = (GridView) view.findViewById(R.id.transport_stop_routes_grid); GridView localTransportStopRoutesGrid = (GridView) view.findViewById(R.id.transport_stop_routes_grid);
GridView nearbyTransportStopRoutesGrid = (GridView) view.findViewById(R.id.transport_stop_nearby_routes_grid); GridView nearbyTransportStopRoutesGrid = (GridView) view.findViewById(R.id.transport_stop_nearby_routes_grid);
TextView nearbRoutesWithinTv = (TextView) view.findViewById(R.id.nearby_routes_within); TextView nearbRoutesWithinTv = (TextView) view.findViewById(R.id.nearby_routes_within);
LinearLayout nearbyRoutesLayoutToHide=(LinearLayout)view.findViewById(R.id.nearby_routes_to_hide);
List<TransportStopRoute> allTransportStopRoutes = menu.getTransportStopRoutes(); List<TransportStopRoute> allTransportStopRoutes = menu.getTransportStopRoutes();
List<TransportStopRoute> localTransportStopRoutes = new ArrayList<>(); List<TransportStopRoute> localTransportStopRoutes = new ArrayList<>();
List<TransportStopRoute> nearbyTransportStopRoutes = new ArrayList<>(); List<TransportStopRoute> nearbyTransportStopRoutes = new ArrayList<>();
@ -548,12 +549,11 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
nearbyTransportStopRoutesGrid.setVisibility(View.VISIBLE); nearbyTransportStopRoutesGrid.setVisibility(View.VISIBLE);
} else { } else {
nearbyTransportStopRoutesGrid.setVisibility(View.GONE); nearbyTransportStopRoutesGrid.setVisibility(View.GONE);
nearbRoutesWithinTv.setVisibility(View.GONE); nearbyRoutesLayoutToHide.setVisibility(View.GONE);
} }
} else { } else {
localTransportStopRoutesGrid.setVisibility(View.GONE); localTransportStopRoutesGrid.setVisibility(View.GONE);
nearbyTransportStopRoutesGrid.setVisibility(View.GONE); nearbyRoutesLayoutToHide.setVisibility(View.GONE);
nearbRoutesWithinTv.setVisibility(View.GONE);
} }
View buttonsBottomBorder = view.findViewById(R.id.buttons_bottom_border); View buttonsBottomBorder = view.findViewById(R.id.buttons_bottom_border);