correction bug bouton start + ajout des ressources drawalable + debut du dev de la grid du jeu

pull/2/head
Alexis1663 2 years ago
parent 8479d273d4
commit 1dcc88316d

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
<mapping directory="$PROJECT_DIR$/.." vcs="Git" /> <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component> </component>
</project> </project>

@ -18,6 +18,13 @@
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name="activity.Game"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application> </application>
</manifest> </manifest>

@ -2,6 +2,8 @@ package activity
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle import android.os.Bundle
import android.widget.ImageView
import androidx.core.content.ContextCompat
import but.androidstudio.tetris.R import but.androidstudio.tetris.R
class Game : AppCompatActivity() { class Game : AppCompatActivity() {

@ -9,7 +9,6 @@ import android.widget.TextView
import but.androidstudio.tetris.R import but.androidstudio.tetris.R
class Menu : AppCompatActivity() { class Menu : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_menu) setContentView(R.layout.activity_menu)
@ -19,7 +18,8 @@ class Menu : AppCompatActivity() {
val buttonStart:Button = findViewById(R.id.buttonStart) val buttonStart:Button = findViewById(R.id.buttonStart)
buttonStart.setOnClickListener { buttonStart.setOnClickListener {
val intent = Intent(this,Game::class.java)
startActivity(intent)
} }
} }
} }

@ -4,16 +4,18 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="activity.Game"> tools:context="activity.Game"
>
<GridLayout <GridLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:columnCount="3" android:columnCount="10"
android:rowCount="3" android:rowCount="20"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
<TextView <TextView
android:id="@+id/tilePageGame" android:id="@+id/tilePageGame"
@ -26,5 +28,7 @@
android:layout_marginTop="2mm" android:layout_marginTop="2mm"
/> />
</GridLayout> </GridLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
Loading…
Cancel
Save