@@ -72,6 +72,7 @@ public class EditorActivity extends SuperUI implements OnPathFinishedListener,
7272 private View mSplineToggleContainer ;
7373 private boolean mIsSplineEnabled ;
7474
75+ private View mLocationButtonsContainer ;
7576 private ImageButton mGoToMyLocation ;
7677 private ImageButton mGoToDroneLocation ;
7778
@@ -106,6 +107,7 @@ public void onCreate(Bundle savedInstanceState) {
106107 mSplineToggleContainer = findViewById (R .id .editorSplineToggleContainer );
107108 mSplineToggleContainer .setVisibility (View .GONE );
108109
110+ mLocationButtonsContainer = findViewById (R .id .location_button_container );
109111 mGoToMyLocation = (ImageButton )findViewById (R .id .my_location_button );
110112 mGoToMyLocation .setOnClickListener (new View .OnClickListener (){
111113 @ Override
@@ -165,6 +167,23 @@ public void onClick(View v) {
165167 gestureMapFragment .setOnPathFinishedListener (this );
166168 }
167169
170+ @ Override
171+ public void onWindowFocusChanged (boolean hasFocus ) {
172+ super .onWindowFocusChanged (hasFocus );
173+ updateMapPadding ();
174+ }
175+
176+ /**
177+ * Account for the various ui elements and update the map padding so that it
178+ * remains 'visible'.
179+ */
180+ private void updateMapPadding () {
181+ int topPadding = mLocationButtonsContainer .getBottom () + mLocationButtonsContainer .getPaddingBottom ();
182+ int leftPadding = mLocationButtonsContainer .getLeft () - mLocationButtonsContainer
183+ .getPaddingLeft ();
184+ planningMapFragment .setMapPadding (leftPadding , topPadding , 0 , 0 );
185+ }
186+
168187 @ Override
169188 public void onResume (){
170189 super .onResume ();
@@ -468,6 +487,7 @@ public void onItemClick(MissionItemProxy item) {
468487
469488 @ Override
470489 public void onListVisibilityChanged () {
490+ updateMapPadding ();
471491 }
472492
473493 @ Override
0 commit comments