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
bb778c5b
Commit
bb778c5b
authored
Feb 21, 2024
by
donia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
detailActivity-smsButton
parent
182d2f13
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
153 additions
and
61 deletions
+153
-61
DetailScreen.java
...rc/main/java/com/example/tpleboncoin/ui/DetailScreen.java
+12
-0
baseline_message_24.xml
app/src/main/res/drawable/baseline_message_24.xml
+6
-0
activity_detail_screen.xml
app/src/main/res/layout/activity_detail_screen.xml
+135
-61
No files found.
app/src/main/java/com/example/tpleboncoin/ui/DetailScreen.java
View file @
bb778c5b
...
...
@@ -5,6 +5,9 @@ import com.example.tpleboncoin.databinding.ActivityDetailScreenBinding;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.ImageButton
;
import
com.example.tpleboncoin.R
;
import
com.example.tpleboncoin.models.Annonce
;
...
...
@@ -27,5 +30,14 @@ public class DetailScreen extends AppCompatActivity {
binding
.
descriptionTextView4
.
setText
(
annonce
.
getDescription
());
binding
.
titreTextView
.
setText
(
annonce
.
getTitre
());
}
binding
.
smsButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
arg0
)
{
Intent
smsIntent
=
new
Intent
(
Intent
.
ACTION_MAIN
);
smsIntent
.
addCategory
(
Intent
.
CATEGORY_APP_MESSAGING
);
startActivity
(
smsIntent
);
}
});
}
}
\ No newline at end of file
app/src/main/res/drawable/baseline_message_24.xml
0 → 100644
View file @
bb778c5b
<vector
android:alpha=
"0.95"
android:autoMirrored=
"true"
android:height=
"24dp"
android:tint=
"#FFFFFF"
android:viewportHeight=
"24"
android:viewportWidth=
"24"
android:width=
"24dp"
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<path
android:fillColor=
"@android:color/white"
android:pathData=
"M20,2L4,2c-1.1,0 -1.99,0.9 -1.99,2L2,22l4,-4h14c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM18,14L6,14v-2h12v2zM18,11L6,11L6,9h12v2zM18,8L6,8L6,6h12v2z"
/>
</vector>
app/src/main/res/layout/activity_detail_screen.xml
View file @
bb778c5b
<?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"
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<com.google.android.material.appbar.AppBarLayout
android:id=
"@+id/appbar"
android:layout_width=
"match_parent"
android:layout_height=
"161dp"
>
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width=
"match_parent"
android:layout_height=
"157dp"
app:contentScrim=
"?attr/colorPrimary"
app:layout_scrollFlags=
"scroll|exitUntilCollapsed"
app:toolbarId=
"@+id/toolbar"
>
<androidx.appcompat.widget.Toolbar
android:id=
"@+id/toolbar"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
></androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:layout_behavior=
"com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".ui.detailScreen"
>
...
...
@@ -9,17 +44,20 @@
<ImageView
android:id=
"@+id/imageView"
android:layout_width=
"0dp"
android:layout_height=
"282dp"
android:layout_marginStart=
"33dp"
android:layout_height=
"250dp"
android:layout_marginStart=
"28dp"
android:layout_marginTop=
"32dp"
app:layout_constraintStart_toStartOf=
"parent"
tools:layout_editor_absoluteY=
"96dp
"
/>
app:layout_constraintTop_toTopOf=
"parent
"
/>
<TextView
android:id=
"@+id/titreTextView"
android:layout_width=
"0dp"
android:layout_height=
"42dp"
android:layout_marginTop=
"52dp"
android:layout_marginStart=
"4dp"
android:layout_marginTop=
"16dp"
android:text=
"Titre"
android:textColor=
"#000000"
android:textSize=
"34sp"
app:layout_constraintStart_toStartOf=
"@+id/descriptionTextView4"
app:layout_constraintTop_toBottomOf=
"@+id/imageView"
/>
...
...
@@ -28,11 +66,14 @@
android:id=
"@+id/prixTextView"
android:layout_width=
"107dp"
android:layout_height=
"0dp"
android:layout_marginTop=
"143
dp"
android:layout_marginEnd=
"28
dp"
android:layout_marginTop=
"108
dp"
android:layout_marginEnd=
"32
dp"
android:text=
"10,33€"
android:textAlignment=
"textStart"
android:textSize=
"34sp"
android:textAlignment=
"center"
android:textAllCaps=
"false"
android:textColor=
"#673AB7"
android:textSize=
"29sp"
android:textStyle=
"bold"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
...
...
@@ -40,9 +81,11 @@
android:id=
"@+id/adresseTextView"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"22
dp"
android:layout_marginTop=
"28
dp"
android:layout_marginStart=
"4
dp"
android:layout_marginTop=
"12
dp"
android:text=
"TextView"
android:textAlignment=
"center"
android:textColor=
"#673AB7"
android:textSize=
"16sp"
android:textStyle=
"italic"
app:layout_constraintStart_toStartOf=
"@+id/titreTextView"
...
...
@@ -53,12 +96,43 @@
android:layout_width=
"0dp"
android:layout_height=
"130dp"
android:layout_marginStart=
"54dp"
android:layout_marginTop=
"32
dp"
android:layout_marginTop=
"28
dp"
android:layout_marginEnd=
"54dp"
android:text=
"TextView"
android:textAlignment=
"center"
android:textAllCaps=
"false"
android:textColor=
"#000000"
android:textStyle=
"italic"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.0"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/adresseTextView"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<Button
android:id=
"@+id/smsButton"
android:layout_width=
"131dp"
android:layout_height=
"47dp"
android:layout_marginStart=
"144dp"
android:layout_marginTop=
"26dp"
android:layout_marginEnd=
"10dp"
android:paddingLeft=
"10dp"
android:paddingTop=
"5dp"
android:paddingEnd=
"5dp"
android:paddingRight=
"5dp"
android:paddingBottom=
"5dp"
android:text=
"Contacter"
android:textSize=
"11sp"
app:icon=
"@drawable/baseline_message_24"
app:layout_constraintBottom_toTopOf=
"@+id/titreTextView"
app:layout_constraintEnd_toEndOf=
"@+id/prixTextView"
app:layout_constraintHorizontal_bias=
"0.0"
app:layout_constraintStart_toEndOf=
"@+id/imageView"
app:layout_constraintTop_toBottomOf=
"@+id/prixTextView"
app:layout_constraintVertical_bias=
"0.0"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ 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