Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TolucaAndroid
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
Miguel Do Carmo
TolucaAndroid
Commits
70251d37
Commit
70251d37
authored
May 28, 2020
by
Miguel Do Carmo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Crasheaba porque no declare en el Manifest el Activity ... arreglao
parent
f7efdcbd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
106 additions
and
104 deletions
+106
-104
TolucaGraphics - copia/app/src/main/AndroidManifest.xml
+1
-0
TolucaGraphics - copia/app/src/main/java/com/example/tolucagraphics/MesaJugando.kt
+4
-4
TolucaGraphics - copia/app/src/main/java/com/example/tolucagraphics/MesasActivity.kt
+2
-2
TolucaGraphics - copia/app/src/main/res/drawable-xxhdpi/carta_oculta.png
+0
-0
TolucaGraphics - copia/app/src/main/res/layout/activity_mesa_en_juego.xml
+1
-1
TolucaGraphics - copia/app/src/main/res/layout/activity_mesas_players.xml
+0
-0
TolucaGraphics - copia/app/src/main/res/layout/modelo_recycler_mesas.xml
+98
-97
No files found.
TolucaGraphics - copia/app/src/main/AndroidManifest.xml
View file @
70251d37
...
...
@@ -15,6 +15,7 @@
android:usesCleartextTraffic=
"true"
tools:targetApi=
"m"
>
<activity
android:name=
".MesasActivity"
></activity>
<activity
android:name=
".MesaJugando"
></activity>
<activity
android:name=
".MainActivity"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
TolucaGraphics - copia/app/src/main/java/com/example/tolucagraphics/Mesa
EnJueg
o.kt
→
TolucaGraphics - copia/app/src/main/java/com/example/tolucagraphics/Mesa
Jugand
o.kt
View file @
70251d37
...
...
@@ -9,19 +9,19 @@ import okhttp3.Response
import
okhttp3.WebSocket
import
okhttp3.WebSocketListener
class
Mesa
EnJueg
o
:
AppCompatActivity
()
{
class
Mesa
Jugand
o
:
AppCompatActivity
()
{
val
single
=
Socket
val
gson
=
Gson
()
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_mesa_en_juego
)
val
intentJoin
=
intent
.
getStringExtra
(
"join"
)
!!
Log
.
d
(
"TAG"
,
"Join from Intent: $intentJoin"
)
//val intentJoin = intent.getStringExtra("join")
//
Log.d("TAG", "Join from Intent: $intentJoin")
//single.listener = Listener2()
single
.
conectarconWS
()
}
fun
mensajeRecibido
(
text
:
String
){
Log
.
d
(
"TAG"
,
text
)
Log
.
d
(
"TAG"
,
text
)
}
inner
class
Listener2
:
WebSocketListener
(){
@SuppressLint
(
"SetTextI18n"
)
...
...
TolucaGraphics - copia/app/src/main/java/com/example/tolucagraphics/MesasActivity.kt
View file @
70251d37
...
...
@@ -69,8 +69,8 @@ class MesasActivity : AppCompatActivity() {
fun
iniciarRecyclerMesas
(){
mesasAdapter
=
MesaAdapter
(
listaMesas
){
cadena
,
join
->
Toast
.
makeText
(
this
@MesasActivity
,
cadena
,
Toast
.
LENGTH_LONG
).
show
()
val
intentJuego
=
Intent
(
this
@MesasActivity
,
Mesa
EnJueg
o
::
class
.
java
)
intentJuego
.
putExtra
(
"join"
,
gson
.
toJson
(
join
))
val
intentJuego
=
Intent
(
this
@MesasActivity
,
Mesa
Jugand
o
::
class
.
java
)
//
intentJuego.putExtra("join", gson.toJson(join))
startActivity
(
intentJuego
)
}
lista_mesas
.
apply
{
...
...
TolucaGraphics - copia/app/src/main/res/drawable-
v24
/carta_oculta.png
→
TolucaGraphics - copia/app/src/main/res/drawable-
xxhdpi
/carta_oculta.png
View file @
70251d37
File moved
TolucaGraphics - copia/app/src/main/res/layout/activity_mesa_en_juego.xml
View file @
70251d37
...
...
@@ -4,7 +4,7 @@
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".Mesa
EnJueg
o"
>
tools:context=
".Mesa
Jugand
o"
>
<TextView
android:id=
"@+id/textoPuntajeLocal"
android:text=
"@string/puntajes_local"
...
...
TolucaGraphics - copia/app/src/main/res/layout/activity_mesas_players.xml
View file @
70251d37
This diff is collapsed.
Click to expand it.
TolucaGraphics - copia/app/src/main/res/layout/modelo_recycler_mesas.xml
View file @
70251d37
...
...
@@ -4,103 +4,103 @@
android:layout_height=
"wrap_content"
android:layout_margin=
"5dp"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<!--Mesa Id Estado Silla 1 Silla 2 Silla 3 Silla 4 Silla 5 Silla 6 Acciones-->
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/contenedor"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/campoMesaId"
android:text=
"000"
android:gravity=
"center"
android:textColor=
"@color/black"
android:textSize=
"20dp"
android:layout_width=
"@dimen/caja_listas_mesas"
android:layout_height=
"@dimen/caja_listas_mesas"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
/>
<!--Mesa Id Estado Silla 1 Silla 2 Silla 3 Silla 4 Silla 5 Silla 6 Acciones-->
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/contenedor"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/campoMesaId"
android:text=
"000"
android:gravity=
"center"
android:textColor=
"@color/black"
android:textSize=
"20dp"
android:layout_width=
"@dimen/caja_listas_mesas"
android:layout_height=
"@dimen/caja_listas_mesas"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
/>
<TextView
android:id=
"@+id/campoMesaEstado"
android:layout_width=
"@dimen/ancho_estado_mesa"
android:layout_height=
"@dimen/caja_listas_mesas"
android:gravity=
"center"
android:text=
"OPEN"
android:textColor=
"@color/black"
android:textSize=
"20dp"
app:layout_constraintStart_toEndOf=
"@id/campoMesaId"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/campoMesaEstado"
android:layout_width=
"@dimen/ancho_estado_mesa"
android:layout_height=
"@dimen/caja_listas_mesas"
android:gravity=
"center"
android:text=
"OPEN"
android:textColor=
"@color/black"
android:textSize=
"20dp"
app:layout_constraintStart_toEndOf=
"@id/campoMesaId"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/campoMesaS1"
android:text=
"000"
android:gravity=
"center"
android:textColor=
"@color/black"
android:textSize=
"20dp"
android:layout_width=
"@dimen/caja_listas_mesas"
android:layout_height=
"@dimen/caja_listas_mesas"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/campoMesaEstado"
/>
<TextView
android:id=
"@+id/campoMesaS2"
android:text=
"000"
android:gravity=
"center"
android:textColor=
"@color/black"
android:textSize=
"20dp"
android:layout_width=
"@dimen/caja_listas_mesas"
android:layout_height=
"@dimen/caja_listas_mesas"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/campoMesaS1"
/>
<TextView
android:id=
"@+id/campoMesaS3"
android:text=
"000"
android:gravity=
"center"
android:textColor=
"@color/black"
android:textSize=
"20dp"
android:layout_width=
"@dimen/caja_listas_mesas"
android:layout_height=
"@dimen/caja_listas_mesas"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/campoMesaS2"
/>
<TextView
android:id=
"@+id/campoMesaS4"
android:text=
"000"
android:gravity=
"center"
android:textColor=
"@color/black"
android:textSize=
"20dp"
android:layout_width=
"@dimen/caja_listas_mesas"
android:layout_height=
"@dimen/caja_listas_mesas"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/campoMesaS3"
/>
<TextView
android:id=
"@+id/campoMesaS5"
android:text=
"000"
android:gravity=
"center"
android:textColor=
"@color/black"
android:textSize=
"20dp"
android:layout_width=
"@dimen/caja_listas_mesas"
android:layout_height=
"@dimen/caja_listas_mesas"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/campoMesaS4"
/>
<TextView
android:id=
"@+id/campoMesaS6"
android:text=
"000"
android:gravity=
"center"
android:textColor=
"@color/black"
android:textSize=
"20dp"
android:layout_width=
"@dimen/caja_listas_mesas"
android:layout_height=
"@dimen/caja_listas_mesas"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/campoMesaS5"
/>
<Button
android:id=
"@+id/campoMesaacc"
android:text=
"Seleccionar"
android:gravity=
"center"
android:textColor=
"@color/white"
android:textSize=
"20dp"
android:background=
"@color/blue"
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/caja_listas_mesas"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/campoMesaS6"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id=
"@+id/campoMesaS1"
android:text=
"000"
android:gravity=
"center"
android:textColor=
"@color/black"
android:textSize=
"20dp"
android:layout_width=
"@dimen/caja_listas_mesas"
android:layout_height=
"@dimen/caja_listas_mesas"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/campoMesaEstado"
/>
<TextView
android:id=
"@+id/campoMesaS2"
android:text=
"000"
android:gravity=
"center"
android:textColor=
"@color/black"
android:textSize=
"20dp"
android:layout_width=
"@dimen/caja_listas_mesas"
android:layout_height=
"@dimen/caja_listas_mesas"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/campoMesaS1"
/>
<TextView
android:id=
"@+id/campoMesaS3"
android:text=
"000"
android:gravity=
"center"
android:textColor=
"@color/black"
android:textSize=
"20dp"
android:layout_width=
"@dimen/caja_listas_mesas"
android:layout_height=
"@dimen/caja_listas_mesas"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/campoMesaS2"
/>
<TextView
android:id=
"@+id/campoMesaS4"
android:text=
"000"
android:gravity=
"center"
android:textColor=
"@color/black"
android:textSize=
"20dp"
android:layout_width=
"@dimen/caja_listas_mesas"
android:layout_height=
"@dimen/caja_listas_mesas"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/campoMesaS3"
/>
<TextView
android:id=
"@+id/campoMesaS5"
android:text=
"000"
android:gravity=
"center"
android:textColor=
"@color/black"
android:textSize=
"20dp"
android:layout_width=
"@dimen/caja_listas_mesas"
android:layout_height=
"@dimen/caja_listas_mesas"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/campoMesaS4"
/>
<TextView
android:id=
"@+id/campoMesaS6"
android:text=
"000"
android:gravity=
"center"
android:textColor=
"@color/black"
android:textSize=
"20dp"
android:layout_width=
"@dimen/caja_listas_mesas"
android:layout_height=
"@dimen/caja_listas_mesas"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/campoMesaS5"
/>
<Button
android:id=
"@+id/campoMesaacc"
android:text=
"Seleccionar"
android:gravity=
"center"
android:textColor=
"@color/white"
android:textSize=
"20dp"
android:background=
"@color/blue"
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/caja_listas_mesas"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/campoMesaS6"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</HorizontalScrollView>
\ 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