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
d7ce9e22
Commit
d7ce9e22
authored
Feb 22, 2024
by
Alutulu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add num to dbapdapter
parent
4cd4994f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
DbAdapter.kt
...c/main/java/com/example/elbuenopeso/adapters/DbAdapter.kt
+2
-1
DBHelper.kt
...rc/main/java/com/example/elbuenopeso/database/DBHelper.kt
+1
-0
No files found.
app/src/main/java/com/example/elbuenopeso/adapters/DbAdapter.kt
View file @
d7ce9e22
...
@@ -33,6 +33,7 @@ class DbAdapter(context: Context, c: Cursor, layout: Int): CursorAdapter(context
...
@@ -33,6 +33,7 @@ class DbAdapter(context: Context, c: Cursor, layout: Int): CursorAdapter(context
val
address
:
String
=
cursor
.
getString
(
cursor
.
getColumnIndexOrThrow
(
DBHelper
.
ADDRESS
))
val
address
:
String
=
cursor
.
getString
(
cursor
.
getColumnIndexOrThrow
(
DBHelper
.
ADDRESS
))
val
prix
:
Double
=
cursor
.
getDouble
(
cursor
.
getColumnIndexOrThrow
(
DBHelper
.
PRIX
))
val
prix
:
Double
=
cursor
.
getDouble
(
cursor
.
getColumnIndexOrThrow
(
DBHelper
.
PRIX
))
val
image
:
String
=
cursor
.
getString
(
cursor
.
getColumnIndexOrThrow
(
DBHelper
.
IMAGE
))
val
image
:
String
=
cursor
.
getString
(
cursor
.
getColumnIndexOrThrow
(
DBHelper
.
IMAGE
))
val
num
:
String
=
cursor
.
getString
(
cursor
.
getColumnIndexOrThrow
(
DBHelper
.
NUM
))
titleTextView
.
text
=
title
titleTextView
.
text
=
title
addressTextView
.
text
=
address
addressTextView
.
text
=
address
...
@@ -44,7 +45,7 @@ class DbAdapter(context: Context, c: Cursor, layout: Int): CursorAdapter(context
...
@@ -44,7 +45,7 @@ class DbAdapter(context: Context, c: Cursor, layout: Int): CursorAdapter(context
Bouton
.
setOnClickListener
{
Bouton
.
setOnClickListener
{
Log
.
d
(
"TAG"
,
"TEST"
)
Log
.
d
(
"TAG"
,
"TEST"
)
val
callIntent
=
Intent
(
Intent
.
ACTION_DIAL
)
val
callIntent
=
Intent
(
Intent
.
ACTION_DIAL
)
callIntent
.
data
=
Uri
.
parse
(
"tel:$
{Cursor.num}
"
)
callIntent
.
data
=
Uri
.
parse
(
"tel:$
num
"
)
context
.
startActivity
(
callIntent
)
context
.
startActivity
(
callIntent
)
}
}
}
}
...
...
app/src/main/java/com/example/elbuenopeso/database/DBHelper.kt
View file @
d7ce9e22
...
@@ -14,6 +14,7 @@ class DBHelper(context: Context) : SQLiteOpenHelper(context, DB_NAME, null, DB_V
...
@@ -14,6 +14,7 @@ class DBHelper(context: Context) : SQLiteOpenHelper(context, DB_NAME, null, DB_V
const
val
ADDRESS
=
"address"
const
val
ADDRESS
=
"address"
const
val
IMAGE
=
"image_url"
const
val
IMAGE
=
"image_url"
const
val
PRIX
=
"price"
const
val
PRIX
=
"price"
const
val
NUM
=
"123456789"
private
const
val
DB_NAME
=
"LEBONCOIN.DB"
private
const
val
DB_NAME
=
"LEBONCOIN.DB"
private
const
val
DB_VERSION
=
1
private
const
val
DB_VERSION
=
1
...
...
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