Skip to content

Commit

Permalink
fix: trip plan ui (reset time)
Browse files Browse the repository at this point in the history
Signed-off-by: Amr Hossam <[email protected]>
  • Loading branch information
amrhossamdev committed Dec 25, 2024
1 parent 5f5f3f3 commit 94ad2d6
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 159 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#B4B4B4" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M17.5,4.5c-1.95,0 -4.05,0.4 -5.5,1.5c-1.45,-1.1 -3.55,-1.5 -5.5,-1.5S2.45,4.9 1,6v14.65c0,0.65 0.73,0.45 0.75,0.45C3.1,20.45 5.05,20 6.5,20c1.95,0 4.05,0.4 5.5,1.5c1.35,-0.85 3.8,-1.5 5.5,-1.5c1.65,0 3.35,0.3 4.75,1.05C22.66,21.26 23,20.86 23,20.6V6C21.51,4.88 19.37,4.5 17.5,4.5zM21,18.5c-1.1,-0.35 -2.3,-0.5 -3.5,-0.5c-1.7,0 -4.15,0.65 -5.5,1.5V8c1.35,-0.85 3.8,-1.5 5.5,-1.5c1.2,0 2.4,0.15 3.5,0.5V18.5z"/>

</vector>
290 changes: 136 additions & 154 deletions onebusaway-android/src/main/res/layout/fragment_trip_plan.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,203 +21,185 @@
android:layout_margin="16dp">

<RelativeLayout
android:id="@+id/to_and_from_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<RelativeLayout
android:id="@+id/trip_plan_from_layout"
android:id="@+id/to_and_from_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.google.android.material.textfield.TextInputLayout
<RelativeLayout
android:id="@+id/trip_plan_from_layout"
android:layout_width="match_parent"
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_height="wrap_content">

<androidx.appcompat.widget.AppCompatAutoCompleteTextView
style="@style/cursorColorTripPlan"
android:id="@+id/fromAddressTextArea"
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/tripplanner_current_location"
android:hint="@string/trip_plan_start_location_hint"
android:linksClickable="true"
android:singleLine="true"
android:ellipsize="end"
android:requiresFadingEdge="horizontal" />
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">

<androidx.appcompat.widget.AppCompatAutoCompleteTextView
style="@style/cursorColorTripPlan"
android:id="@+id/fromAddressTextArea"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/tripplanner_current_location"
android:hint="@string/trip_plan_start_location_hint"
android:linksClickable="true"
android:singleLine="true"
android:ellipsize="end"
android:requiresFadingEdge="horizontal" />
</com.google.android.material.textfield.TextInputLayout>

<ImageButton
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_contacts_24"
android: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: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" />


<ImageButton
android:id="@+id/fromCurrentLocationImageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#00000000"
android:src="@drawable/ic_my_location"
android:tint="@color/material_gray"
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" />
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" />
</RelativeLayout>

<RelativeLayout
android:id="@+id/trip_plan_to_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/trip_plan_from_layout">

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/trip_plan_to_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
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_below="@id/trip_plan_from_layout">

<AutoCompleteTextView
android:id="@+id/toAddressTextArea"
style="@style/cursorColorTripPlan"
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/trip_plan_end_location_hint"
android:linksClickable="true"
android:singleLine="true"
android:requiresFadingEdge="horizontal" />
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">

<AutoCompleteTextView
android:id="@+id/toAddressTextArea"
style="@style/cursorColorTripPlan"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/trip_plan_end_location_hint"
android:linksClickable="true"
android:singleLine="true"
android:requiresFadingEdge="horizontal" />
</com.google.android.material.textfield.TextInputLayout>

<ImageButton
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_contacts_24"
android: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/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" />

<ImageButton
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:tint="@color/material_gray"
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" />
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" />
</RelativeLayout>
</RelativeLayout>

<LinearLayout
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/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">

<Spinner
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: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" />

<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />

<Spinner
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" />

<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />
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" />


<TextView
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:paddingRight="8dp"
android:paddingEnd="8dp" />
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" />

<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />

<Spinner
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="04:01 pm"
android:inputType="none"
android:focusable="false"
android:layout_gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceSmall" />
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" />

<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />

<ImageButton
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:scaleType="fitXY"
android:id="@+id/resetTimeImageButton"
android:src="@drawable/ic_arrival_time"
android:background="#00000000"
android:tint="@color/material_gray"
android:layout_gravity="center_vertical"
android:contentDescription="@string/reset_time" />
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" />
</LinearLayout>

</RelativeLayout>

0 comments on commit 94ad2d6

Please sign in to comment.