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
66edac91
authored
Sep 26, 2019
by
likorn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed the check icons for answerCards
parent
1e7a6961
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
26 additions
and
33 deletions
app/src/main/java/com/example/quickmax/MyMaterialCard.kt → app/src/main/java/com/example/quickmax/AnswerCardView.kt
app/src/main/java/com/example/quickmax/answers/Answer.kt
app/src/main/java/com/example/quickmax/answers/AnswerSet.kt
app/src/main/res/drawable/circle_button.xml
app/src/main/res/drawable/ic_cancel.xml
app/src/main/res/drawable/ic_timer_small.xml → app/src/main/res/drawable/ic_check.xml
app/src/main/res/drawable/ic_double_arrow.xml
app/src/main/res/drawable/ic_double_arrow_small.xml
app/src/main/res/drawable/ic_timer_big.xml
app/src/main/res/layout/activity_task.xml
app/src/main/java/com/example/quickmax/
MyMaterialCard
.kt
→
app/src/main/java/com/example/quickmax/
AnswerCardView
.kt
View file @
66edac91
...
...
@@ -6,7 +6,7 @@ import android.util.AttributeSet
import
androidx.core.content.ContextCompat
import
com.google.android.material.card.MaterialCardView
class
MyMaterialCard
:
MaterialCardView
{
class
AnswerCardView
:
MaterialCardView
{
constructor
(
context
:
Context
?)
:
super
(
context
)
constructor
(
context
:
Context
?,
attrs
:
AttributeSet
?)
:
super
(
context
,
attrs
)
...
...
@@ -25,10 +25,12 @@ class MyMaterialCard : MaterialCardView {
}
fun
markCorrect
(
context
:
Context
)
{
checkedIcon
=
context
.
resources
.
getDrawable
(
R
.
drawable
.
ic_check
,
null
)
foregroundTintList
=
ContextCompat
.
getColorStateList
(
context
,
R
.
color
.
colorAccent
)
}
fun
markWrong
(
context
:
Context
)
{
checkedIcon
=
context
.
resources
.
getDrawable
(
R
.
drawable
.
ic_cancel
,
null
)
foregroundTintList
=
ContextCompat
.
getColorStateList
(
context
,
R
.
color
.
red
)
}
...
...
app/src/main/java/com/example/quickmax/answers/Answer.kt
View file @
66edac91
package
com.example.quickmax.answers
import
com.example.quickmax.
MyMaterialCard
import
com.example.quickmax.
AnswerCardView
class
Answer
(
val
card
:
MyMaterialCard
,
val
value
:
Int
)
{
class
Answer
(
val
card
:
AnswerCardView
,
val
value
:
Int
)
{
var
correct
:
Boolean
=
false
}
\ No newline at end of file
app/src/main/java/com/example/quickmax/answers/AnswerSet.kt
View file @
66edac91
package
com.example.quickmax.answers
import
com.example.quickmax.
MyMaterialCard
import
com.example.quickmax.
AnswerCardView
class
AnswerSet
(
numDigits
:
Int
,
cards
:
List
<
MyMaterialCard
>):
Iterable
<
Answer
>
{
class
AnswerSet
(
numDigits
:
Int
,
cards
:
List
<
AnswerCardView
>):
Iterable
<
Answer
>
{
private
val
numAnswers
=
4
private
lateinit
var
correctAnswer
:
Answer
...
...
app/src/main/res/drawable/circle_button.xml
deleted
100644 → 0
View file @
1e7a6961
<?xml version="1.0" encoding="utf-8"?>
<shape
android:shape=
"oval"
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"#FFF44336"
/>
</shape>
app/src/main/res/drawable/ic_cancel.xml
0 → 100644
View file @
66edac91
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M12,2C6.47,2 2,6.47 2,12s4.47,10 10,10 10,-4.47 10,-10S17.53,2 12,2zM17,15.59L15.59,17 12,13.41 8.41,17 7,15.59 10.59,12 7,8.41 8.41,7 12,10.59 15.59,7 17,8.41 13.41,12 17,15.59z"
/>
</vector>
app/src/main/res/drawable/ic_
timer_small
.xml
→
app/src/main/res/drawable/ic_
check
.xml
View file @
66edac91
...
...
@@ -5,5 +5,5 @@
android:viewportHeight=
"24"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M1
5,1L9,1v2h6L15,1zM11,14h2L13,8h-2v6zM19.03,7.39l1.42,-1.42c-0.43,-0.51 -0.9,-0.99 -1.41,-1.41l-1.42,1.42C16.07,4.74 14.12,4 12,4c-4.97,0 -9,4.03 -9,9s4.02,9 9,9 9,-4.03 9,-9c0,-2.12 -0.74,-4.07 -1.97,-5.61zM12,20c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7
z"
/>
android:pathData=
"M1
2,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM10,17l-5,-5 1.41,-1.41L10,14.17l7.59,-7.59L19,8l-9,9
z"
/>
</vector>
app/src/main/res/drawable/ic_double_arrow.xml
deleted
100644 → 0
View file @
1e7a6961
<vector
android:height=
"80dp"
android:viewportHeight=
"24"
android:viewportWidth=
"24"
android:width=
"80dp"
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M15.5,5l-4.5,0l5,7l-5,7l4.5,0l5,-7z"
/>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M8.5,5l-4.5,0l5,7l-5,7l4.5,0l5,-7z"
/>
</vector>
app/src/main/res/drawable/ic_double_arrow_small.xml
deleted
100644 → 0
View file @
1e7a6961
<vector
android:height=
"40dp"
android:viewportHeight=
"24"
android:viewportWidth=
"24"
android:width=
"40dp"
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M15.5,5l-4.5,0l5,7l-5,7l4.5,0l5,-7z"
/>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M8.5,5l-4.5,0l5,7l-5,7l4.5,0l5,-7z"
/>
</vector>
app/src/main/res/drawable/ic_timer_big.xml
deleted
100644 → 0
View file @
1e7a6961
<vector
android:height=
"150dp"
android:viewportHeight=
"24"
android:viewportWidth=
"24"
android:width=
"150dp"
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M15,1L9,1v2h6L15,1zM11,14h2L13,8h-2v6zM19.03,7.39l1.42,-1.42c-0.43,-0.51 -0.9,-0.99 -1.41,-1.41l-1.42,1.42C16.07,4.74 14.12,4 12,4c-4.97,0 -9,4.03 -9,9s4.02,9 9,9 9,-4.03 9,-9c0,-2.12 -0.74,-4.07 -1.97,-5.61zM12,20c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7z"
/>
</vector>
app/src/main/res/layout/activity_task.xml
View file @
66edac91
...
...
@@ -90,7 +90,7 @@
app:layout_constraintVertical_bias=
"0.5"
app:layout_constraintVertical_chainStyle=
"packed"
>
<com.example.quickmax.
MyMaterialCard
<com.example.quickmax.
AnswerCardView
android:id=
"@+id/card_left_top"
style=
"@style/MyCard"
app:cardBackgroundColor=
"#F44336"
...
...
@@ -103,9 +103,9 @@
<TextView
style=
"@style/AnswerCardText"
/>
</com.example.quickmax.
MyMaterialCard
>
</com.example.quickmax.
AnswerCardView
>
<com.example.quickmax.
MyMaterialCard
<com.example.quickmax.
AnswerCardView
android:id=
"@+id/card_right_top"
style=
"@style/MyCard"
app:layout_constraintBottom_toTopOf=
"@id/card_right_bottom"
...
...
@@ -116,9 +116,9 @@
<TextView
style=
"@style/AnswerCardText"
/>
</com.example.quickmax.
MyMaterialCard
>
</com.example.quickmax.
AnswerCardView
>
<com.example.quickmax.
MyMaterialCard
<com.example.quickmax.
AnswerCardView
android:id=
"@+id/card_left_bottom"
style=
"@style/MyCard"
app:layout_constraintBottom_toBottomOf=
"parent"
...
...
@@ -129,9 +129,9 @@
<TextView
style=
"@style/AnswerCardText"
/>
</com.example.quickmax.
MyMaterialCard
>
</com.example.quickmax.
AnswerCardView
>
<com.example.quickmax.
MyMaterialCard
<com.example.quickmax.
AnswerCardView
android:id=
"@+id/card_right_bottom"
style=
"@style/MyCard"
app:layout_constraintBottom_toBottomOf=
"parent"
...
...
@@ -142,7 +142,7 @@
<TextView
style=
"@style/AnswerCardText"
/>
</com.example.quickmax.
MyMaterialCard
>
</com.example.quickmax.
AnswerCardView
>
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.button.MaterialButton
...
...
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