Commit 70251d37 by Miguel Do Carmo

Crasheaba porque no declare en el Manifest el Activity ... arreglao

parent f7efdcbd
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
android:usesCleartextTraffic="true" android:usesCleartextTraffic="true"
tools:targetApi="m"> tools:targetApi="m">
<activity android:name=".MesasActivity"></activity> <activity android:name=".MesasActivity"></activity>
<activity android:name=".MesaJugando"></activity>
<activity android:name=".MainActivity"> <activity android:name=".MainActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
......
...@@ -9,14 +9,14 @@ import okhttp3.Response ...@@ -9,14 +9,14 @@ import okhttp3.Response
import okhttp3.WebSocket import okhttp3.WebSocket
import okhttp3.WebSocketListener import okhttp3.WebSocketListener
class MesaEnJuego : AppCompatActivity() { class MesaJugando : AppCompatActivity() {
val single = Socket val single = Socket
val gson = Gson() val gson = Gson()
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_mesa_en_juego) setContentView(R.layout.activity_mesa_en_juego)
val intentJoin = intent.getStringExtra("join")!! //val intentJoin = intent.getStringExtra("join")
Log.d("TAG", "Join from Intent: $intentJoin") //Log.d("TAG", "Join from Intent: $intentJoin")
//single.listener = Listener2() //single.listener = Listener2()
single.conectarconWS() single.conectarconWS()
} }
......
...@@ -69,8 +69,8 @@ class MesasActivity : AppCompatActivity() { ...@@ -69,8 +69,8 @@ class MesasActivity : AppCompatActivity() {
fun iniciarRecyclerMesas(){ fun iniciarRecyclerMesas(){
mesasAdapter = MesaAdapter(listaMesas){ cadena, join -> mesasAdapter = MesaAdapter(listaMesas){ cadena, join ->
Toast.makeText(this@MesasActivity, cadena, Toast.LENGTH_LONG).show() Toast.makeText(this@MesasActivity, cadena, Toast.LENGTH_LONG).show()
val intentJuego = Intent(this@MesasActivity, MesaEnJuego::class.java) val intentJuego = Intent(this@MesasActivity, MesaJugando::class.java)
intentJuego.putExtra("join", gson.toJson(join)) //intentJuego.putExtra("join", gson.toJson(join))
startActivity(intentJuego) startActivity(intentJuego)
} }
lista_mesas.apply { lista_mesas.apply {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".MesaEnJuego"> tools:context=".MesaJugando">
<TextView <TextView
android:id="@+id/textoPuntajeLocal" android:id="@+id/textoPuntajeLocal"
android:text="@string/puntajes_local" android:text="@string/puntajes_local"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".MesasActivity"> tools:context=".MesasActivity">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<!--View de Mesas disponibles o en Juego--> <!--View de Mesas disponibles o en Juego-->
...@@ -269,5 +269,5 @@ ...@@ -269,5 +269,5 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnCreaMesa" /> app:layout_constraintTop_toBottomOf="@+id/btnCreaMesa" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView> </ScrollView>
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="5dp" android:layout_margin="5dp"
xmlns:app="http://schemas.android.com/apk/res-auto"> 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--> <!--Mesa Id Estado Silla 1 Silla 2 Silla 3 Silla 4 Silla 5 Silla 6 Acciones-->
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/contenedor" android:id="@+id/contenedor"
android:layout_width="match_parent" android:layout_width="match_parent"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment