création des activity menu, game et des layouts #1
Closed
enzo.jolys
wants to merge 4 commits from Enzo
into master
@ -0,0 +1,39 @@
|
|||||||
|
package modele
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.graphics.Bitmap
|
||||||
|
import android.graphics.Canvas
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.graphics.Matrix
|
||||||
|
import android.graphics.Paint
|
||||||
|
import android.graphics.Rect
|
||||||
|
import android.view.View
|
||||||
|
|
||||||
|
class CanvaView(context : Context) : View(context) {
|
||||||
|
|
||||||
|
val paint = Paint()
|
||||||
|
|
||||||
|
// Pour drawBitmap, mais a voir
|
||||||
|
val piece = Array<Int>(size = 16){ 0 }
|
||||||
|
|
||||||
|
|
||||||
|
init {
|
||||||
|
paint.color = Color.BLACK
|
||||||
|
paint.strokeWidth = 8F
|
||||||
|
paint.style = Paint.Style.FILL
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDraw(canvas: Canvas) {
|
||||||
|
super.onDraw(canvas)
|
||||||
|
|
||||||
|
// Utiliser drawBitmap pour dessiner nos piece
|
||||||
|
canvas.drawBitmap()
|
||||||
|
|
||||||
|
val matrix = Bitmap()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,34 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
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"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
tools:context="activity.Game">
|
||||||
tools:context="activity.Game"
|
|
||||||
>
|
|
||||||
|
|
||||||
<GridLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:columnCount="10"
|
|
||||||
android:rowCount="20"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tilePageGame"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="TextView"
|
|
||||||
android:layout_row="0"
|
|
||||||
android:layout_column="0"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginTop="2mm"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</GridLayout>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in new issue