Show history.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-01-06 19:44:02 +01:00
parent 1e428e854e
commit 74be455d48
27 changed files with 358 additions and 150 deletions

View File

@@ -39,12 +39,12 @@
<androidx.fragment.app.FragmentContainerView
android:id="@+id/scrollHistory"
android:name="me.zobrist.tichucounter.ui.counter.HistoryList"
android:name="me.zobrist.tichucounter.ui.counter.RoundList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="16dp"
android:clickable="false"
tools:layout="@layout/fragment_history_list" />
tools:layout="@layout/fragment_round_list" />
</LinearLayout>
<LinearLayout

View File

@@ -41,7 +41,7 @@
<androidx.fragment.app.FragmentContainerView
android:id="@+id/scrollHistory"
android:name="me.zobrist.tichucounter.ui.counter.HistoryList"
android:name="me.zobrist.tichucounter.ui.counter.RoundList"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="16dp"
@@ -49,7 +49,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/dividerTop"
tools:layout="@layout/fragment_history_list" />
tools:layout="@layout/fragment_round_list" />
<View
android:id="@+id/dividerBottom"

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<!-- Title, secondary and supporting text -->
<TextView
android:id="@+id/card_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceHeadline6"
/>
<TextView
android:id="@+id/card_secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textAppearance="?attr/textAppearanceBody2"
android:textColor="?android:attr/textColorSecondary"
/>
<TextView
android:id="@+id/card_supporting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:textAppearance="?attr/textAppearanceBody2"
android:textColor="?android:attr/textColorSecondary"
/>
</LinearLayout>
</LinearLayout>

View File

@@ -1,45 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/list"
android:name="me.zobrist.tichucounter.ui.slideshow.HistoryFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.counter.HistoryList">
<ScrollView
android:id="@+id/scrollViewHistory"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/historyA"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.2"
android:gravity="center"
tools:text="@tools:sample/cities" />
<TextView
android:id="@+id/historyB"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.2"
android:gravity="center"
tools:text="@tools:sample/date/hhmmss" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</FrameLayout>
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
app:layoutManager="LinearLayoutManager"
tools:context=".ui.history.HistoryFragment"
tools:listitem="@layout/fragment_history" />

View File

@@ -47,14 +47,13 @@
<LinearLayout
android:id="@+id/ButtonRow1"
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<Button
android:id="@+id/button1"
style='style="?android:attr/buttonBarButtonStyle'
style='?android:attr/buttonStyle'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -63,7 +62,7 @@
<Button
android:id="@+id/button2"
style='style="?android:attr/buttonBarButtonStyle'
style='?android:attr/buttonStyle'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -72,7 +71,7 @@
<Button
android:id="@+id/button3"
style='style="?android:attr/buttonBarButtonStyle'
style='?android:attr/buttonStyle'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -81,7 +80,7 @@
<Button
android:id="@+id/buttonAdd100"
style='style="?android:attr/buttonBarButtonStyle'
style='?android:attr/buttonStyle'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -91,14 +90,13 @@
<LinearLayout
android:id="@+id/ButtonRow2"
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/button4"
style='style="?android:attr/buttonBarButtonStyle'
style='?android:attr/buttonStyle'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -107,7 +105,7 @@
<Button
android:id="@+id/button5"
style='style="?android:attr/buttonBarButtonStyle'
style='?android:attr/buttonStyle'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -116,7 +114,7 @@
<Button
android:id="@+id/button6"
style='style="?android:attr/buttonBarButtonStyle'
style='?android:attr/buttonStyle'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -125,7 +123,7 @@
<Button
android:id="@+id/buttonSub100"
style='style="?android:attr/buttonBarButtonStyle'
style='?android:attr/buttonStyle'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -135,14 +133,13 @@
<LinearLayout
android:id="@+id/ButtonRow3"
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/button7"
style='style="?android:attr/buttonBarButtonStyle'
style='?android:attr/buttonStyle'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -151,7 +148,7 @@
<Button
android:id="@+id/button8"
style='style="?android:attr/buttonBarButtonStyle'
style='?android:attr/buttonStyle'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -160,7 +157,7 @@
<Button
android:id="@+id/button9"
style='style="?android:attr/buttonBarButtonStyle'
style='?android:attr/buttonStyle'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -169,7 +166,7 @@
<ImageButton
android:id="@+id/buttonBack"
style='style="?android:attr/buttonBarButtonStyle'
style='?android:attr/buttonStyle'
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
@@ -184,7 +181,6 @@
<LinearLayout
android:id="@+id/ButtonRow4"
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
@@ -194,7 +190,7 @@
<Button
android:id="@+id/buttonInv"
style='style="?android:attr/buttonBarButtonStyle'
style='?android:attr/buttonStyle'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
@@ -202,24 +198,28 @@
<Button
android:id="@+id/button0"
style='style="?android:attr/buttonBarButtonStyle'
style='?android:attr/buttonStyle'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:text="0" />
<Space
style='?android:attr/buttonBarButtonStyle'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0" />
<ImageButton
android:id="@+id/submit"
style='style="?android:attr/buttonBarButtonStyle'
style='?android:attr/buttonStyle'
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.0"
android:contentDescription="TODO"
android:layout_weight="1"
android:contentDescription="@string/submit"
android:cropToPadding="false"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:scaleType="fitCenter"
app:srcCompat="@drawable/checkmark" />
</LinearLayout>

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.counter.RoundList">
<ScrollView
android:id="@+id/scrollViewHistory"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/historyA"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.2"
android:gravity="center"
tools:text="@tools:sample/cities" />
<TextView
android:id="@+id/historyB"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.2"
android:gravity="center"
tools:text="@tools:sample/date/hhmmss" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</FrameLayout>

View File

@@ -13,7 +13,7 @@
<fragment
android:id="@+id/nav_history"
android:name="me.zobrist.tichucounter.ui.settings.SettingsFragment"
android:name="me.zobrist.tichucounter.ui.history.HistoryFragment"
android:label="@string/menu_history"
tools:layout="@layout/fragment_slideshow" />

View File

@@ -16,4 +16,6 @@
<string name="dark">Dunkel</string>
<string name="settings">Einstellungen</string>
<string name="display">Anzeige</string>
<string name="activate">Aktivieren</string>
<string name="delete">Löschen</string>
</resources>

View File

@@ -5,4 +5,5 @@
<dimen name="nav_header_vertical_spacing">8dp</dimen>
<dimen name="nav_header_height">176dp</dimen>
<dimen name="fab_margin">16dp</dimen>
<dimen name="text_margin">16dp</dimen>
</resources>

View File

@@ -32,4 +32,7 @@
<string name="menu_counter">Counter</string>
<string name="menu_history">History</string>
<string name="menu_settings">Settings</string>
<string name="activate">Activate</string>
<string name="delete">Delete</string>
<string name="submit">Submit</string>
</resources>