Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElBuenoPeso
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Matis SPINELLI
ElBuenoPeso
Commits
1bbccef5
Commit
1bbccef5
authored
Feb 21, 2024
by
Timothé KOBAK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
button
parent
d95f8def
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
21 deletions
+36
-21
AdAdapter.kt
...c/main/java/com/example/elbuenopeso/adapters/AdAdapter.kt
+1
-0
AdModel.kt
app/src/main/java/com/example/elbuenopeso/models/AdModel.kt
+1
-1
MarketFragment.kt
.../java/com/example/elbuenopeso/ui/market/MarketFragment.kt
+20
-20
fragment_market.xml
app/src/main/res/layout/fragment_market.xml
+8
-0
item_listview_ad.xml
app/src/main/res/layout/item_listview_ad.xml
+6
-0
No files found.
app/src/main/java/com/example/elbuenopeso/adapters/AdAdapter.kt
View file @
1bbccef5
...
...
@@ -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
app/src/main/java/com/example/elbuenopeso/models/AdModel.kt
View file @
1bbccef5
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
app/src/main/java/com/example/elbuenopeso/ui/market/MarketFragment.kt
View file @
1bbccef5
...
...
@@ -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
)
...
...
app/src/main/res/layout/fragment_market.xml
View file @
1bbccef5
...
...
@@ -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"
/>
...
...
app/src/main/res/layout/item_listview_ad.xml
View file @
1bbccef5
...
...
@@ -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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment