Commit 1bbccef5 authored by Timothé KOBAK's avatar Timothé KOBAK

button

parent d95f8def
......@@ -33,6 +33,7 @@ class AdAdapter(private val context: Context, private val adModelArrayList: List
titleTV.text = ad.title
addressTV.text = ad.address
prixTV.text = "${usingJavaStringFormat(ad.prix, 2)} €"
return convertView
}
}
\ No newline at end of file
package com.example.elbuenopeso.models
public class AdModel(var title: String, var address: String, var image: Int, var prix: Double) {
public class AdModel(var title: String, var address: String, var image: Int, var prix: Double, var num: String) {
}
\ No newline at end of file
......@@ -39,26 +39,26 @@ class MarketFragment : Fragment() {
toggleButton = binding.toggleButton
val annonces: List<AdModel> = listOf(
AdModel("Poutre", "1 rue Jean-Pierre", R.drawable.pichu, 25.0),
AdModel("Briques", "2 rue Jean-Michel", R.drawable.pichu, 16.0),
AdModel("Poutre", "1 rue Jean-Pierre", R.drawable.pichu, 25.0),
AdModel("Briques", "2 rue Jean-Michel", R.drawable.pichu, 16.0),
AdModel("Mur en bois", "4 rue Alain-Juju", R.drawable.pichu, 7.2),
AdModel("Maison de pierre", "7 rue Joris Belhomme", R.drawable.pichu, 3.99),
AdModel("Téléphone de Timothé", "8 rue de Timothé", R.drawable.pichu, 0.85),
AdModel("Oridnateur", "10 rue Jean-Charles", R.drawable.pichu, 104.98),
AdModel("Charnières", "22 rue Jeanne-Marie", R.drawable.pichu, 2648.97),
AdModel("Porte en marbre", "1 rue Jean-Pierre", R.drawable.pichu, 480.0),
AdModel("Cheminée", "33 rue du Gouvernement", R.drawable.pichu, 800.0),
AdModel("Poutre", "1 rue Jean-Pierre", R.drawable.pichu, 25.0),
AdModel("Briques", "2 rue Jean-Michel", R.drawable.pichu, 16.0),
AdModel("Mur en bois", "4 rue Alain-Juju", R.drawable.pichu, 7.2),
AdModel("Maison de pierre", "7 rue Joris Belhomme", R.drawable.pichu, 3.99),
AdModel("Téléphone de Timothé", "8 rue de Timothé", R.drawable.pichu, 0.85),
AdModel("Oridnateur", "10 rue Jean-Charles", R.drawable.pichu, 104.98),
AdModel("Charnières", "22 rue Jeanne-Marie", R.drawable.pichu, 2648.97),
AdModel("Porte en marbre", "1 rue Jean-Pierre", R.drawable.pichu, 480.0),
AdModel("Cheminée", "33 rue du Gouvernement", R.drawable.pichu, 800.0),
AdModel("Poutre", "1 rue Jean-Pierre", R.drawable.pichu, 25.0,"0777467434"),
AdModel("Briques", "2 rue Jean-Michel", R.drawable.pichu, 16.0,"0777467434"),
AdModel("Poutre", "1 rue Jean-Pierre", R.drawable.pichu, 25.0,"0777467434"),
AdModel("Briques", "2 rue Jean-Michel", R.drawable.pichu, 16.0,"0777467434"),
AdModel("Mur en bois", "4 rue Alain-Juju", R.drawable.pichu, 7.2,"0777467434"),
AdModel("Maison de pierre", "7 rue Joris Belhomme", R.drawable.pichu, 3.99,"0777467434"),
AdModel("Téléphone de Timothé", "8 rue de Timothé", R.drawable.pichu, 0.85,"0777467434"),
AdModel("Oridnateur", "10 rue Jean-Charles", R.drawable.pichu, 104.98,"0777467434"),
AdModel("Charnières", "22 rue Jeanne-Marie", R.drawable.pichu, 2648.97,"0777467434"),
AdModel("Porte en marbre", "1 rue Jean-Pierre", R.drawable.pichu, 480.0,"0777467434"),
AdModel("Cheminée", "33 rue du Gouvernement", R.drawable.pichu, 800.0,"0777467434"),
AdModel("Poutre", "1 rue Jean-Pierre", R.drawable.pichu, 25.0,"0777467434"),
AdModel("Briques", "2 rue Jean-Michel", R.drawable.pichu, 16.0,"0777467434"),
AdModel("Mur en bois", "4 rue Alain-Juju", R.drawable.pichu, 7.2,"0777467434"),
AdModel("Maison de pierre", "7 rue Joris Belhomme", R.drawable.pichu, 3.99,"0777467434"),
AdModel("Téléphone de Timothé", "8 rue de Timothé", R.drawable.pichu, 0.85,"0777467434"),
AdModel("Oridnateur", "10 rue Jean-Charles", R.drawable.pichu, 104.98,"0777467434"),
AdModel("Charnières", "22 rue Jeanne-Marie", R.drawable.pichu, 2648.97,"0777467434"),
AdModel("Porte en marbre", "1 rue Jean-Pierre", R.drawable.pichu, 480.0,"0777467434"),
AdModel("Cheminée", "33 rue du Gouvernement", R.drawable.pichu, 800.0,"0777467434"),
// Add more AdModel items as needed
)
......
......@@ -10,7 +10,15 @@
android:id="@+id/toggleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="160dp"
android:layout_marginEnd="163dp"
android:background="@color/navy"
android:buttonTint="@color/blueee"
android:checked="true"
android:text="Toggle View"
android:textOff="ListView"
android:textOn="GridView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......
......@@ -5,6 +5,12 @@
android:orientation="vertical"
android:padding="8dp">
<Button
android:id="@+id/callButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Call" />
<ImageView
android:id="@+id/itemListViewImageView"
android:layout_width="117dp"
......
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