Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
likorn
/
quick_max
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fc50e836
authored
Sep 24, 2019
by
likorn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Playing with main activity design
parent
26017cc4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
31 deletions
app/src/main/res/layout/activity_main.xml
app/src/main/res/values/styles.xml
app/src/main/res/layout/activity_main.xml
View file @
fc50e836
...
@@ -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
app/src/main/res/values/styles.xml
View file @
fc50e836
...
@@ -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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment