Improve session UI

feature/top10
Aurelien Hubert 7 years ago
parent 34935a5cfd
commit 462e54a8e9
  1. 4
      app/src/main/java/net/pokeranalytics/android/util/Extensions.kt
  2. 1
      app/src/main/res/layout/fragment_history.xml
  3. 3
      app/src/main/res/layout/fragment_session.xml

@ -91,11 +91,11 @@ fun Date.getDayNumber() : String {
} }
// Return the 3 first letters of the date's day // Return the 3 first letters of the date's day
fun Date.getShortDayName() : String { fun Date.getShortDayName() : String {
return SimpleDateFormat("EE", Locale.getDefault()).format(this) return SimpleDateFormat("EE", Locale.getDefault()).format(this).substring(0, 3)
} }
// Return the month & year of the date // Return the month & year of the date
fun Date.getMonthAndYear(): String { fun Date.getMonthAndYear(): String {
return SimpleDateFormat("MMMM YYYY", Locale.getDefault()).format(this) return SimpleDateFormat("MMMM YYYY", Locale.getDefault()).format(this).capitalize()
} }
// Return the duration between two dates // Return the duration between two dates

@ -7,7 +7,6 @@
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".ui.activity.HomeActivity"> tools:context=".ui.activity.HomeActivity">
<!-- <!--
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/newSession" android:id="@+id/newSession"

@ -159,6 +159,7 @@
android:layout_gravity="bottom|center" android:layout_gravity="bottom|center"
android:layout_marginBottom="28dp" android:layout_marginBottom="28dp"
android:elevation="16dp" android:elevation="16dp"
android:src="@drawable/ic_outline_play" /> android:src="@drawable/ic_outline_play"
android:tint="@color/black" />
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
Loading…
Cancel
Save