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
b579c845
Commit
b579c845
authored
Feb 21, 2024
by
Timothé KOBAK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Call Button
parent
1bbccef5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
AdAdapter.kt
...c/main/java/com/example/elbuenopeso/adapters/AdAdapter.kt
+14
-0
No files found.
app/src/main/java/com/example/elbuenopeso/adapters/AdAdapter.kt
View file @
b579c845
import
android.content.Context
import
android.content.Intent
import
android.net.Uri
import
android.util.Log
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
android.widget.BaseAdapter
import
android.widget.Button
import
android.widget.ImageView
import
android.widget.TextView
import
com.example.elbuenopeso.R
...
...
@@ -34,6 +38,16 @@ class AdAdapter(private val context: Context, private val adModelArrayList: List
addressTV
.
text
=
ad
.
address
prixTV
.
text
=
"${usingJavaStringFormat(ad.prix, 2)} €"
val
bouton
:
Button
=
convertView
.
findViewById
(
R
.
id
.
callButton
)
bouton
.
setOnClickListener
{
Log
.
d
(
"TAG"
,
"TEST"
)
val
callIntent
=
Intent
(
Intent
.
ACTION_DIAL
)
callIntent
.
data
=
Uri
.
parse
(
"tel:${ad.num}"
)
context
.
startActivity
(
callIntent
)
}
return
convertView
}
}
\ No newline at end of file
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