Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
uv-amse-android
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
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
Lucas NAURY
uv-amse-android
Commits
0d481251
Commit
0d481251
authored
Feb 21, 2024
by
donia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
detailScreen ver4
parent
9247b977
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
DetailScreen.java
...rc/main/java/com/example/tpleboncoin/ui/DetailScreen.java
+10
-2
No files found.
app/src/main/java/com/example/tpleboncoin/ui/DetailScreen.java
View file @
0d481251
package
com
.
example
.
tpleboncoin
.
ui
;
package
com
.
example
.
tpleboncoin
.
ui
;
import
static
android
.
text
.
Layout
.
JUSTIFICATION_MODE_INTER_WORD
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.appcompat.app.AppCompatActivity
;
import
com.example.tpleboncoin.databinding.ActivityDetailScreenBinding
;
import
com.example.tpleboncoin.databinding.ActivityDetailScreenBinding
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.graphics.text.LineBreaker
;
import
android.net.Uri
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.Button
;
...
@@ -25,10 +30,13 @@ public class DetailScreen extends AppCompatActivity {
...
@@ -25,10 +30,13 @@ public class DetailScreen extends AppCompatActivity {
Annonce
annonce
=
intent
.
getParcelableExtra
(
"annonce"
);
Annonce
annonce
=
intent
.
getParcelableExtra
(
"annonce"
);
binding
.
adresseTextView
.
setText
(
annonce
.
getAdresse
());
binding
.
adresseTextView
.
setText
(
annonce
.
getAdresse
());
binding
.
prixTextView
.
setText
(
Double
.
toString
(
annonce
.
getPrix
())
+
" €"
);
binding
.
prixTextView
.
setText
(
String
.
format
(
"%,.2f €"
,
annonce
.
getPrix
()))
;
binding
.
imageView
.
setImageResource
(
R
.
drawable
.
ic_account_circle_black_24dp
);
binding
.
descriptionTextView4
.
setText
(
annonce
.
getDescription
());
binding
.
descriptionTextView4
.
setText
(
annonce
.
getDescription
());
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
)
{
binding
.
descriptionTextView4
.
setJustificationMode
(
LineBreaker
.
JUSTIFICATION_MODE_INTER_WORD
);
}
binding
.
titreTextView
.
setText
(
annonce
.
getTitre
());
binding
.
titreTextView
.
setText
(
annonce
.
getTitre
());
binding
.
imageView
.
setImageURI
(
Uri
.
parse
(
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQuN0ilDzXue08UjwoRi4jiqj0Y9FWs7jDhYY949clvcVYpoCUZzH1OkTKv5-FqBHDwKG0&usqp=CAU"
));
}
}
binding
.
smsButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
binding
.
smsButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
...
...
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