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
9d66263d
Commit
9d66263d
authored
Feb 16, 2024
by
donia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
detailActivity
parent
9dfa0733
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
0 deletions
+98
-0
DetailScreen.java
...rc/main/java/com/example/tpleboncoin/ui/DetailScreen.java
+34
-0
activity_detail_screen.xml
app/src/main/res/layout/activity_detail_screen.xml
+64
-0
No files found.
app/src/main/java/com/example/tpleboncoin/ui/DetailScreen.java
0 → 100644
View file @
9d66263d
package
com
.
example
.
tpleboncoin
.
ui
;
import
androidx.appcompat.app.AppCompatActivity
;
import
com.example.tpleboncoin.databinding.ActivityDetailScreenBinding
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
com.example.tpleboncoin.R
;
public
class
DetailScreen
extends
AppCompatActivity
{
ActivityDetailScreenBinding
binding
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
//setContentView(R.layout.activity_detail_screen);
binding
=
ActivityDetailScreenBinding
.
inflate
(
getLayoutInflater
());
setContentView
(
binding
.
getRoot
());
Intent
intent
=
this
.
getIntent
();
if
(
intent
!=
null
){
String
titre
=
intent
.
getStringExtra
(
"titre"
);
String
adresse
=
intent
.
getStringExtra
(
"adresse"
);
String
description
=
intent
.
getStringExtra
(
"description"
);
Double
prix
=
intent
.
getDoubleExtra
(
"prix"
,
999
);
binding
.
adresseTextView
.
setText
(
adresse
);
binding
.
prixTextView
.
setText
(
prix
.
toString
()+
" €"
);
binding
.
imageView
.
setImageResource
(
R
.
drawable
.
ic_account_circle_black_24dp
);
binding
.
descriptionTextView4
.
setText
(
description
);
binding
.
titreTextView
.
setText
(
titre
);
}
}
}
\ No newline at end of file
app/src/main/res/layout/activity_detail_screen.xml
0 → 100644
View file @
9d66263d
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".ui.detailScreen"
>
<ImageView
android:id=
"@+id/imageView"
android:layout_width=
"0dp"
android:layout_height=
"282dp"
android:layout_marginStart=
"33dp"
app:layout_constraintStart_toStartOf=
"parent"
tools:layout_editor_absoluteY=
"96dp"
/>
<TextView
android:id=
"@+id/titreTextView"
android:layout_width=
"0dp"
android:layout_height=
"42dp"
android:layout_marginTop=
"52dp"
android:text=
"Titre"
android:textSize=
"34sp"
app:layout_constraintStart_toStartOf=
"@+id/descriptionTextView4"
app:layout_constraintTop_toBottomOf=
"@+id/imageView"
/>
<TextView
android:id=
"@+id/prixTextView"
android:layout_width=
"107dp"
android:layout_height=
"0dp"
android:layout_marginTop=
"143dp"
android:layout_marginEnd=
"28dp"
android:text=
"10,33€"
android:textAlignment=
"textStart"
android:textSize=
"34sp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/adresseTextView"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"22dp"
android:layout_marginTop=
"28dp"
android:text=
"TextView"
android:textSize=
"16sp"
android:textStyle=
"italic"
app:layout_constraintStart_toStartOf=
"@+id/titreTextView"
app:layout_constraintTop_toBottomOf=
"@+id/titreTextView"
/>
<TextView
android:id=
"@+id/descriptionTextView4"
android:layout_width=
"0dp"
android:layout_height=
"130dp"
android:layout_marginStart=
"54dp"
android:layout_marginTop=
"32dp"
android:layout_marginEnd=
"54dp"
android:text=
"TextView"
android:textAlignment=
"center"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/adresseTextView"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ 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