ref: motis2_journeys
app/src/main/res/layout/fragment_journey.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 |
<?xml version="1.0" encoding="utf-8"?> <!-- SPDX-FileCopyrightText: Adam Evyčędo SPDX-License-Identifier: GPL-3.0-or-later --> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tool="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tool:context="xyz.apiote.bimba.czwek.dashboard.ui.journey.JourneyFragment"> <com.google.android.material.textfield.TextInputLayout android:id="@+id/origin_input" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="16dp" android:layout_marginTop="16dp" android:layout_marginRight="16dp" android:hint="@string/origin_input_hint" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:startIconDrawable="@drawable/origin"> <com.google.android.material.textfield.TextInputEditText android:id="@+id/origin" android:layout_width="match_parent" android:layout_height="wrap_content" android:imeOptions="actionSearch" /> </com.google.android.material.textfield.TextInputLayout> <com.google.android.material.chip.ChipGroup android:id="@+id/origin_suggestions" android:layout_marginLeft="16dp" android:layout_marginTop="4dp" android:layout_marginRight="16dp" android:layout_width="match_parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/origin_input" android:layout_height="wrap_content"> <com.google.android.material.chip.Chip android:id="@+id/origin_chip_here" style="@style/Widget.Material3.Chip.Suggestion" android:layout_width="wrap_content" android:layout_height="wrap_content" app:chipIcon="@drawable/gps_black" app:chipIconTint="?attr/colorOnSurface" app:chipIconVisible="true" android:checkable="false" android:text="@string/here" /> </com.google.android.material.chip.ChipGroup> <!-- via required: false List of via stops to visit (only stop IDs, no coordinates allowed for now). maxItems: 2 viaMinimumStay required: false Optional. If not set, the default is `0,0` - no stay required. For each `via` stop a minimum stay duration in minutes. The value `0` signals that it's allowed to stay in the same trip. This enables via stays without counting a transfer and can lead to better connections with less transfers. Transfer connections can still be found with `viaMinimumStay=0`. default: [ 0, 0 ] type: array maxItems: 2 --> <com.google.android.material.textfield.TextInputLayout android:id="@+id/destination_input" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="16dp" android:layout_marginTop="16dp" android:layout_marginRight="16dp" android:hint="@string/destination_input_hint" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/origin_suggestions" app:startIconDrawable="@drawable/destination"> <com.google.android.material.textfield.TextInputEditText android:id="@+id/destination" android:layout_width="match_parent" android:layout_height="wrap_content" android:imeOptions="actionSearch" /> </com.google.android.material.textfield.TextInputLayout> <com.google.android.material.chip.ChipGroup android:id="@+id/destination_suggestions" android:layout_marginLeft="16dp" android:layout_marginTop="4dp" android:layout_marginRight="16dp" android:layout_width="match_parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/destination_input" android:layout_height="wrap_content"> <com.google.android.material.chip.Chip android:id="@+id/destination_chip_here" style="@style/Widget.Material3.Chip.Suggestion" android:layout_width="wrap_content" android:layout_height="wrap_content" app:chipIcon="@drawable/gps_black" app:chipIconTint="?attr/colorOnSurface" app:chipIconVisible="true" android:checkable="false" android:text="@string/here" /> </com.google.android.material.chip.ChipGroup> <com.google.android.material.divider.MaterialDivider android:id="@+id/materialDivider" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" app:dividerInsetEnd="16dp" app:dividerInsetStart="16dp" app:layout_constraintTop_toBottomOf="@id/destination_suggestions" /> <com.google.android.material.chip.ChipGroup android:id="@+id/chips_params_time" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" android:paddingStart="16dp" android:paddingEnd="16dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/materialDivider"> <!-- on click menu: https://stackoverflow.com/a/67764469 --> <com.google.android.material.chip.Chip android:id="@+id/chip_time_reference" style="@style/Widget.Material3.Chip.Filter" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/depart_after" app:checkedIconEnabled="false" app:closeIcon="@drawable/dropdown" app:closeIconEnabled="true" tool:ignore="MissingConstraints" /> <com.google.android.material.chip.Chip android:id="@+id/chip_date" style="@style/Widget.Material3.Chip.Filter" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/today" app:checkedIconEnabled="false" app:closeIcon="@drawable/dropdown" app:closeIconEnabled="true" tool:ignore="MissingConstraints" /> <com.google.android.material.chip.Chip android:id="@+id/chip_time" style="@style/Widget.Material3.Chip.Filter" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/now" app:checkedIconEnabled="false" app:closeIcon="@drawable/dropdown" app:closeIconEnabled="true" tool:ignore="MissingConstraints" /> </com.google.android.material.chip.ChipGroup> <com.google.android.material.chip.ChipGroup android:id="@+id/chips_params_accessible" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:paddingStart="16dp" android:paddingEnd="16dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/chips_params_time"> <com.google.android.material.chip.Chip android:id="@+id/chip_wheelchair" style="@style/Widget.Material3.Chip.Filter" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/wheelchair_accessible" app:chipIcon="@drawable/wheelchair" app:chipIconEnabled="true" tool:ignore="MissingConstraints" /> <com.google.android.material.chip.Chip android:id="@+id/chip_bike" style="@style/Widget.Material3.Chip.Filter" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/bike_transport" app:chipIcon="@drawable/bike" app:chipIconEnabled="true" tool:ignore="MissingConstraints" /> </com.google.android.material.chip.ChipGroup> <Button android:id="@+id/goButton" style="@style/Widget.Material3.Button.Icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="16dp" android:text="@string/go" app:icon="@drawable/journey_outline" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" /> <!-- - name: maxTransfers required: false The maximum number of allowed transfers. If not provided, the routing uses the server-side default value which is hardcoded and very high to cover all use cases. schema: type: integer - name: maxHours required: false The maximum travel time in hours. If not provided, the routing to uses the value hardcoded in the server which is usually quite high. schema: type: number - name: minTransferTime required: false Minimum transfer time for each transfer in minutes. schema: type: integer default: 0 - name: additionalTransferTime required: false Additional transfer time reserved for each transfer in minutes. schema: type: integer default: 0 - name: transferTimeFactor required: false Factor to multiply minimum required transfer times with. Values smaller than 1.0 are not supported. schema: type: number default: 1.0 - name: maxMatchingDistance required: true Maximum matching distance in meters to match geo coordinates to the street network. schema: type: number default: 25 - name: transitModes required: false Optional. Default is `TRANSIT` which allows all transit modes (no restriction). Allowed modes for the transit part. If empty, no transit connections will be computed. For example, this can be used to allow only `METRO,SUBWAY,TRAM`. schema: default: - TRANSIT type: array - name: directModes required: false Optional. Default is `WALK` which will compute walking routes as direct connections. Modes used for direction connections from start to destination without using transit. Results will be returned on the `direct` key. Note: Direct connections will only be returned on the first call. For paging calls, they can be omitted. Note: Transit connections that are slower than the fastest direct connection will not show up. This is being used as a cut-off during transit routing to speed up the search. To prevent this, it's possible to send two separate requests (one with only `transitModes` and one with only `directModes`). Only non-transit modes such as `WALK`, `BIKE`, `CAR`, `BIKE_SHARING`, etc. can be used. schema: default: - WALK type: array - name: preTransitModes required: false Optional. Default is `WALK`. Only applies if the `from` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directModes`). A list of modes that are allowed to be used from the `from` coordinate to the first transit stop. Example: `WALK,BIKE_SHARING`. schema: default: - WALK type: array - name: postTransitModes required: false Optional. Default is `WALK`. Only applies if the `to` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directModes`). A list of modes that are allowed to be used from the last transit stop to the `to` coordinate. Example: `WALK,BIKE_SHARING`. schema: default: - WALK type: array - name: numItineraries required: false The minimum number of itineraries to compute. This is only relevant if `timetableView=true`. schema: type: integer default: 5 - name: pageCursor required: false Use the cursor to go to the next "page" of itineraries. Copy the cursor from the last response and keep the original request as is. This will enable you to search for itineraries in the next or previous time-window. - name: timetableView required: false Search for the best trip options within a time window. If true two itineraries are considered optimal if one is better on arrival time (earliest wins) and the other is better on departure time (latest wins). In combination with arriveBy this parameter cover the following use cases: `timetable=false` = waiting for the first transit departure/arrival is considered travel time: - `arriveBy=true`: event (e.g. a meeting) starts at 10:00 am, compute the best journeys that arrive by that time (maximizes departure time) - `arriveBy=false`: event (e.g. a meeting) ends at 11:00 am, compute the best journeys that depart after that time `timetable=true` = optimize "later departure" + "earlier arrival" and give all options over a time window: - `arriveBy=true`: the time window around `date` and `time` refers to the arrival time window - `arriveBy=false`: the time window around `date` and `time` refers to the departure time window schema: type: boolean default: true - name: searchWindow required: false Optional. Default is 2 hours which is `7200`. The length of the search-window in seconds. Default value two hours. - `arriveBy=true`: number of seconds between the earliest departure time and latest departure time - `arriveBy=false`: number of seconds between the earliest arrival time and the latest arrival time schema: type: integer default: 7200 minium: 0 - name: maxPreTransitTime required: false Maximum time in seconds for the first street leg. schema: type: integer default: 900 minimum: 0 - name: maxPostTransitTime required: false Maximum time in seconds for the last street leg. schema: type: integer default: 900 minimum: 0 - name: maxDirectTime required: false Maximum time in seconds for direct connections. schema: type: integer default: 1800 minimum: 0 --> </androidx.constraintlayout.widget.ConstraintLayout> |