From 94ad2d6ae1ea357649ca45f3438d00d9493bc033 Mon Sep 17 00:00:00 2001 From: Amr Hossam Date: Wed, 25 Dec 2024 03:58:07 +0200 Subject: [PATCH] fix: trip plan ui (reset time) Signed-off-by: Amr Hossam --- .../res/drawable/baseline_contacts_24.xml | 5 - .../drawable/baseline_import_contacts_24.xml | 5 + .../main/res/layout/fragment_trip_plan.xml | 290 ++++++++---------- 3 files changed, 141 insertions(+), 159 deletions(-) delete mode 100644 onebusaway-android/src/main/res/drawable/baseline_contacts_24.xml create mode 100644 onebusaway-android/src/main/res/drawable/baseline_import_contacts_24.xml diff --git a/onebusaway-android/src/main/res/drawable/baseline_contacts_24.xml b/onebusaway-android/src/main/res/drawable/baseline_contacts_24.xml deleted file mode 100644 index ce1ddd162..000000000 --- a/onebusaway-android/src/main/res/drawable/baseline_contacts_24.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/onebusaway-android/src/main/res/drawable/baseline_import_contacts_24.xml b/onebusaway-android/src/main/res/drawable/baseline_import_contacts_24.xml new file mode 100644 index 000000000..bbd37209a --- /dev/null +++ b/onebusaway-android/src/main/res/drawable/baseline_import_contacts_24.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/onebusaway-android/src/main/res/layout/fragment_trip_plan.xml b/onebusaway-android/src/main/res/layout/fragment_trip_plan.xml index fa75b32b7..b27625f42 100755 --- a/onebusaway-android/src/main/res/layout/fragment_trip_plan.xml +++ b/onebusaway-android/src/main/res/layout/fragment_trip_plan.xml @@ -21,203 +21,185 @@ android:layout_margin="16dp"> - - - + android:layout_height="wrap_content"> - + android:layout_toLeftOf="@id/fromContactsImageButton" + android:layout_toStartOf="@id/fromContactsImageButton" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:layout_centerVertical="true" + app:endIconMode="clear_text"> + + + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="5dp" + android:layout_marginStart="5dp" + android:id="@+id/fromContactsImageButton" + android:background="#00000000" + android:src="@drawable/baseline_import_contacts_24" + app:tint="@color/material_gray" + android:layout_gravity="center_vertical" + android:layout_toLeftOf="@id/fromCurrentLocationImageButton" + android:layout_centerVertical="true" + android:contentDescription="@string/set_destination_to_my_location" /> + android:id="@+id/fromCurrentLocationImageButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="#00000000" + android:src="@drawable/ic_my_location" + android:layout_marginLeft="5dp" + android:layout_marginStart="5dp" + android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" + android:layout_centerVertical="true" + android:contentDescription="@string/set_origin_to_my_location" + app:tint="@color/material_gray" /> - - + android:layout_below="@id/trip_plan_from_layout"> - + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:layout_toLeftOf="@id/toContactsImageButton" + android:layout_toStartOf="@id/toContactsImageButton" + android:layout_centerVertical="true" + app:endIconMode="clear_text"> + + + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="5dp" + android:layout_marginStart="5dp" + android:id="@+id/toContactsImageButton" + android:background="#00000000" + android:src="@drawable/baseline_import_contacts_24" + app:tint="@color/material_gray" + android:layout_gravity="center_vertical" + android:layout_toLeftOf="@id/toCurrentLocationImageButton" + android:layout_centerVertical="true" + android:contentDescription="@string/set_destination_to_my_location" /> + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="5dp" + android:layout_marginStart="5dp" + android:id="@+id/toCurrentLocationImageButton" + android:background="#00000000" + android:src="@drawable/ic_my_location" + android:layout_gravity="center_vertical" + android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" + android:layout_centerVertical="true" + android:contentDescription="@string/set_destination_to_my_location" + app:tint="@color/material_gray" /> + android:id="@+id/time_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@id/to_and_from_layout" + android:orientation="horizontal" + android:paddingTop="8dp"> + android:id="@+id/leavingChoiceSpinner" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:textAppearance="?android:attr/textAppearanceSmall" + tools:text="Leaving" /> - - - + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/date" + tools:text="June 14" + android:inputType="none" + android:focusable="false" + android:layout_gravity="center_vertical" + android:textAppearance="?android:attr/textAppearanceSmall" /> + + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:color="@color/trip_plan_label" + android:text="@string/trip_plan_stop_connector" + android:layout_gravity="center_vertical" + android:paddingEnd="8dp" /> - + android:id="@+id/time" + android:layout_width="0dp" + android:layout_height="wrap_content" + tools:text="04:01 pm" + android:layout_weight="1" + android:inputType="none" + android:focusable="false" + android:layout_gravity="center_vertical" + android:textAppearance="?android:attr/textAppearanceSmall" /> - + android:layout_width="24dp" + android:layout_height="24dp" + android:scaleType="fitXY" + android:id="@+id/resetTimeImageButton" + android:src="@drawable/ic_arrival_time" + android:background="#00000000" + android:layout_gravity="center_vertical" + android:contentDescription="@string/reset_time" + app:tint="@color/material_gray" />