added layout and resources

This commit is contained in:
Wyatt J. Miller 2020-09-24 22:46:10 -04:00
parent efc650d86c
commit 3634ac9da4
2 changed files with 75 additions and 16 deletions

View File

@ -7,48 +7,107 @@
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".DiceActivity"> tools:context=".DiceActivity">
<TextView
android:id="@+id/diceTextView"
android:layout_width="157dp"
android:layout_height="76dp"
android:layout_marginTop="40dp"
android:gravity="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/metaStatusTextView" />
<Button <Button
android:id="@+id/rollButton" android:id="@+id/rollButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:onClick="onClickDieRoll" android:onClick="onClickDieRoll"
android:text="@string/btn_roll" android:text="@string/btn_roll"
app:layout_constraintBaseline_toBaselineOf="@+id/rollFourButton"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498" app:layout_constraintHorizontal_bias="0.699"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/diceTextView" />
<Button <Button
android:id="@+id/rollTenButton" android:id="@+id/rollTenButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:onClick="onClickDieTenRoll" android:onClick="onClickDieTenRoll"
android:text="Roll D10" android:text="Roll D10"
app:layout_constraintBaseline_toBaselineOf="@+id/rollEightButton"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintHorizontal_bias="0.699"
app:layout_constraintTop_toBottomOf="@+id/rollButton" /> app:layout_constraintStart_toStartOf="parent" />
<Button <Button
android:id="@+id/rollTwentyButton" android:id="@+id/rollTwentyButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:onClick="onClickDieTwentyRoll" android:onClick="onClickDieTwentyRoll"
android:text="Roll D20" android:text="Roll D20"
app:layout_constraintBaseline_toBaselineOf="@+id/rollTwelveButton"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.699"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/rollFourButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:onClick="onClickDieFourRoll"
android:text="Roll D4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.321"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rollTenButton" /> app:layout_constraintTop_toBottomOf="@+id/diceTextView" />
<Button
android:id="@+id/rollEightButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:onClick="onClickDieEightRoll"
android:text="Roll D8"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.321"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rollFourButton" />
<Button
android:id="@+id/rollTwelveButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:onClick="onClickDieTwelveRoll"
android:text="Roll D12"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.321"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rollEightButton" />
<Button
android:id="@+id/roll100Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:width="50dp"
android:onClick="onClickDie100Roll"
android:text="Roll D100"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rollTwelveButton" />
<TextView <TextView
android:id="@+id/diceTextView" android:id="@+id/metaStatusTextView"
android:layout_width="157dp" android:layout_width="0dp"
android:layout_height="76dp" android:layout_height="wrap_content"
android:layout_marginTop="144dp" android:layout_marginTop="64dp"
android:gravity="center" android:gravity="center_horizontal"
android:text="1" android:text="Roll a die!"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -5,5 +5,5 @@
<string name="btn_coin">Flip the Coin</string> <string name="btn_coin">Flip the Coin</string>
<string name="btn_die">Roll Dice</string> <string name="btn_die">Roll Dice</string>
<string name="btn_flip">Flip</string> <string name="btn_flip">Flip</string>
<string name="btn_roll">Roll</string> <string name="btn_roll">Roll D6</string>
</resources> </resources>