Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
juegoapretar
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jose Llamas
juegoapretar
Commits
f1a31789
Commit
f1a31789
authored
Mar 04, 2020
by
Jllamas02
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apretar otra vez
parent
f78723e5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
12 deletions
+18
-12
app/src/main/java/com/example/apretamemm/Main3Activity.kt
+2
-2
app/src/main/java/com/example/apretamemm/Main4Activity.kt
+1
-0
app/src/main/java/com/example/apretamemm/MainActivity.kt
+2
-1
app/src/main/res/layout/activity_main3.xml
+13
-9
No files found.
app/src/main/java/com/example/apretamemm/Main3Activity.kt
View file @
f1a31789
...
...
@@ -70,9 +70,9 @@ class Main3Activity : AppCompatActivity() {
duration
=
100
start
()
}
if
(
puntos2
>=
may
2
)
{
if
(
puntos2
>=
SharedApp
.
prefs
.
points
2
)
{
may2
=
puntos2
SharedApp
.
prefs
.
points
=
may2
SharedApp
.
prefs
.
points
2
=
may2
txt_puntaje3
.
text
=(
"Felicidades ${SharedApp.prefs.name}!!!, Hiciste el mayor puntaje"
)
}
else
{
txt_puntaje3
.
text
=(
"El mayor puntaje fue de ${SharedApp.prefs.name} e hizo ${SharedApp.prefs.points2} puntos"
)
...
...
app/src/main/java/com/example/apretamemm/Main4Activity.kt
View file @
f1a31789
...
...
@@ -70,6 +70,7 @@ class Main4Activity : AppCompatActivity() {
vida
=
100
}
}
...
...
app/src/main/java/com/example/apretamemm/MainActivity.kt
View file @
f1a31789
...
...
@@ -52,10 +52,11 @@ class MainActivity : AppCompatActivity() {
btn_apretar
.
setOnClickListener
{
puntos
=
puntos
+
1
txt_puntos
.
setText
(
"Puntos Acumulados: ${puntos}"
)
if
(
puntos
>=
may
)
{
if
(
puntos
>=
SharedApp
.
prefs
.
points
)
{
may
=
puntos
SharedApp
.
prefs
.
points
=
may
txt_puntaje2
.
text
=(
"Felicidades ${SharedApp.prefs.name}!!!, Hiciste el mayor puntaje"
)
}
else
{
txt_puntaje2
.
text
=(
"El mayor puntaje fue de ${SharedApp.prefs.name} e hizo ${SharedApp.prefs.points} puntos"
)
txt_puntaje
.
text
=(
"Tu puntaje fue de ${puntos} puntos"
)
...
...
app/src/main/res/layout/activity_main3.xml
View file @
f1a31789
...
...
@@ -53,15 +53,6 @@
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:text=
"Iniciar"
/>
<TextView
android:id=
"@+id/txt_puntaje3"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"200dp"
app:layout_constraintBottom_toTopOf=
"@+id/btn_apretar"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/txt_mayor2"
...
...
@@ -80,6 +71,19 @@
android:id=
"@+id/txt_puntaje4"
android:layout_width=
"353dp"
android:layout_height=
"90dp"
android:layout_marginBottom=
"40dp"
android:visibility=
"invisible"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"@+id/txt_mayor"
app:layout_constraintVertical_bias=
"0.754"
/>
<TextView
android:id=
"@+id/txt_puntaje3"
android:layout_width=
"353dp"
android:layout_height=
"90dp"
android:layout_marginBottom=
"152dp"
android:visibility=
"invisible"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
...
...
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