|
@@ -8,6 +8,47 @@
|
|
|
android:fitsSystemWindows="true"
|
|
|
tools:context="ml.adamsprogs.bimba.activities.StopActivity">
|
|
|
|
|
|
+ <com.google.android.material.appbar.AppBarLayout
|
|
|
+ android:id="@+id/appbar"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:paddingTop="@dimen/appbar_padding_top"
|
|
|
+ android:theme="@style/AppTheme.AppBarOverlay">
|
|
|
+
|
|
|
+ <androidx.appcompat.widget.Toolbar
|
|
|
+ android:id="@+id/toolbar"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="?attr/actionBarSize"
|
|
|
+ android:layout_weight="1"
|
|
|
+ android:background="?attr/colorPrimary"
|
|
|
+ app:layout_scrollFlags="scroll|enterAlways"
|
|
|
+ app:popupTheme="@style/AppTheme.PopupOverlay"
|
|
|
+ app:title="@string/app_name">
|
|
|
+
|
|
|
+ </androidx.appcompat.widget.Toolbar>
|
|
|
+
|
|
|
+ <Spinner
|
|
|
+ android:id="@+id/dateSpinner"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_marginStart="8dp"
|
|
|
+ android:layout_marginLeft="8dp"
|
|
|
+ android:layout_marginEnd="8dp"
|
|
|
+ android:layout_marginRight="8dp"
|
|
|
+ android:layout_marginBottom="8dp"
|
|
|
+ android:layout_weight="1"
|
|
|
+ android:visibility="gone" />
|
|
|
+ </com.google.android.material.appbar.AppBarLayout>
|
|
|
+
|
|
|
+ <include
|
|
|
+ android:visibility="gone"
|
|
|
+ android:id="@+id/banner"
|
|
|
+ layout="@layout/banner"
|
|
|
+ android:layout_height="120dp"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ app:layout_constraintEnd_toEndOf="parent"
|
|
|
+ app:layout_constraintStart_toStartOf="parent"
|
|
|
+ app:layout_constraintTop_toBottomOf="@id/appbar" />
|
|
|
|
|
|
<ImageView
|
|
|
android:id="@+id/emptyStateIcon"
|
|
@@ -17,13 +58,13 @@
|
|
|
android:layout_marginTop="8dp"
|
|
|
android:layout_marginEnd="8dp"
|
|
|
android:layout_marginBottom="8dp"
|
|
|
+ android:contentDescription="@string/departures_empty_state_icon"
|
|
|
+ android:visibility="gone"
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
- app:layout_constraintTop_toBottomOf="@+id/appbar"
|
|
|
- app:srcCompat="@drawable/ic_traffic"
|
|
|
- android:visibility="gone"
|
|
|
- android:contentDescription="@string/departures_empty_state_icon" />
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/banner"
|
|
|
+ app:srcCompat="@drawable/ic_traffic" />
|
|
|
|
|
|
<TextView
|
|
|
android:id="@+id/emptyStateText"
|
|
@@ -33,9 +74,9 @@
|
|
|
android:layout_marginTop="8dp"
|
|
|
android:layout_marginEnd="8dp"
|
|
|
android:text="@string/no_departures"
|
|
|
+ android:visibility="gone"
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
- android:visibility="gone"
|
|
|
app:layout_constraintTop_toBottomOf="@+id/emptyStateIcon" />
|
|
|
|
|
|
<ProgressBar
|
|
@@ -50,51 +91,18 @@
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
- app:layout_constraintTop_toBottomOf="@+id/appbar" />
|
|
|
-
|
|
|
- <com.google.android.material.appbar.AppBarLayout
|
|
|
- android:id="@+id/appbar"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:paddingTop="@dimen/appbar_padding_top"
|
|
|
- android:theme="@style/AppTheme.AppBarOverlay">
|
|
|
-
|
|
|
- <androidx.appcompat.widget.Toolbar
|
|
|
- android:id="@+id/toolbar"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="?attr/actionBarSize"
|
|
|
- android:layout_weight="1"
|
|
|
- android:background="?attr/colorPrimary"
|
|
|
- app:layout_scrollFlags="scroll|enterAlways"
|
|
|
- app:popupTheme="@style/AppTheme.PopupOverlay"
|
|
|
- app:title="@string/app_name">
|
|
|
-
|
|
|
- </androidx.appcompat.widget.Toolbar>
|
|
|
-
|
|
|
- <Spinner
|
|
|
- android:id="@+id/dateSpinner"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_marginBottom="8dp"
|
|
|
- android:layout_marginEnd="8dp"
|
|
|
- android:layout_marginLeft="8dp"
|
|
|
- android:layout_marginRight="8dp"
|
|
|
- android:layout_marginStart="8dp"
|
|
|
- android:layout_weight="1"
|
|
|
- android:visibility="gone" />
|
|
|
-
|
|
|
-
|
|
|
- </com.google.android.material.appbar.AppBarLayout>
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/banner" />
|
|
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
|
android:id="@+id/departuresList"
|
|
|
android:layout_width="0dp"
|
|
|
android:layout_height="0dp"
|
|
|
+ android:layout_marginTop="8dp"
|
|
|
android:visibility="gone"
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
- app:layout_constraintTop_toBottomOf="@+id/appbar" />
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/banner" />
|
|
|
|
|
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
|
|
android:id="@+id/fab"
|
|
@@ -102,9 +110,10 @@
|
|
|
android:layout_height="wrap_content"
|
|
|
android:layout_gravity="end|bottom"
|
|
|
android:layout_margin="@dimen/fab_margin"
|
|
|
- android:layout_marginBottom="16dp"
|
|
|
android:layout_marginEnd="16dp"
|
|
|
+ android:layout_marginBottom="16dp"
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
app:srcCompat="@drawable/ic_favourite" />
|
|
|
+
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|