From b40f77c8195f37c1bfeb28d079f0016a44d372ed Mon Sep 17 00:00:00 2001 From: AngelSuarez03 Date: Mon, 11 Mar 2024 08:27:01 -0600 Subject: [PATCH] Union pantalla principal y compra --- app/src/main/AndroidManifest.xml | 11 + .../example/pantallacompra/MainActivity.kt | 65 ++++++ .../com/example/pantallacompra/adapter.kt | 25 ++ app/src/main/res/drawable/descarga.png | Bin 0 -> 111925 bytes app/src/main/res/drawable/logocamion.png | Bin 0 -> 63085 bytes app/src/main/res/font/cinepolis.otf | Bin 0 -> 27656 bytes app/src/main/res/font/madinione_regular.ttf | Bin 0 -> 97332 bytes .../main/res/layout/activity_chair_list.xml | 69 ++++++ .../main/res/layout/activity_event_list.xml | 61 +++++ app/src/main/res/layout/activity_main.xml | 204 ++++------------ app/src/main/res/layout/event_item.xml | 64 +++++ app/src/main/res/layout/itemasiento.xml | 19 ++ app/src/main/res/layout/pantalla_sala.xml | 111 +++++++++ app/src/main/res/layout/pantallacompra.xml | 219 ++++++++++++++++++ 14 files changed, 693 insertions(+), 155 deletions(-) create mode 100644 app/src/main/java/com/example/pantallacompra/adapter.kt create mode 100644 app/src/main/res/drawable/descarga.png create mode 100644 app/src/main/res/drawable/logocamion.png create mode 100644 app/src/main/res/font/cinepolis.otf create mode 100644 app/src/main/res/font/madinione_regular.ttf create mode 100644 app/src/main/res/layout/activity_chair_list.xml create mode 100644 app/src/main/res/layout/activity_event_list.xml create mode 100644 app/src/main/res/layout/event_item.xml create mode 100644 app/src/main/res/layout/itemasiento.xml create mode 100644 app/src/main/res/layout/pantalla_sala.xml create mode 100644 app/src/main/res/layout/pantallacompra.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 0f8f0a7..766f0c7 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -12,6 +12,17 @@ android:supportsRtl="true" android:theme="@style/Theme.PantallaCompra" tools:targetApi="31" > + + + diff --git a/app/src/main/java/com/example/pantallacompra/MainActivity.kt b/app/src/main/java/com/example/pantallacompra/MainActivity.kt index 183b718..85f1242 100644 --- a/app/src/main/java/com/example/pantallacompra/MainActivity.kt +++ b/app/src/main/java/com/example/pantallacompra/MainActivity.kt @@ -1,11 +1,76 @@ package com.example.pantallacompra +import android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle +import android.widget.Button +import androidx.recyclerview.widget.GridLayoutManager +import androidx.recyclerview.widget.RecyclerView class MainActivity : AppCompatActivity() { + private lateinit var binding: ActivityMainBinding + private lateinit var eventosReferences : DatabaseReference + private lateinit var salasReference: DatabaseReference + private lateinit var asientosReference: DatabaseReference + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + binding= ActivityMainBinding.inflate(layoutInflater) + eventosReferences= FirebaseDatabase.getInstance().getReference("Eventos") + salasReference= FirebaseDatabase.getInstance().getReference("Salas") + asientosReference= FirebaseDatabase.getInstance().getReference("Asientos") + setContentView(R.layout.activity_main) + + val boton = findViewById