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
e1bc847a
Commit
e1bc847a
authored
Feb 22, 2024
by
Lucas NAURY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Supression de la page "profil"
parent
d3f07225
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1 addition
and
89 deletions
+1
-89
MainActivity.java
app/src/main/java/com/example/tpleboncoin/MainActivity.java
+1
-1
NotificationsFragment.java
...e/tpleboncoin/ui/notifications/NotificationsFragment.java
+0
-37
NotificationsViewModel.java
.../tpleboncoin/ui/notifications/NotificationsViewModel.java
+0
-19
fragment_notifications.xml
app/src/main/res/layout/fragment_notifications.xml
+0
-22
bottom_nav_menu.xml
app/src/main/res/menu/bottom_nav_menu.xml
+0
-5
mobile_navigation.xml
app/src/main/res/navigation/mobile_navigation.xml
+0
-5
No files found.
app/src/main/java/com/example/tpleboncoin/MainActivity.java
View file @
e1bc847a
...
@@ -31,7 +31,7 @@ public class MainActivity extends AppCompatActivity {
...
@@ -31,7 +31,7 @@ public class MainActivity extends AppCompatActivity {
// Passing each menu ID as a set of Ids because each
// Passing each menu ID as a set of Ids because each
// menu should be considered as top level destinations.
// menu should be considered as top level destinations.
AppBarConfiguration
appBarConfiguration
=
new
AppBarConfiguration
.
Builder
(
AppBarConfiguration
appBarConfiguration
=
new
AppBarConfiguration
.
Builder
(
R
.
id
.
navigation_home
,
R
.
id
.
navigation_ajout_annonce
,
R
.
id
.
navigation_notifications
)
R
.
id
.
navigation_home
,
R
.
id
.
navigation_ajout_annonce
)
.
build
();
.
build
();
NavController
navController
=
Navigation
.
findNavController
(
this
,
R
.
id
.
nav_host_fragment_activity_main
);
NavController
navController
=
Navigation
.
findNavController
(
this
,
R
.
id
.
nav_host_fragment_activity_main
);
NavigationUI
.
setupActionBarWithNavController
(
this
,
navController
,
appBarConfiguration
);
NavigationUI
.
setupActionBarWithNavController
(
this
,
navController
,
appBarConfiguration
);
...
...
app/src/main/java/com/example/tpleboncoin/ui/notifications/NotificationsFragment.java
deleted
100644 → 0
View file @
d3f07225
package
com
.
example
.
tpleboncoin
.
ui
.
notifications
;
import
android.os.Bundle
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.TextView
;
import
androidx.annotation.NonNull
;
import
androidx.fragment.app.Fragment
;
import
androidx.lifecycle.ViewModelProvider
;
import
com.example.tpleboncoin.databinding.FragmentNotificationsBinding
;
public
class
NotificationsFragment
extends
Fragment
{
private
FragmentNotificationsBinding
binding
;
public
View
onCreateView
(
@NonNull
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
NotificationsViewModel
notificationsViewModel
=
new
ViewModelProvider
(
this
).
get
(
NotificationsViewModel
.
class
);
binding
=
FragmentNotificationsBinding
.
inflate
(
inflater
,
container
,
false
);
View
root
=
binding
.
getRoot
();
final
TextView
textView
=
binding
.
textNotifications
;
notificationsViewModel
.
getText
().
observe
(
getViewLifecycleOwner
(),
textView:
:
setText
);
return
root
;
}
@Override
public
void
onDestroyView
()
{
super
.
onDestroyView
();
binding
=
null
;
}
}
\ No newline at end of file
app/src/main/java/com/example/tpleboncoin/ui/notifications/NotificationsViewModel.java
deleted
100644 → 0
View file @
d3f07225
package
com
.
example
.
tpleboncoin
.
ui
.
notifications
;
import
androidx.lifecycle.LiveData
;
import
androidx.lifecycle.MutableLiveData
;
import
androidx.lifecycle.ViewModel
;
public
class
NotificationsViewModel
extends
ViewModel
{
private
final
MutableLiveData
<
String
>
mText
;
public
NotificationsViewModel
()
{
mText
=
new
MutableLiveData
<>();
mText
.
setValue
(
"This is notifications fragment"
);
}
public
LiveData
<
String
>
getText
()
{
return
mText
;
}
}
\ No newline at end of file
app/src/main/res/layout/fragment_notifications.xml
deleted
100644 → 0
View file @
d3f07225
<?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.notifications.NotificationsFragment"
>
<TextView
android:id=
"@+id/text_notifications"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"8dp"
android:layout_marginTop=
"8dp"
android:layout_marginEnd=
"8dp"
android:textAlignment=
"center"
android:textSize=
"20sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/menu/bottom_nav_menu.xml
View file @
e1bc847a
...
@@ -11,9 +11,4 @@
...
@@ -11,9 +11,4 @@
android:icon=
"@drawable/ic_baseline_add_box_24"
android:icon=
"@drawable/ic_baseline_add_box_24"
android:title=
"@string/title_add"
/>
android:title=
"@string/title_add"
/>
<item
android:id=
"@+id/navigation_notifications"
android:icon=
"@drawable/ic_account_circle_black_24dp"
android:title=
"@string/title_profile"
/>
</menu>
</menu>
\ No newline at end of file
app/src/main/res/navigation/mobile_navigation.xml
View file @
e1bc847a
...
@@ -17,9 +17,4 @@
...
@@ -17,9 +17,4 @@
android:label=
"@string/title_add_top"
android:label=
"@string/title_add_top"
tools:layout=
"@layout/fragment_ajout_annonce"
/>
tools:layout=
"@layout/fragment_ajout_annonce"
/>
<fragment
android:id=
"@+id/navigation_notifications"
android:name=
"com.example.tpleboncoin.ui.notifications.NotificationsFragment"
android:label=
"@string/title_profile"
tools:layout=
"@layout/fragment_notifications"
/>
</navigation>
</navigation>
\ 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