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
c1ccc474
authored
Sep 25, 2019
by
likorn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed Fragment TimeIsOver
parent
afc32e00
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
89 deletions
app/src/main/java/com/example/quickmax/TaskActivity.kt
app/src/main/java/com/example/quickmax/TimeIsOverFragment.kt
app/src/main/res/layout/activity_main.xml
app/src/main/res/layout/activity_task.xml
app/src/main/res/layout/fragment_time_is_over.xml
app/src/main/res/values/dimens.xml
app/src/main/res/values/strings.xml
app/src/main/java/com/example/quickmax/TaskActivity.kt
View file @
c1ccc474
...
...
@@ -85,8 +85,8 @@ class TaskActivity : AppCompatActivity() {
tv_timer
.
text
=
resources
.
getString
(
R
.
string
.
response_wrong
)
answer
.
card
.
background
.
setColorFilter
(
color
(
R
.
color
.
colorPrimary
),
PorterDuff
.
Mode
.
MULTIPLY
)
btn_next
.
background
.
setColorFilter
(
color
(
R
.
color
.
colorPrimary
),
PorterDuff
.
Mode
.
MULTIPLY
)
btn_next
.
setTextColor
(
Color
.
WHITE
)
(
answer
.
card
.
getChildAt
(
0
)
as
TextView
).
setTextColor
(
Color
.
WHITE
)
}
}
...
...
@@ -115,12 +115,11 @@ class TaskActivity : AppCompatActivity() {
}
override
fun
onFinish
()
{
cv_task
.
elevation
=
0f
makeButtonsUncheckable
()
supportFragmentManager
.
beginTransaction
()
.
replace
(
R
.
id
.
main_layout
,
TimeIsOverFragment
.
newInstance
(),
"time_is_over"
)
.
commitAllowingStateLoss
()
tv_timer
.
setTextSize
(
TypedValue
.
COMPLEX_UNIT_SP
,
resources
.
getDimension
(
R
.
dimen
.
response_text_size
))
tv_timer
.
text
=
resources
.
getString
(
R
.
string
.
time_is_over
)
btn_next
.
background
.
setColorFilter
(
color
(
R
.
color
.
colorPrimary
),
PorterDuff
.
Mode
.
MULTIPLY
)
btn_next
.
setTextColor
(
Color
.
WHITE
)
btn_next
.
visibility
=
View
.
VISIBLE
}
}
}
...
...
app/src/main/java/com/example/quickmax/TimeIsOverFragment.kt
deleted
100644 → 0
View file @
afc32e00
package
com.example.quickmax
import
android.os.Bundle
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
androidx.fragment.app.Fragment
class
TimeIsOverFragment
:
Fragment
()
{
companion
object
{
fun
newInstance
():
TimeIsOverFragment
{
return
TimeIsOverFragment
()
}
}
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?):
View
?
{
val
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_time_is_over
,
container
,
false
)
view
.
setOnClickListener
{
(
activity
as
TaskActivity
).
reload
()
}
return
view
}
}
\ No newline at end of file
app/src/main/res/layout/activity_main.xml
View file @
c1ccc474
...
...
@@ -7,7 +7,7 @@
android:background=
"@drawable/gradient"
>
<TextView
android:id=
"@+id/t
extView4
"
android:id=
"@+id/t
v_how_many_digits
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
...
...
@@ -28,10 +28,10 @@
android:layout_width=
"0dp"
android:layout_height=
"100dp"
android:layout_marginTop=
"16dp"
app:layout_constraint
Bottom_toBottomOf=
"parent
"
app:layout_constraint
End_toEndOf=
"@+id/textView4
"
app:layout_constraint
Start_toStartOf=
"@+id/textView4
"
app:layout_constraint
Top_toBottomOf=
"@+id/textView4
"
>
app:layout_constraint
End_toEndOf=
"@+id/tv_how_many_digits
"
app:layout_constraint
Start_toStartOf=
"@+id/tv_how_many_digits
"
app:layout_constraint
Top_toBottomOf=
"@+id/tv_how_many_digits
"
app:layout_constraint
Bottom_toTopOf=
"@+id/seek_bar
"
>
<androidx.cardview.widget.CardView
android:id=
"@+id/card_2_digits"
...
...
@@ -88,6 +88,7 @@
app:layout_constraintEnd_toEndOf=
"@+id/layout_num_digits"
app:layout_constraintStart_toStartOf=
"@+id/layout_num_digits"
app:layout_constraintTop_toBottomOf=
"@+id/layout_num_digits"
app:layout_constraintBottom_toTopOf=
"@+id/seek_bar_value"
app:left_thumb_color=
"@android:color/white"
app:left_thumb_color_pressed=
"@color/colorPrimary"
app:max_value=
"10"
...
...
@@ -102,6 +103,7 @@
android:text=
"@string/time_to_solve"
android:textAppearance=
"@style/TextAppearance.MaterialComponents.Caption"
android:textColor=
"@android:color/white"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"@+id/layout_num_digits"
app:layout_constraintTop_toBottomOf=
"@+id/seek_bar"
/>
...
...
app/src/main/res/layout/activity_task.xml
View file @
c1ccc474
...
...
@@ -33,10 +33,10 @@
<TextView
android:id=
"@+id/tv_timer"
style=
"@style/TextAppearance.MaterialComponents.Headline4"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:gravity=
"center"
android:text=
"@string/number_digits_3"
android:textColor=
"@android:color/white"
android:textSize=
"60sp"
app:layout_constraintBottom_toTopOf=
"@+id/cv_task"
...
...
app/src/main/res/layout/fragment_time_is_over.xml
deleted
100644 → 0
View file @
afc32e00
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/gradient"
>
<ImageView
android:id=
"@+id/img_view_timer"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:tint=
"@android:color/white"
app:layout_constraintBottom_toTopOf=
"@id/textView"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_chainStyle=
"packed"
app:srcCompat=
"@drawable/ic_timer_big"
/>
<TextView
android:id=
"@+id/textView"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/time_is_over"
android:textAppearance=
"@style/TextAppearance.AppCompat.Large"
android:textColor=
"@android:color/white"
app:layout_constraintBottom_toTopOf=
"@+id/textView2"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/img_view_timer"
/>
<TextView
android:id=
"@+id/textView2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"32dp"
android:text=
"@string/tap_to_continue"
android:textAppearance=
"@style/TextAppearance.MaterialComponents.Subtitle1"
android:textColor=
"#97000000"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/values/dimens.xml
View file @
c1ccc474
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen
name=
"response_text_size"
>
20
sp
</dimen>
<dimen
name=
"response_text_size"
>
14
sp
</dimen>
</resources>
\ No newline at end of file
app/src/main/res/values/strings.xml
View file @
c1ccc474
<resources>
<string
name=
"app_name"
>
QuickMax
</string>
<string
name=
"second_max"
>
Choose the second greatest value
</string>
<string
name=
"response_correct"
>
C
ORRECT
</string>
<string
name=
"response_wrong"
>
W
RONG
</string>
<string
name=
"time_is_over"
>
T
IME IS OVER
</string>
<string
name=
"response_correct"
>
C
orrect!
</string>
<string
name=
"response_wrong"
>
W
rong!
</string>
<string
name=
"time_is_over"
>
T
ime is over!
</string>
<string
name=
"number_digits_2"
>
2
</string>
<string
name=
"number_digits_3"
>
3
</string>
<string
name=
"number_digits_4"
>
4
</string>
<string
name=
"how_many_digits"
>
H
OW MANY DIGITS
?
</string>
<string
name=
"how_many_digits"
>
H
ow many digits
?
</string>
<string
name=
"time_to_solve"
>
Time to solve: %1$s seconds
</string>
<string
name=
"btn_next"
>
Next
</string>
<string
name=
"tap_to_continue"
>
Tap anywhere to continue
</string>
</resources>
</resources>
\ No newline at end of file
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