From ec1174faa51fceeb0054b7a50c9a76213383797c Mon Sep 17 00:00:00 2001 From: "Your laurynas.lopata@epfl.ch" Date: Wed, 18 May 2022 20:20:40 +0200 Subject: [PATCH 01/27] Attempting to make Typing game wokr --- .../vibester/activity/PartyRoomActivity.kt | 70 +++++++++++++++++++ .../main/res/layout/activity_party_room.xml | 12 ++++ 2 files changed, 82 insertions(+) diff --git a/app/src/main/java/ch/sdp/vibester/activity/PartyRoomActivity.kt b/app/src/main/java/ch/sdp/vibester/activity/PartyRoomActivity.kt index d5e6792fe..004304bb9 100644 --- a/app/src/main/java/ch/sdp/vibester/activity/PartyRoomActivity.kt +++ b/app/src/main/java/ch/sdp/vibester/activity/PartyRoomActivity.kt @@ -1,19 +1,31 @@ package ch.sdp.vibester.activity import android.content.ContentValues +import android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.util.Log +import android.widget.Button import android.widget.TextView +import androidx.constraintlayout.widget.ConstraintLayout import ch.sdp.vibester.R +import ch.sdp.vibester.api.LastfmApiInterface +import ch.sdp.vibester.api.LastfmMethod +import ch.sdp.vibester.api.LastfmUri +import ch.sdp.vibester.database.AppPreferences import ch.sdp.vibester.database.DataGetter import ch.sdp.vibester.database.Database +import ch.sdp.vibester.helper.GameManager import ch.sdp.vibester.helper.PartyRoom import ch.sdp.vibester.user.User import com.google.firebase.database.DataSnapshot import com.google.firebase.database.DatabaseError import com.google.firebase.database.ValueEventListener +import com.google.gson.Gson import dagger.hilt.android.AndroidEntryPoint +import retrofit2.Call +import retrofit2.Callback +import retrofit2.Response import javax.inject.Inject @AndroidEntryPoint @@ -21,6 +33,8 @@ class PartyRoomActivity : AppCompatActivity() { @Inject lateinit var dataGetter: DataGetter + lateinit var gameManager: GameManager + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_party_room) @@ -33,6 +47,23 @@ class PartyRoomActivity : AppCompatActivity() { else { fetchData(roomName) } + + val startGame = findViewById