@@ -1927,23 +1927,18 @@ private void enterMeasurementMode() {
1927
1927
1928
1928
private OnGlobalLayoutListener getWidgetsLayoutListener () {
1929
1929
if (widgetsLayoutListener == null ) {
1930
- widgetsLayoutListener = new OnGlobalLayoutListener () {
1931
- @ Override
1932
- public void onGlobalLayout () {
1933
- MapActivity mapActivity = getMapActivity ();
1934
- if (mapActivity != null ) {
1935
- int visibility = portrait ? View .INVISIBLE : View .GONE ;
1936
- View rightWidgetsPanel = mapActivity .findViewById (R .id .map_right_widgets_panel );
1937
- if (rightWidgetsPanel .getVisibility () != visibility ) {
1938
- AndroidUiHelper .setVisibility (mapActivity , visibility ,
1939
- R .id .map_left_widgets_panel ,
1940
- R .id .map_right_widgets_panel ,
1941
- R .id .map_center_info );
1942
- AndroidUiHelper .setVisibility (mapActivity , View .GONE ,
1943
- R .id .map_route_info_button ,
1944
- R .id .map_menu_button ,
1945
- R .id .map_quick_actions_button );
1946
- }
1930
+ widgetsLayoutListener = () -> {
1931
+ MapActivity mapActivity = getMapActivity ();
1932
+ if (mapActivity != null ) {
1933
+ View rightWidgetsPanel = mapActivity .findViewById (R .id .map_right_widgets_panel );
1934
+ if (rightWidgetsPanel .getVisibility () != View .GONE ) {
1935
+ AndroidUiHelper .setVisibility (mapActivity , View .GONE ,
1936
+ R .id .map_left_widgets_panel ,
1937
+ R .id .map_right_widgets_panel ,
1938
+ R .id .map_center_info ,
1939
+ R .id .map_route_info_button ,
1940
+ R .id .map_menu_button ,
1941
+ R .id .map_quick_actions_button );;
1947
1942
}
1948
1943
}
1949
1944
};
0 commit comments