Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
22_23-J 04
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
22_23-J 04
22_23-J 04
Commits
a8eda7e3
Commit
a8eda7e3
authored
Feb 03, 2023
by
Anjali W.M.S
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
java class of ADHD home page.
parent
0171c109
Pipeline
#6376
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
0 deletions
+52
-0
app/src/main/java/com/example/salonappnew/ADHDHome.java
app/src/main/java/com/example/salonappnew/ADHDHome.java
+52
-0
No files found.
app/src/main/java/com/example/salonappnew/ADHDHome.java
0 → 100644
View file @
a8eda7e3
package
com.example.salonappnew
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.FragmentManager
;
import
androidx.fragment.app.FragmentTransaction
;
import
android.os.Bundle
;
import
com.example.salonappnew.databinding.ActivityAdhdhomeBinding
;
public
class
ADHDHome
extends
AppCompatActivity
{
ActivityAdhdhomeBinding
binding
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
binding
=
ActivityAdhdhomeBinding
.
inflate
(
getLayoutInflater
());
setContentView
(
binding
.
getRoot
());
replaceFragment
(
new
NewHomeFragment
());
binding
.
bottomNav
.
setOnNavigationItemSelectedListener
(
item
->
{
switch
(
item
.
getItemId
()){
case
R
.
id
.
home
:
replaceFragment
(
new
NewHomeFragment
());
break
;
case
R
.
id
.
profile
:
replaceFragment
(
new
ProfileFragment
());
break
;
case
R
.
id
.
reports
:
replaceFragment
(
new
ReportsFragment
());
break
;
case
R
.
id
.
medicines
:
replaceFragment
(
new
MedicineFragment
());
break
;
}
return
true
;
});
}
private
void
replaceFragment
(
Fragment
fragment
){
FragmentManager
fragmentManager
=
getSupportFragmentManager
();
FragmentTransaction
fragmentTransaction
=
fragmentManager
.
beginTransaction
();
fragmentTransaction
.
replace
(
R
.
id
.
frameLayout
,
fragment
);
fragmentTransaction
.
commit
();
}
}
\ 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