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

View file

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

View file

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

View file

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

View file

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