Commit fc50e836 by likorn

Playing with main activity design

parent 26017cc4
...@@ -8,6 +8,41 @@ ...@@ -8,6 +8,41 @@
android:background="#C4BFCC" android:background="#C4BFCC"
tools:context=".MainActivity"> tools:context=".MainActivity">
<androidx.cardview.widget.CardView
android:id="@+id/cv_task"
style="@style/CardView.Light"
android:layout_width="0dp"
android:layout_height="150dp"
android:layout_margin="16dp"
app:cardBackgroundColor="#EBF8F8F8"
app:cardCornerRadius="4dp"
app:cardElevation="2dp"
app:layout_constraintBottom_toTopOf="@+id/layout_answers"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5"
app:layout_constraintVertical_chainStyle="packed">
<TextView
android:id="@+id/tv_task"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"
android:gravity="center"
android:includeFontPadding="true"
android:text="@string/second_max"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="#323753" />
</androidx.cardview.widget.CardView>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layout_answers" android:id="@+id/layout_answers"
android:layout_width="0dp" android:layout_width="0dp"
...@@ -68,7 +103,7 @@ ...@@ -68,7 +103,7 @@
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 style="@style/AnswerCardText"/> <TextView style="@style/AnswerCardText" />
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
...@@ -87,32 +122,4 @@ ...@@ -87,32 +122,4 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<androidx.cardview.widget.CardView
android:id="@+id/cv_task"
style="@style/CardView.Light"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="16dp"
app:cardBackgroundColor="#EBF8F8F8"
app:cardElevation="2dp"
app:layout_constraintBottom_toTopOf="@+id/layout_answers"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5"
app:layout_constraintVertical_chainStyle="packed">
<TextView
android:id="@+id/tv_task"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:gravity="center"
android:includeFontPadding="true"
android:text="@string/second_max"
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline5"
android:textColor="#323753" />
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -8,19 +8,21 @@ ...@@ -8,19 +8,21 @@
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
</style> </style>
<style name="AnswerCard"> <style name="AnswerCard" parent="CardView">
<item name="android:layout_width">0dp</item> <item name="android:layout_width">0dp</item>
<item name="android:layout_height">0dp</item> <item name="android:layout_height">0dp</item>
<item name="android:layout_margin">8dp</item> <item name="android:layout_margin">8dp</item>
<item name="android:clickable">true</item> <item name="android:clickable">true</item>
<item name="android:focusable">true</item> <item name="android:focusable">true</item>
<item name="android:foreground">?android:attr/selectableItemBackground</item> <item name="android:foreground">?android:attr/selectableItemBackground</item>
<item name="cardCornerRadius">4dp</item>
</style> </style>
<style name="AnswerCardText"> <style name="AnswerCardText">
<item name="android:layout_height">wrap_content</item> <item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item> <item name="android:layout_width">wrap_content</item>
<item name="android:layout_gravity">center</item> <item name="android:layout_gravity">center</item>
<item name="android:textAppearance">@style/TextAppearance.MaterialComponents.Headline4</item>
</style> </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