From 1c4484b44c06c7e33b802b46ab469cf7f03c9061 Mon Sep 17 00:00:00 2001 From: Skalii Date: Thu, 11 Mar 2021 14:06:40 +0200 Subject: [PATCH] fix toggle button display after rotate screen --- ..._sheet_item_with_descr_and_switch_56dp.xml | 108 +++++++++--------- .../plus/mapmarkers/PlanRouteFragment.java | 4 +- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/OsmAnd/res/layout/bottom_sheet_item_with_descr_and_switch_56dp.xml b/OsmAnd/res/layout/bottom_sheet_item_with_descr_and_switch_56dp.xml index 82d4698be8..b79d61c4b2 100644 --- a/OsmAnd/res/layout/bottom_sheet_item_with_descr_and_switch_56dp.xml +++ b/OsmAnd/res/layout/bottom_sheet_item_with_descr_and_switch_56dp.xml @@ -1,63 +1,63 @@ - + android:paddingLeft="@dimen/content_padding" + android:paddingEnd="@dimen/content_padding" + android:paddingRight="@dimen/content_padding"> - + - + - + - - + + - + diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/PlanRouteFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/PlanRouteFragment.java index 3e0842710c..71b9523f34 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/PlanRouteFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/PlanRouteFragment.java @@ -11,9 +11,9 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.ViewTreeObserver; +import android.widget.FrameLayout; import android.widget.ImageButton; import android.widget.ImageView; -import android.widget.LinearLayout; import android.widget.ProgressBar; import android.widget.TextView; @@ -688,7 +688,7 @@ public class PlanRouteFragment extends BaseOsmAndFragment implements OsmAndLocat } }); if (!portrait) { - LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) appModesBtn.getLayoutParams(); + FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) appModesBtn.getLayoutParams(); params.leftMargin = mapActivity.getResources().getDimensionPixelSize(R.dimen.dashboard_land_width); appModesBtn.setLayoutParams(params); }