Fix rtl, icon, color tick, visible container

This commit is contained in:
androiddevkotlin 2021-01-20 21:40:54 +02:00
parent 1c8c45dbad
commit a1aeb9953b
3 changed files with 12 additions and 12 deletions

View file

@ -8,6 +8,8 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:minHeight="@dimen/bottom_sheet_selected_item_title_height" android:minHeight="@dimen/bottom_sheet_selected_item_title_height"
android:paddingStart="@dimen/content_padding" android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding"> android:paddingLeft="@dimen/content_padding">
<LinearLayout <LinearLayout
@ -44,8 +46,8 @@
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/bottom_sheet_content_margin" android:layout_marginStart="@dimen/bottom_sheet_content_margin"
android:layout_marginLeft="@dimen/bottom_sheet_content_margin" android:layout_marginLeft="@dimen/bottom_sheet_content_margin"
android:layout_marginEnd="@dimen/content_padding" android:layout_marginEnd="@dimen/bottom_sheet_content_margin"
android:layout_marginRight="@dimen/content_padding" android:layout_marginRight="@dimen/bottom_sheet_content_margin"
tools:checked="true" /> tools:checked="true" />
</LinearLayout> </LinearLayout>
@ -66,11 +68,11 @@
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/icon_after_divider" android:id="@+id/icon_after_divider"
style="@style/Widget.AppCompat.Toolbar.Button.Navigation" style="@style/Widget.AppCompat.Toolbar.Button.Navigation"
android:layout_width="@dimen/acceptable_touch_radius" android:layout_width="@dimen/favorites_icon_right_margin"
android:layout_height="@dimen/acceptable_touch_radius" android:layout_height="@dimen/favorites_icon_right_margin"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginLeft="@dimen/content_padding" android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
app:srcCompat="@drawable/ic_action_track_line_bold_color" /> app:srcCompat="@drawable/ic_action_track_line_bold_color" />
</LinearLayout> </LinearLayout>

View file

@ -83,6 +83,7 @@
app:thumbRadius="@dimen/content_padding_small_half" app:thumbRadius="@dimen/content_padding_small_half"
app:trackColorActive="@color/profile_icon_color_blue_light" app:trackColorActive="@color/profile_icon_color_blue_light"
app:trackColorInactive="#4D007EB3" app:trackColorInactive="#4D007EB3"
app:tickColorInactive="#007EB3"
app:trackHeight="@dimen/slider_track_height" app:trackHeight="@dimen/slider_track_height"
tools:visibility="visible" /> tools:visibility="visible" />
@ -97,7 +98,6 @@
android:text="@string/confirm_every_run" android:text="@string/confirm_every_run"
android:textColor="?android:textColorPrimary" android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size" android:textSize="@dimen/default_list_text_size"
android:visibility="gone"
osmand:typeface="@string/font_roboto_regular" osmand:typeface="@string/font_roboto_regular"
tools:visibility="visible" /> tools:visibility="visible" />
</LinearLayout> </LinearLayout>

View file

@ -31,8 +31,6 @@ import net.osmand.plus.UiUtilities.DialogButtonType;
import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.base.MenuBottomSheetDialogFragment; import net.osmand.plus.base.MenuBottomSheetDialogFragment;
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescription; import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescription;
import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerItem;
import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerSpaceItem;
import net.osmand.plus.helpers.AndroidUiHelper; import net.osmand.plus.helpers.AndroidUiHelper;
import net.osmand.plus.helpers.FontCache; import net.osmand.plus.helpers.FontCache;
import net.osmand.plus.settings.backend.OsmandSettings; import net.osmand.plus.settings.backend.OsmandSettings;
@ -53,7 +51,7 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment {
private SwitchCompat confirmEveryRun; private SwitchCompat confirmEveryRun;
private RangeSlider intervalSlider; private RangeSlider intervalSlider;
private TextView intervalValueView; private TextView intervalValueView;
private LinearLayout container;
private boolean infoExpanded; private boolean infoExpanded;
@Override @Override
@ -109,9 +107,10 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment {
intervalValueView = itemView.findViewById(R.id.interval_value); intervalValueView = itemView.findViewById(R.id.interval_value);
updateIntervalLegend(); updateIntervalLegend();
container = itemView.findViewById(R.id.always_ask_and_range_slider_container);
intervalSlider = itemView.findViewById(R.id.interval_slider); intervalSlider = itemView.findViewById(R.id.interval_slider);
intervalSlider.setValueTo(secondsLength + minutesLength - 1); intervalSlider.setValueTo(secondsLength + minutesLength - 1);
intervalSlider.setVisibility(View.GONE); container.setVisibility(View.GONE);
intervalSlider.addOnChangeListener(new RangeSlider.OnChangeListener() { intervalSlider.addOnChangeListener(new RangeSlider.OnChangeListener() {
@Override @Override
@ -218,8 +217,7 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment {
private void toggleInfoView() { private void toggleInfoView() {
infoExpanded = !infoExpanded; infoExpanded = !infoExpanded;
AndroidUiHelper.updateVisibility(intervalSlider, infoExpanded); AndroidUiHelper.updateVisibility(container, infoExpanded);
AndroidUiHelper.updateVisibility(confirmEveryRun, infoExpanded);
updateUpDownBtn(); updateUpDownBtn();
} }