Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022-005
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
2022-005
2022-005
Commits
cd3a0f5a
Commit
cd3a0f5a
authored
Oct 10, 2022
by
Chathura IT19243986
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
83730e28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
ViewPagerAdapter.java
ViewPagerAdapter.java
+36
-0
No files found.
ViewPagerAdapter.java
0 → 100644
View file @
cd3a0f5a
package
com.example.peopluz1
;
import
androidx.annotation.NonNull
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.FragmentActivity
;
import
androidx.viewpager2.adapter.FragmentStateAdapter
;
import
com.example.peopluz1.fragments.Checker
;
import
com.example.peopluz1.fragments.Notification
;
import
com.example.peopluz1.fragments.Update
;
public
class
ViewPagerAdapter
extends
FragmentStateAdapter
{
public
ViewPagerAdapter
(
@NonNull
FragmentActivity
fragmentActivity
)
{
super
(
fragmentActivity
);
}
@NonNull
@Override
public
Fragment
createFragment
(
int
position
)
{
switch
(
position
){
case
0
:
return
new
Update
();
case
1
:
return
new
Notification
();
case
2
:
return
new
Checker
();
default
:
return
new
Update
();
}
}
@Override
public
int
getItemCount
()
{
return
3
;
}
}
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