Commit 26017cc4 by likorn

Created AnswerCard and AnswerCardText styles

parent 92f0142c
...@@ -22,81 +22,53 @@ ...@@ -22,81 +22,53 @@
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/btn_left_top" android:id="@+id/btn_left_top"
android:layout_width="0dp" style="@style/AnswerCard"
android:layout_height="0dp"
android:layout_margin="8dp"
android:clickable="true"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground"
app:layout_constraintBottom_toTopOf="@+id/btn_left_bottom" app:layout_constraintBottom_toTopOf="@+id/btn_left_bottom"
app:layout_constraintEnd_toStartOf="@+id/btn_right_top" app:layout_constraintEnd_toStartOf="@+id/btn_right_top"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" > app:layout_constraintTop_toTopOf="parent" >
<TextView
android:layout_width="wrap_content" <TextView style="@style/AnswerCardText"/>
android:layout_height="wrap_content"
android:layout_gravity="center"/>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/btn_right_top" android:id="@+id/btn_right_top"
android:layout_width="0dp" style="@style/AnswerCard"
android:layout_height="0dp"
android:layout_margin="8dp"
android:clickable="true"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground"
app:layout_constraintBottom_toTopOf="@id/btn_right_bottom" app:layout_constraintBottom_toTopOf="@id/btn_right_bottom"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/btn_left_top" app:layout_constraintStart_toEndOf="@+id/btn_left_top"
app:layout_constraintTop_toTopOf="parent" > app:layout_constraintTop_toTopOf="parent" >
<TextView
android:layout_width="wrap_content" <TextView style="@style/AnswerCardText"/>
android:layout_height="wrap_content"
android:layout_gravity="center"/>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/btn_left_bottom" android:id="@+id/btn_left_bottom"
android:layout_width="0dp" style="@style/AnswerCard"
android:layout_height="0dp"
android:layout_margin="8dp"
android:clickable="true"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/btn_right_bottom" app:layout_constraintEnd_toStartOf="@+id/btn_right_bottom"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btn_right_top" > app:layout_constraintTop_toBottomOf="@+id/btn_left_top" >
<TextView
android:layout_width="wrap_content" <TextView style="@style/AnswerCardText"/>
android:layout_height="wrap_content"
android:layout_gravity="center"/>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/btn_right_bottom" android:id="@+id/btn_right_bottom"
android:layout_width="0dp" style="@style/AnswerCard"
android:layout_height="0dp"
android:layout_margin="8dp"
android:clickable="true"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/btn_left_bottom" app:layout_constraintStart_toEndOf="@+id/btn_left_bottom"
app:layout_constraintTop_toBottomOf="@+id/btn_right_top" > app:layout_constraintTop_toBottomOf="@+id/btn_right_top" >
<TextView
android:layout_width="wrap_content" <TextView style="@style/AnswerCardText"/>
android:layout_height="wrap_content"
android:layout_gravity="center"/>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
......
...@@ -8,4 +8,19 @@ ...@@ -8,4 +8,19 @@
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
</style> </style>
<style name="AnswerCard">
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">0dp</item>
<item name="android:layout_margin">8dp</item>
<item name="android:clickable">true</item>
<item name="android:focusable">true</item>
<item name="android:foreground">?android:attr/selectableItemBackground</item>
</style>
<style name="AnswerCardText">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_gravity">center</item>
</style>
</resources> </resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment