Layout redo, logical mistake fix

This commit is contained in:
androiddevkkotlin 2020-11-22 23:01:18 +02:00
parent cc1776ec33
commit 7420aa8376
5 changed files with 14 additions and 13 deletions

View file

@ -25,7 +25,6 @@
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:gravity="center" android:gravity="center"
android:textSize="@dimen/default_desc_text_size" android:textSize="@dimen/default_desc_text_size"
android:foreground="?attr/selectableItemBackground"
android:textColor="@drawable/radio_flat_text_selector_light" android:textColor="@drawable/radio_flat_text_selector_light"
osmand:typeface="@string/font_roboto_medium" osmand:typeface="@string/font_roboto_medium"
tools:text="@string/shared_string_left"/> tools:text="@string/shared_string_left"/>
@ -33,11 +32,11 @@
</FrameLayout> </FrameLayout>
<FrameLayout <FrameLayout
android:id="@+id/center_button_container" android:id="@+id/buttons_divider"
android:layout_width="1dp" android:layout_width="1dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0" android:layout_weight="0"
android:background="@color/divider_color"> android:background="?attr/divider_color">
</FrameLayout> </FrameLayout>

View file

@ -30,7 +30,8 @@
<RelativeLayout <RelativeLayout
android:id="@+id/up_down_row" android:id="@+id/up_down_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="112dp" android:layout_height="wrap_content"
android:minHeight="112dp"
android:background="?attr/selectableItemBackground"> android:background="?attr/selectableItemBackground">
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
@ -39,8 +40,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_marginStart="14dp" android:layout_marginStart="@dimen/measurement_tool_text_button_padding"
android:layout_marginLeft="14dp" android:layout_marginLeft="@dimen/measurement_tool_text_button_padding"
android:layout_marginTop="@dimen/bottom_sheet_icon_margin" android:layout_marginTop="@dimen/bottom_sheet_icon_margin"
android:layout_marginEnd="@dimen/measurement_tool_text_button_padding" android:layout_marginEnd="@dimen/measurement_tool_text_button_padding"
android:layout_marginRight="@dimen/measurement_tool_text_button_padding" android:layout_marginRight="@dimen/measurement_tool_text_button_padding"
@ -132,7 +133,8 @@
<include <include
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_button_height" android:layout_height="@dimen/measurement_tool_button_height"
android:layout_alignParentBottom = "true" android:layout_below="@id/distance_to_center_text_view"
android:layout_marginTop="@dimen/content_padding_half"
android:layout_marginBottom="@dimen/measurement_tool_content_padding_medium" android:layout_marginBottom="@dimen/measurement_tool_content_padding_medium"
android:layout_marginStart="@dimen/content_padding" android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding" android:layout_marginEnd="@dimen/content_padding"

View file

@ -489,7 +489,6 @@ public class UiUtilities {
startButtonContainer.setBackgroundColor(Color.TRANSPARENT); startButtonContainer.setBackgroundColor(Color.TRANSPARENT);
startButtonText.setTextColor(activeColor); startButtonText.setTextColor(activeColor);
} else if (buttonType == null) { } else if (buttonType == null) {
background.setCornerRadii(new float[]{0, 0, 0, 0, 0, 0, 0, 0});
endButtonContainer.setBackgroundColor(Color.TRANSPARENT); endButtonContainer.setBackgroundColor(Color.TRANSPARENT);
startButtonContainer.setBackgroundColor(Color.TRANSPARENT); startButtonContainer.setBackgroundColor(Color.TRANSPARENT);
endButtonText.setTextColor(activeColor); endButtonText.setTextColor(activeColor);

View file

@ -76,6 +76,7 @@ public class TrackDetailsMenu {
private boolean visible; private boolean visible;
private boolean hidding; private boolean hidding;
private Location myLocation; private Location myLocation;
public boolean shouldShowXAxisPoints () { public boolean shouldShowXAxisPoints () {
return true; return true;
} }

View file

@ -127,7 +127,8 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
private Snackbar snackbar; private Snackbar snackbar;
private String fileName; private String fileName;
private @Nullable AdditionalInfoType currentAdditionalInfoType; private @Nullable
AdditionalInfoType currentAdditionalInfoType;
private boolean wasCollapseButtonVisible; private boolean wasCollapseButtonVisible;
private boolean progressBarVisible; private boolean progressBarVisible;
@ -295,8 +296,8 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
collapseAdditionalInfoView(); collapseAdditionalInfoView();
} else { } else {
expandAdditionalInfoView(); expandAdditionalInfoView();
}
additionalInfoExpanded = true; additionalInfoExpanded = true;
}
updateUpDownBtn(); updateUpDownBtn();
} }
}); });
@ -309,7 +310,6 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
public void onClick(View v) { public void onClick(View v) {
changeAdditionalInfoType(AdditionalInfoType.GRAPH); changeAdditionalInfoType(AdditionalInfoType.GRAPH);
expandAdditionalInfoView(); expandAdditionalInfoView();
additionalInfoExpanded = true;
updateUpDownBtn(); updateUpDownBtn();
} }
}); });
@ -553,7 +553,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
if (ma == null) return; if (ma == null) return;
OsmandApplication app = ma.getMyApplication(); OsmandApplication app = ma.getMyApplication();
View buttonsDivider = customRadioButton.findViewById(R.id.center_button_container); View buttonsDivider = customRadioButton.findViewById(R.id.buttons_divider);
if (AdditionalInfoType.POINTS == type) { if (AdditionalInfoType.POINTS == type) {
visibleCard = pointsCard; visibleCard = pointsCard;
additionalInfoExpanded = true; additionalInfoExpanded = true;
@ -565,6 +565,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
buttonsDivider.setVisibility(View.GONE); buttonsDivider.setVisibility(View.GONE);
UiUtilities.updateCustomRadioButtons(app, customRadioButton, nightMode, END); UiUtilities.updateCustomRadioButtons(app, customRadioButton, nightMode, END);
} else if (null == type) { } else if (null == type) {
visibleCard = null;
additionalInfoExpanded = false; additionalInfoExpanded = false;
buttonsDivider.setVisibility(View.VISIBLE); buttonsDivider.setVisibility(View.VISIBLE);
UiUtilities.updateCustomRadioButtons(app, customRadioButton, nightMode, null); UiUtilities.updateCustomRadioButtons(app, customRadioButton, nightMode, null);
@ -1508,7 +1509,6 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
collapseAdditionalInfoView(); collapseAdditionalInfoView();
} else if (pointsCount < 1) { } else if (pointsCount < 1) {
disable(upDownBtn); disable(upDownBtn);
collapseAdditionalInfoView();
if (additionalInfoExpanded) { if (additionalInfoExpanded) {
collapseAdditionalInfoView(); collapseAdditionalInfoView();
} }