diff --git a/app/src/main/java/net/pokeranalytics/android/model/realm/Session.kt b/app/src/main/java/net/pokeranalytics/android/model/realm/Session.kt index 7424ced4..e09d7029 100644 --- a/app/src/main/java/net/pokeranalytics/android/model/realm/Session.kt +++ b/app/src/main/java/net/pokeranalytics/android/model/realm/Session.kt @@ -229,7 +229,7 @@ open class Session : RealmObject(), SessionInterface, Savable, // get all sessions part of the deleted session set val sessionsFromSet = set.sessions - // cleanup unecessary related objects + // cleanup unnecessary related objects set.deleteFromRealm() this.timeFrame?.deleteFromRealm() this.result?.deleteFromRealm() @@ -288,7 +288,7 @@ open class Session : RealmObject(), SessionInterface, Savable, } override fun getDisplayName(): String { - return "session ${this.creationDate}" + return "Session ${this.creationDate}" } override fun adapterRows(): ArrayList { @@ -299,7 +299,7 @@ open class Session : RealmObject(), SessionInterface, Savable, SessionState.STARTED -> { rows.add( HeaderRowRepresentable( - RowViewType.HEADER_TITLE_AMOUNT, + RowViewType.HEADER_TITLE_AMOUNT_BIG, title = getDuration(), value = result?.net.toString() ) ) @@ -307,7 +307,7 @@ open class Session : RealmObject(), SessionInterface, Savable, SessionState.PAUSED -> { rows.add( HeaderRowRepresentable( - RowViewType.HEADER_TITLE_AMOUNT, + RowViewType.HEADER_TITLE_AMOUNT_BIG, resId = R.string.pause, value = result?.net.toString() ) ) @@ -315,7 +315,7 @@ open class Session : RealmObject(), SessionInterface, Savable, SessionState.FINISHED -> { rows.add( HeaderRowRepresentable( - RowViewType.HEADER_TITLE_AMOUNT, + RowViewType.HEADER_TITLE_AMOUNT_BIG, title = getDuration(), value = result?.net.toString() ) ) diff --git a/app/src/main/java/net/pokeranalytics/android/ui/view/RowViewType.kt b/app/src/main/java/net/pokeranalytics/android/ui/view/RowViewType.kt index a98d4198..1f933dc3 100644 --- a/app/src/main/java/net/pokeranalytics/android/ui/view/RowViewType.kt +++ b/app/src/main/java/net/pokeranalytics/android/ui/view/RowViewType.kt @@ -33,6 +33,7 @@ enum class RowViewType { HEADER, HEADER_TITLE_VALUE, HEADER_TITLE_AMOUNT, + HEADER_TITLE_AMOUNT_BIG, EDIT_TEXT, TITLE, TITLE_VALUE, @@ -227,6 +228,13 @@ enum class RowViewType { false ) ) + HEADER_TITLE_AMOUNT_BIG -> HeaderTitleAmountViewHolder( + LayoutInflater.from(parent.context).inflate( + R.layout.row_header_title_amount_big, + parent, + false + ) + ) TITLE -> TitleViewHolder( LayoutInflater.from(parent.context).inflate( R.layout.row_title, diff --git a/app/src/main/res/layout/row_header_title_amount_big.xml b/app/src/main/res/layout/row_header_title_amount_big.xml new file mode 100644 index 00000000..d2916d2d --- /dev/null +++ b/app/src/main/res/layout/row_header_title_amount_big.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/row_header_title_value.xml b/app/src/main/res/layout/row_header_title_value.xml index 67b27389..d9f427a8 100644 --- a/app/src/main/res/layout/row_header_title_value.xml +++ b/app/src/main/res/layout/row_header_title_value.xml @@ -4,12 +4,12 @@ xmlns:tools="http://schemas.android.com/tools" android:id="@+id/rowHeaderTitleValue.container" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="48dp" android:orientation="vertical"> + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/rowTitleSwitch.container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="?selectableItemBackground"> + android:id="@+id/rowTitleSwitch.title" + android:layout_width="0dp" + android:layout_height="wrap_content" + style="@style/PokerAnalyticsTheme.TextView.RowTitle" + android:layout_marginTop="16dp" + android:layout_marginEnd="8dp" + android:layout_marginBottom="16dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/rowTitleSwitch.switch" + app:layout_constraintStart_toStartOf="@+id/guidelineStart" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.0" + tools:text="Data Type Title" /> + android:id="@+id/guidelineStart" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_begin="16dp" /> - + android:id="@+id/guidelineEnd" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_end="16dp" /> + + + android:id="@+id/rowTitleSwitch.separator" + android:layout_width="match_parent" + android:layout_height="16dp" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + tools:visibility="visible"> + android:layout_width="match_parent" + android:layout_height="1dp" + android:layout_gravity="center" + android:layout_marginStart="16dp" + android:layout_marginEnd="16dp" + android:background="@color/kaki" />