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
4cd4994f
Commit
4cd4994f
authored
Feb 22, 2024
by
Timothé KOBAK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
call button ?
parent
dac8b0cd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
18 deletions
+24
-18
deploymentTargetDropDown.xml
.idea/deploymentTargetDropDown.xml
+1
-17
DbAdapter.kt
...c/main/java/com/example/elbuenopeso/adapters/DbAdapter.kt
+16
-0
DbAdModel.kt
...src/main/java/com/example/elbuenopeso/models/DbAdModel.kt
+1
-1
item_listview_ad.xml
app/src/main/res/layout/item_listview_ad.xml
+6
-0
No files found.
.idea/deploymentTargetDropDown.xml
View file @
4cd4994f
...
...
@@ -2,24 +2,8 @@
<project
version=
"4"
>
<component
name=
"deploymentTargetDropDown"
>
<value>
<entry
key=
"Basic"
>
<State
/>
</entry>
<entry
key=
"app"
>
<State>
<targetSelectedWithDropDown>
<Target>
<type
value=
"QUICK_BOOT_TARGET"
/>
<deviceKey>
<Key>
<type
value=
"VIRTUAL_DEVICE_PATH"
/>
<value
value=
"$USER_HOME$/.android/avd/Medium_Phone_API_34.avd"
/>
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown
value=
"2024-02-20T19:11:44.730496602Z"
/>
</State>
<State
/>
</entry>
</value>
</component>
...
...
app/src/main/java/com/example/elbuenopeso/adapters/DbAdapter.kt
View file @
4cd4994f
package
com.example.elbuenopeso.adapters
import
android.content.Context
import
android.content.Intent
import
android.database.Cursor
import
android.net.Uri
import
android.util.Log
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
android.widget.Button
import
android.widget.CursorAdapter
import
android.widget.ImageView
import
android.widget.TextView
...
...
@@ -35,6 +38,19 @@ class DbAdapter(context: Context, c: Cursor, layout: Int): CursorAdapter(context
addressTextView
.
text
=
address
prixView
.
text
=
"${usingJavaStringFormat(prix, 2)} €"
val
Bouton
:
Button
=
view
.
findViewById
(
R
.
id
.
buttonCall
)
Bouton
.
setOnClickListener
{
Bouton
.
setOnClickListener
{
Log
.
d
(
"TAG"
,
"TEST"
)
val
callIntent
=
Intent
(
Intent
.
ACTION_DIAL
)
callIntent
.
data
=
Uri
.
parse
(
"tel:${Cursor.num}"
)
context
.
startActivity
(
callIntent
)
}
}
imageView
.
setImageURI
(
Uri
.
parse
(
image
))
}
}
\ No newline at end of file
app/src/main/java/com/example/elbuenopeso/models/DbAdModel.kt
View file @
4cd4994f
package
com.example.elbuenopeso.models
class
DbAdModel
(
var
_id
:
Int
,
var
title
:
String
,
var
address
:
String
,
var
image
:
String
,
var
prix
:
Double
)
{
class
DbAdModel
(
var
_id
:
Int
,
var
title
:
String
,
var
address
:
String
,
var
image
:
String
,
var
prix
:
Double
,
var
num
:
String
)
{
}
\ No newline at end of file
app/src/main/res/layout/item_listview_ad.xml
View file @
4cd4994f
...
...
@@ -5,6 +5,12 @@
android:orientation=
"vertical"
android:padding=
"8dp"
>
<Button
android:id=
"@+id/buttonCall"
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