parent
ebb31da9d5
commit
079a8397bd
@ -0,0 +1,21 @@ |
||||
package net.pokeranalytics.android.ui.view.rowrepresentable |
||||
|
||||
import net.pokeranalytics.android.calculus.ComputedStat |
||||
import net.pokeranalytics.android.calculus.Stat |
||||
import net.pokeranalytics.android.ui.view.RowRepresentable |
||||
import net.pokeranalytics.android.ui.view.RowViewType |
||||
|
||||
|
||||
class GraphRow(stat: Stat, computedStat: ComputedStat?, groupName: String = "") : RowRepresentable { |
||||
|
||||
var stat: Stat = stat |
||||
var computedStat: ComputedStat? = computedStat |
||||
var groupName: String = groupName |
||||
|
||||
override val viewType: Int |
||||
get() = RowViewType.GRAPH.ordinal |
||||
|
||||
override val resId: Int? |
||||
get() = this.stat.resId |
||||
|
||||
} |
||||
@ -0,0 +1,13 @@ |
||||
package net.pokeranalytics.android.ui.view.rowrepresentable |
||||
|
||||
import net.pokeranalytics.android.calculus.ComputedStat |
||||
import net.pokeranalytics.android.ui.view.RowRepresentable |
||||
import net.pokeranalytics.android.ui.view.RowViewType |
||||
|
||||
|
||||
class StatDoubleRow(var computedStat1: ComputedStat? = null, var computedStat2: ComputedStat? = null) : RowRepresentable { |
||||
|
||||
override val viewType: Int |
||||
get() = RowViewType.STATS_DOUBLE.ordinal |
||||
|
||||
} |
||||
@ -1,106 +0,0 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<androidx.constraintlayout.widget.ConstraintLayout 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:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:padding="16dp"> |
||||
|
||||
<FrameLayout |
||||
android:id="@+id/chartContainer" |
||||
android:layout_width="0dp" |
||||
android:layout_height="0dp" |
||||
app:layout_constraintDimensionRatio="2:1" |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent" /> |
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView |
||||
android:id="@+id/stat1Name" |
||||
style="@style/PokerAnalyticsTheme.TextView.LegendStatsTitle" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="16dp" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintTop_toBottomOf="@+id/chartContainer" |
||||
tools:text="NET RESULT" /> |
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView |
||||
android:id="@+id/stat1Value" |
||||
style="@style/PokerAnalyticsTheme.TextView.LegendStatsValue" |
||||
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
||||
app:layout_constraintEnd_toStartOf="@+id/stat2Value" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintTop_toBottomOf="@id/stat1Name" |
||||
tools:text="$2000" /> |
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView |
||||
android:id="@+id/stat2Name" |
||||
style="@style/PokerAnalyticsTheme.TextView.LegendStatsTitle" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="0dp" |
||||
android:layout_marginTop="16dp" |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
app:layout_constraintHorizontal_bias="1.0" |
||||
app:layout_constraintStart_toEndOf="@+id/stat1Name" |
||||
app:layout_constraintTop_toBottomOf="@+id/chartContainer" |
||||
tools:text="NET RESULT" /> |
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView |
||||
android:id="@+id/stat2Value" |
||||
style="@style/PokerAnalyticsTheme.TextView.LegendStatsValue" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
app:layout_constraintHorizontal_bias="1.0" |
||||
app:layout_constraintStart_toEndOf="@+id/stat1Value" |
||||
app:layout_constraintTop_toBottomOf="@id/stat2Name" |
||||
tools:text="$2000" /> |
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView |
||||
android:id="@+id/stat3Name" |
||||
style="@style/PokerAnalyticsTheme.TextView.LegendStatsTitle" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="16dp" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintTop_toBottomOf="@+id/stat1Value" |
||||
tools:text="NET RESULT" /> |
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView |
||||
android:id="@+id/stat3Value" |
||||
style="@style/PokerAnalyticsTheme.TextView.LegendStatsValue" |
||||
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
||||
app:layout_constraintBottom_toBottomOf="parent" |
||||
app:layout_constraintEnd_toStartOf="@+id/stat4Value" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintTop_toBottomOf="@id/stat3Name" |
||||
tools:text="$2000" /> |
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView |
||||
android:id="@+id/stat4Name" |
||||
style="@style/PokerAnalyticsTheme.TextView.LegendStatsTitle" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="0dp" |
||||
android:layout_marginTop="16dp" |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
app:layout_constraintHorizontal_bias="1.0" |
||||
app:layout_constraintStart_toEndOf="@+id/stat3Name" |
||||
app:layout_constraintTop_toBottomOf="@+id/stat2Value" |
||||
tools:text="NET RESULT" /> |
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView |
||||
android:id="@+id/stat4Value" |
||||
style="@style/PokerAnalyticsTheme.TextView.LegendStatsValue" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
app:layout_constraintBottom_toBottomOf="parent" |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
app:layout_constraintHorizontal_bias="1.0" |
||||
app:layout_constraintStart_toEndOf="@+id/stat3Value" |
||||
app:layout_constraintTop_toBottomOf="@id/stat4Name" |
||||
tools:text="$2000" /> |
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
||||
@ -0,0 +1,19 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<androidx.constraintlayout.widget.ConstraintLayout 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:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:padding="16dp"> |
||||
|
||||
<FrameLayout |
||||
android:id="@+id/chartContainer" |
||||
android:layout_width="0dp" |
||||
android:layout_height="0dp" |
||||
app:layout_constraintDimensionRatio="2:1" |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent" |
||||
android:background="@color/green_lighter_gradient" /> |
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
||||
@ -0,0 +1,51 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<androidx.constraintlayout.widget.ConstraintLayout 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:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:padding="16dp"> |
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView |
||||
android:id="@+id/stat1Name" |
||||
style="@style/PokerAnalyticsTheme.TextView.LegendStatsTitle" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent" |
||||
tools:text="NET RESULT" /> |
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView |
||||
android:id="@+id/stat1Value" |
||||
style="@style/PokerAnalyticsTheme.TextView.LegendStatsValue" |
||||
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
||||
app:layout_constraintBottom_toBottomOf="parent" |
||||
app:layout_constraintEnd_toStartOf="@+id/stat2Value" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintTop_toBottomOf="@id/stat1Name" |
||||
tools:text="$2000" /> |
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView |
||||
android:id="@+id/stat2Name" |
||||
style="@style/PokerAnalyticsTheme.TextView.LegendStatsTitle" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="0dp" |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
app:layout_constraintHorizontal_bias="1.0" |
||||
app:layout_constraintStart_toEndOf="@+id/stat1Name" |
||||
app:layout_constraintTop_toTopOf="parent" |
||||
tools:text="NET RESULT" /> |
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView |
||||
android:id="@+id/stat2Value" |
||||
style="@style/PokerAnalyticsTheme.TextView.LegendStatsValue" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
app:layout_constraintHorizontal_bias="1.0" |
||||
app:layout_constraintStart_toEndOf="@+id/stat1Value" |
||||
app:layout_constraintTop_toBottomOf="@id/stat2Name" |
||||
tools:text="$2000" /> |
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
||||
Loading…
Reference in new issue