Commit 70251d37 by Miguel Do Carmo

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

parent f7efdcbd
......@@ -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" />
......
......@@ -9,14 +9,14 @@ import okhttp3.Response
import okhttp3.WebSocket
import okhttp3.WebSocketListener
class MesaEnJuego : AppCompatActivity() {
class MesaJugando : 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()
}
......
......@@ -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, MesaEnJuego::class.java)
intentJuego.putExtra("join", gson.toJson(join))
val intentJuego = Intent(this@MesasActivity, MesaJugando::class.java)
//intentJuego.putExtra("join", gson.toJson(join))
startActivity(intentJuego)
}
lista_mesas.apply {
......
......@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MesaEnJuego">
tools:context=".MesaJugando">
<TextView
android:id="@+id/textoPuntajeLocal"
android:text="@string/puntajes_local"
......
......@@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MesasActivity">
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!--View de Mesas disponibles o en Juego-->
......@@ -269,5 +269,5 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnCreaMesa" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
\ No newline at end of file
......@@ -4,7 +4,7 @@
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-->
<!--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"
......
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