Welcome and thanks. God bless you also. Subscribe and share to help us
@muhammadal83973 жыл бұрын
@@MasterCodingTeam with my pleasure ... but i have one problem, when i click the tab the fragment is following but when i slide the fargment manualy the tab didn't follow, i hope you can help me solve the problem. Thx
@MasterCodingTeam3 жыл бұрын
Hello. Please check that you have added the fragment.begintransaction() to oncreate method
@muhammadal83973 жыл бұрын
@@MasterCodingTeam i didn't found any of that code in this video, can you tell me ?
@MasterCodingTeam3 жыл бұрын
Get all our channel source codes from our udemy course www.udemy.com/course/the-complete-android-10-developer-course-mastering-android/?referralCode=416B077A169809EF5F31
@peterevans87432 жыл бұрын
What a great tutorial. Uses basic environment and shows a very concise way to build the tabs. What's more, the resultant code works which is more than I can say about other tutorials I've watched. Great work
@MasterCodingTeam2 жыл бұрын
Welcome and thanks. Subscribe to join our family 😘🤩
@tejasbele14564 жыл бұрын
For swipe the viewPager, we have to add the PageListener too. Add this function after addOnTabSelectedListener.. Here is the function :- viewPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout)); With this you will be able to swipe viewPager :)
@kenkencw12243 жыл бұрын
omg thanks~ you saved me!
@MasterCodingTeam3 жыл бұрын
Welcome. Subscribe and share to help us
@rbouaf3 жыл бұрын
THANK YOU SIR
@MasterCodingTeam3 жыл бұрын
Thanks. Subscribe to join our family
@brserralheiro4 жыл бұрын
Nice tutorial. 9:12 constructor without param behavior is depricated. Given this is a 2020 video, maybe it is worth mentioning it. Behavior param determines if only current fragments are in a resumed state. If 1 is passed in, then only the current Fragment is in the Lifecycle.State.RESUMED state. All other fragments are capped at Lifecycle.State.STARTED If 0 is passed, all fragments are in the Lifecycle.State.RESUMED state and there will be callbacks to Fragment.setUserVisibleHint(boolean). Additionally, according to docs available, "this version of the pager is best for use when there are a handful of typically more static fragments to be paged through, such as a set of tabs. [ just like this nice example show here ] The fragment of each page the user visits will be kept in memory, though its view hierarchy may be destroyed when not visible. This can result in using a significant amount of memory since fragment instances can hold on to an arbitrary amount of state. For larger sets of pages, consider using FragmentStatePagerAdapter" Anyway, both are in deprication phase, so there is not much option left. Hope to have added some value. Best.
@Krutarth_Vaishnav_3 жыл бұрын
Thank You Soo Much This is Exactly I Was Looking For.. The Last Line Of Changing Fragment While Clicking On Tab Has Saved My Project.. 🙏🙏😀😀😀😀😀 YOU DESERVE A SUBSCRIPTION
@MasterCodingTeam3 жыл бұрын
Hehhehe welcome and thanks. Subscribe to get new android tutorials
@Krutarth_Vaishnav_3 жыл бұрын
@@MasterCodingTeam Subscribed! 😀
@MasterCodingTeam3 жыл бұрын
Welcome to our family
@Krutarth_Vaishnav_3 жыл бұрын
@@MasterCodingTeam 😊
@jyoti5834 жыл бұрын
Awesome tutorial, it worked , thanks 🙂🙌. Those who are facing issue with deprecated super(fm), just replace it with super(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT);
@MasterCodingTeam4 жыл бұрын
Thanks jojo
@xiholliday4 жыл бұрын
Ty man
@MasterCodingTeam4 жыл бұрын
Welcome. Subscribe to get more
@anashouissa94894 жыл бұрын
thankk youu bro
@MasterCodingTeam4 жыл бұрын
Welcome
@RohinMaharjan3 жыл бұрын
If you need to switch tab indicators with swipe: viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() { @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { } @Override public void onPageSelected(int position) { tabLayout.selectTab(tabLayout.getTabAt(position)); } @Override public void onPageScrollStateChanged(int state) { } });
@sammyboy_adventures3 жыл бұрын
Its really good. But im facing an issue in which, when i tap the tablayout buttons the indicator works, but when we scroll the viewpages of each tab sideways, the view scrolls which is good...but the tab indicator remains on the start only and does not move along with the scroll. Please suggest what do i do?
@MasterCodingTeam3 жыл бұрын
Check your oncreate() and check fragment transaction
@sammyboy_adventures3 жыл бұрын
@@MasterCodingTeam Ok Thanks, worked on it a bit...its working well now
@hugoperez84934 жыл бұрын
thank you so much ¿its possible to add webviews in each TabLayout??
@malaiibaig3 жыл бұрын
Can we use fragments and nav graph with viewpager and tablayout?
@MasterCodingTeam3 жыл бұрын
Yes
@martino57694 жыл бұрын
Thanks a lot for the tutorial. I have this problem: if i tap on the tabs the Fragment doesn't changing. How to fix it? I added a TabLayout.OnTabSelectedListener() so what I've to code in the OnTabSelected() method?
@MasterCodingTeam4 жыл бұрын
Yes
@kidzhobby3 жыл бұрын
very cool , can you make a tutorial on how to search from list in fragments which are in tabbed activity from main activity
@MasterCodingTeam3 жыл бұрын
Hello. Check the searchview tutorial in iur course
@veronikawilliams7774 жыл бұрын
Realy cool )) Thanks!!!
@MasterCodingTeam4 жыл бұрын
Thanks for honest
@MasterCodingTeam4 жыл бұрын
Subscribe to get more tutorials
@peterartman4 жыл бұрын
Thanks a lot, I was looking for this tutorial for a long time!!! I would appreciate if you will create a tutorial how to scan barcodes with ML Kit on Android. Thx again
@MasterCodingTeam4 жыл бұрын
Thanks for your request. Welcome
@tomas628894 жыл бұрын
Hi ,First thanks for sharing this useful video it wokrs, but I get some problem It works when I click the TabItem(ex:chats,status) When I slide the page,the page will change,but tabitem won't work (ex:when I'm in chats page,I slide the screen,It will change to status,but Tabltem will still at chats) Is there anyway to fix this problem?Or I miss anything in your video? Thanks again for your great help!
@MasterCodingTeam4 жыл бұрын
Please check your adapter class and make fragment transaction in correct way
@tomas628894 жыл бұрын
@@MasterCodingTeam Sorry for the late reply,I have try this for this two weeks,but the problem is still there. I think I have follow all of the steps in the video. Click the tab is work. But when I "Slide the Page" ,the tabitem won't change together In this video you didn't slide it so I think you app could have the same problem?
@MasterCodingTeam4 жыл бұрын
Please check that your fragments are well created as the video?
@tomas628894 жыл бұрын
Master Coding Yes I done it step by step But I don’t know why this problem still there
@MasterCodingTeam4 жыл бұрын
Hello. Can you comment below the error stack and log
@iamnoob69764 жыл бұрын
Excellent Video Tutorial!! Thanks a lot
@MasterCodingTeam4 жыл бұрын
Welcome. Subscribe to get latest tuts
@fersilent38844 жыл бұрын
Thanks excellent tutorial, maybe you could do a tutorial explaining. How to add a Swipe View with Tabs in Navigation Drawer
@MasterCodingTeam4 жыл бұрын
Hello and thanks for your comment. We made a video about your request so check it on our channel
@fersilent38844 жыл бұрын
@@MasterCodingTeam Thanks for answering, but I have searched for that video on your channel and I can't find it, maybe you could help me with the video link
@MasterCodingTeam4 жыл бұрын
This video is well clear and you can follow all steps from zero to finish. This video is professional and well tested
@user-xe8vl9eh9l2 жыл бұрын
hi love your channel and i love to download the app ,but theres one problem ,i am concerned about about my phone storage does the app uses local database or it fetches data from cloud so i dont have to worry about my storage
@aliaaabdelrahaman56984 жыл бұрын
Such an amazing tutorial, it helped me a lot with my project. Can you also please do another tutorial about customizing calendars and how to add events to it, something similar to google calendar.
@MasterCodingTeam4 жыл бұрын
Ofcourse bro
@Patrizia-tl3cd3 жыл бұрын
hi! Your video is really very helpful and I thank you. but I keep having problems with the Layout of my activity_main Could I ask you if I can see the full code of your activity_main.xml? Thx :-)
@MasterCodingTeam3 жыл бұрын
Hello and thanks for your comment. You can get all source codes of our channel on udemy course www.udemy.com/course/the-complete-android-10-developer-course-mastering-android/?referralCode=416B077A169809EF5F31 Get enrolled in our udemy course. Don't miss to subscribe and share our videos
@Legend-yh2pg4 жыл бұрын
This was amazing, great work !!!! Can you do a tutorial where you update this whit some fragment comunication whit activity and other fragmnents, recycle view as a fragment would mean a loot, ty
@MasterCodingTeam4 жыл бұрын
Welcome. We will make your tutorial soon
@androidApiCrack4 жыл бұрын
public class MyAdapter extends FragmentPagerAdapter { private Context myContext; int totalTabs; public MyAdapter(Context context, FragmentManager fm, int totalTabs) { super(fm); myContext = context; this.totalTabs = totalTabs; } // this is for fragment tabs @Override public Fragment getItem(int position) { switch (position) { case 0: DashBoardFrag homeFragment = new DashBoardFrag(); return homeFragment; case 1: sellsFragment sportFragment = new sellsFragment(); return sportFragment; case 2: CreditFragment movieFragment = new CreditFragment(); return movieFragment; default: return null; } } // this counts total number of tabs @Override public int getCount() { return totalTabs; } } in Main Activity public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TabLayout tabLayout = findViewById(R.id.tabMode); TabItem db = findViewById(R.id.dashboard); TabItem sells = findViewById(R.id.sales); TabItem credit = findViewById(R.id.credit); final ViewPager viewPager = findViewById(R.id.viewpager); final MyAdapter adapter = new MyAdapter(this,getSupportFragmentManager(), tabLayout.getTabCount()); viewPager.setAdapter(adapter); viewPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout)); tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() { @Override public void onTabSelected(TabLayout.Tab tab) { viewPager.setCurrentItem(tab.getPosition()); } @Override public void onTabUnselected(TabLayout.Tab tab) { } @Override public void onTabReselected(TabLayout.Tab tab) { } }); } }
@mloic473 жыл бұрын
Followed the tutorial thrice already but when i click on a tab a fragment is not ben called
@sanshezakou77744 жыл бұрын
thanks u bro but just if u can put the source code in ur next tutorials it will be more amazing thank u again
@MasterCodingTeam4 жыл бұрын
Thanks and welcome
@pstlvictoras4 жыл бұрын
@@MasterCodingTeam dose not work for me, can i have your source code on github?
@criaturahumanocriador4 жыл бұрын
Thank you a lot. Just wht i needed. when i sweap tabs (no clicking) the tabs headers wont change selected. any idea? tnks again
@MasterCodingTeam4 жыл бұрын
Welcome... you can set them in the toolbar
@criaturahumanocriador4 жыл бұрын
@@MasterCodingTeam tnx. i found this solution. added: viewPager.addOnPageChangeListener(new TabLayout .TabLayoutOnPageChangeListener(tabLayout)); after tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {}. Thanks again
@MasterCodingTeam4 жыл бұрын
Welcome bro ... we hope you enjoy our videos and courses
@MasterCodingTeam4 жыл бұрын
Please subscribe to get latest turorials
@SVIT_ochyma_smartphone4 жыл бұрын
@@criaturahumanocriador viewPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout)); I have addOnPageChangeListener a red glow and (tabLayout), how to fix?
@keirapascua20313 жыл бұрын
Is there a way to change the colour of the line once a tab is selected?
@MasterCodingTeam3 жыл бұрын
Yes. Make a drawable and link it with tab layout
@mitra92344 жыл бұрын
Hey buddy thanks for the amazing tutorial , the line bellow the tab bar doesnt move when i swipe it only moves when i click on the tab item itself , what should i do ?
@MasterCodingTeam4 жыл бұрын
You need to add fragment transaction in oncreate method
@MasterCodingTeam4 жыл бұрын
Yes thanks
@chinmayrao38314 жыл бұрын
How do we access an item, like a textView in one of the fragment, using findViewById ???
@yokotemaki82284 жыл бұрын
amazing content but can you do it with NavigationBottomView?
@MasterCodingTeam4 жыл бұрын
Ok
@tejasbele14564 жыл бұрын
I am not getting respective results after swipe
@MasterCodingTeam4 жыл бұрын
Please check your fragment.transaction()
@tejasbele14564 жыл бұрын
I got the solution -> For swipe, we have to add the PageListener too. Here is the function :- viewPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout)); With this you will be able to swipe viewPager :)
@MasterCodingTeam4 жыл бұрын
THnks for your feedback.
@tejasbele14564 жыл бұрын
@@MasterCodingTeam 😁
@tevashoru64353 жыл бұрын
Hi, how do I manage to get the status fragment as the main fragment when the app is launched ? And when I swip (not click) between each fragments the current item on the tabLayout doesn't change
@MasterCodingTeam3 жыл бұрын
Make this change on the onCreate() and make fragment.BeginTransaction()
@tevashoru64353 жыл бұрын
@@MasterCodingTeam I use viewPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout)); for the swip but I don't find any command to make the middle fragment defined as the main one
@MasterCodingTeam3 жыл бұрын
Please check the last part of this video
@tomislav28604 жыл бұрын
Great tutorial. Can you show us how to add listview with checkboxes in each of these fragment instead of text?
@tomislav28604 жыл бұрын
Or even better recyclerview with checkboxes :)
@MasterCodingTeam4 жыл бұрын
Ok man we will do it soon
@ActressandModels3 жыл бұрын
thank you
@MasterCodingTeam3 жыл бұрын
Welcome. Subscribe to join our family
@adityanair35664 жыл бұрын
hey! Can you tell me how to display a Listframent in tablayout? My normal fragments are displayed properly but my ListFragment isnt showung any list.
@MasterCodingTeam4 жыл бұрын
Hello. Use viewpager
@adityanair35664 жыл бұрын
@@MasterCodingTeam Thanks a lot for replying. But I think you didn't get my point. Ofcourse I used viewpager2 and my usual fragments are working fine. Problem is I can't get my Listfragment to show it's list contents. My first tab is blank fragment with a text, which is working fine. Second, third and fourth tabs are Listfragments with a list content in it. But it's not showing anything
@MasterCodingTeam4 жыл бұрын
Hello my friend. Did you add the layout for fragment 3 & 4 ? Did you include the fragments in your transaction process ?
@HyperionTseng3 жыл бұрын
my adapter is null so can't use this >< Attempt to invoke virtual method 'int com.google.android.material.tabs.TabLayout.getTabCount()' on a null object reference
@MasterCodingTeam3 жыл бұрын
Check that you implemented the correct package for tablayout
@sciencesome73003 жыл бұрын
I can change fragment by swiping how to disable it?
@MasterCodingTeam3 жыл бұрын
setSwipe(Disabled
@sciencesome73003 жыл бұрын
@@MasterCodingTeam I was trying viewPager.setSwipe(Disabled) but, there's no function called *setSwipe*
@dwightkschrute21114 жыл бұрын
When I click on the tabs everything is working like in the tutorial however when I swipe the fragment changes but the position of the tab item in the tab layout doesn't
@dwightkschrute21114 жыл бұрын
Dw figured it out
@MasterCodingTeam4 жыл бұрын
Hello. Please add fragment.begintransaction() in the oncreate method
@dwightkschrute21114 жыл бұрын
@@MasterCodingTeam thanks for the help
@BappaSaikh4 жыл бұрын
i want to see tab layout design as like as chrome
@MasterCodingTeam4 жыл бұрын
Ok coming soon
@yashchaudhary99144 жыл бұрын
Keet it up bro👍👍
@MasterCodingTeam4 жыл бұрын
Thanks for honest people like you.... we are creating new tutorials just for people like you
@OZON_JihadE4 жыл бұрын
Thanks for your Tutrial, But I Have a problem (java.lang.ClassCastException: androidx.constraintlayout.widget.ConstraintLayout cannot be cast to com.google.android.material.tabs.TabLayout) can your help me please.
@MasterCodingTeam4 жыл бұрын
Hello. You can't transform constraint to tablayout. Also you need to add material library dependency in gradle
@matt-i3r6w4 жыл бұрын
I have the prroblem too , how do i fix it?
@MultiGamer01234 жыл бұрын
Help: When I´m swiping the Tabs are not refreshing(Fragment switches but the tab which is used is not refreshing)
@MasterCodingTeam4 жыл бұрын
Check fragment.beginTransaction in onresume
@aayushmeshram48624 жыл бұрын
@@MasterCodingTeam Please elaborate, even I got the same doubt
@MasterCodingTeam4 жыл бұрын
Check your on resume and oncreate method
@MasterCodingTeam4 жыл бұрын
Put code in onCreate()
@MasterCodingTeam4 жыл бұрын
Ok man. Check our fragment video and learn how to use fragment transaction
@ShegerAi4 жыл бұрын
No Error but The program crashs i have tryed it multiple times
@bzgede35334 жыл бұрын
Hello how can i open it. New fragment in the same area without leaving the tablayout when the button on the fragment is clicked.?
@MasterCodingTeam4 жыл бұрын
Yes. Fragment transaction()
@bzgede35334 жыл бұрын
@@MasterCodingTeam Could you write a sample code. ? I would be very pleased. Thanks from Turkey :)
@MasterCodingTeam4 жыл бұрын
Welcome for all and for turkey. Just make two fragments and make transaction. See our fragments turorials
@JohnSmith-dr5zn4 жыл бұрын
New to android studio, I can't find android.viewpager(.widget.Viewpager). Is there something I need to import?
@MasterCodingTeam4 жыл бұрын
Add the viewpager dependency
@danielecampopiano4 жыл бұрын
@@MasterCodingTeam how can i do it?
@MasterCodingTeam4 жыл бұрын
Search for viewpager dependency on google and then add it to gradle
@rishdhimuhammed2583 жыл бұрын
activity must implement OnFragmentInteractionListener error please i am getting this error help me out
@MasterCodingTeam3 жыл бұрын
Yes exaclty. Add fraent transacrion method on oncreat()
@tomhs88824 жыл бұрын
Hello, I have problem. I see tabs after running program, but not fragments layout (text and colored background). Android studio say that my variables for tabChat etc. are never used and in your video they are yellow and underscored. My are grayed out. What is problem, why I cant see fragments in my tabs ? Thanks.
@MasterCodingTeam4 жыл бұрын
You should make fragment.beginTransaction(l
@tomhs88824 жыл бұрын
@@MasterCodingTeam How I do that and where in this program ? Is it somewhere in Pager adapter or activity main class ?
@MasterCodingTeam4 жыл бұрын
In the fragment adapter
@Zoohnyyy4 жыл бұрын
@@MasterCodingTeam i have the same problem, i see the tabs but not the content inside
@sandeepdas18834 жыл бұрын
In viewPager.setAdapter(pagerAdapter) it says required type : Adapter and provided type : pagerAdapter . How do I fix it ?
@MasterCodingTeam4 жыл бұрын
You need to update your sdk then attach the adapter
@egemeninceler31154 жыл бұрын
we recreating fragment classes every time we slide, right ? btw thanks a lot.
@MasterCodingTeam4 жыл бұрын
Yes that's it. Thanks. Subscribe to get latest tutorials
@itszechs4 жыл бұрын
please don't use dark theme for tutorials
@MasterCodingTeam4 жыл бұрын
Welcome and thanks for advise
@chinmayrao38314 жыл бұрын
problem while swipe actions wont switch the tabs? use this, tabLayout.addOnTabSelectedListener(this);
@MasterCodingTeam4 жыл бұрын
Put the methods onCreate()
@chinmayrao38314 жыл бұрын
@@MasterCodingTeam I tried but didn't work
@MasterCodingTeam4 жыл бұрын
Check if tbe documentations has been changed
@pstlvictoras4 жыл бұрын
Did not work for my project, do you have an link for code source?Thank you!
@yanishappadoo90672 жыл бұрын
how can i add a recyclerview with data on one fragment and move it to the next fragment
@MasterCodingTeam2 жыл бұрын
The same way as the video
@sajjadanas34443 жыл бұрын
Help,,,im newbie Tab wasn’t swiping with fragment but it is working onClick. So i add tablayout.setupwithviewpager(viewpager) Now tab is swiping with fragment but there is no Text or icon on the Tab 👉😶👈
@MasterCodingTeam3 жыл бұрын
Hello. Add the swipe capability in tabs. Check the layout plz
@sajjadanas34443 жыл бұрын
@@MasterCodingTeamtabs woking with fragments, everything fine Now i want to add a custom listView on a fragment, I tried but it showing error. Any tutorial available? Without recycleView
@MasterCodingTeam3 жыл бұрын
Hello. Please check our tutorials on our playlists.
@akbarrizaldi29894 жыл бұрын
Thanks Brow
@MasterCodingTeam4 жыл бұрын
Welcome. Subscribe to get more tuts.
@aliaaabdelrahaman56984 жыл бұрын
I have done all the steps but for some reasons when I run the program it keeps stopping and I can't see all the work done! Can you help me figure out why is this happening please?
@akankshasinha18034 жыл бұрын
While running the app in mobile its not starting. Rather just a black screen comes and the app closes. Can someone thell the issue?
@MasterCodingTeam4 жыл бұрын
Check your device if it meets the min requirements
@akankshasinha18034 жыл бұрын
@@MasterCodingTeam minimum requirements like?
@MasterCodingTeam4 жыл бұрын
Check the latest video about installing android studio and emulator on our channel
@akankshasinha18034 жыл бұрын
@@MasterCodingTeam okhy thanks
@ayansarkar23573 жыл бұрын
addOnTabSelectedListener is not working. I mean it is showing there is no method with this name. Can you help me with that ?
@preetojha94224 жыл бұрын
Do you know how to pass an integer data from Activity to Tab layout Fragments on Android Studio.... plz give answer fast as you can .
@MasterCodingTeam4 жыл бұрын
Hello. Just use MVVM or shared prefrences. You can check our tutorials about these topics
@DjLiveMusic4 жыл бұрын
Tab indicator can't be showing
@MasterCodingTeam4 жыл бұрын
Check the video again plz
@DjLiveMusic4 жыл бұрын
@@MasterCodingTeam Please make a tutorial about seekbar advanced
@MasterCodingTeam4 жыл бұрын
Welcome and thanks for your request. Your request has been registered. Plz share our channel
@Mardiyansahok4 жыл бұрын
please help me? how to view data josn at fragment?
@MasterCodingTeam4 жыл бұрын
Hello. Please check our json course with retrofit
@hiraaziz62744 жыл бұрын
viewPager.setAdapter(pagerAdapter); viewPager.setCurrentItem(tab.getPosition()); there is error in setAdapter (red) and setCurrentItem(red)
@MasterCodingTeam4 жыл бұрын
Check your fragment names
@vicvic79684 жыл бұрын
Sir how to use tab layout with fragment bottom?
@MasterCodingTeam4 жыл бұрын
Yes
@vicvic79684 жыл бұрын
@@MasterCodingTeam Does Fragment support scroll view?
@ankitchopkar77874 жыл бұрын
in fragment screen how to write tablayout.addOnTabSelectedListner(new TabLayout.OnTabSelectedListner()) please tell me sir
@MasterCodingTeam4 жыл бұрын
Hello, Just retype it again just: tablayout.addonTabSelectedListener
@haziqaharman59194 жыл бұрын
hii, this help a lot but im having problem with tableLayout.getTabCount()); my getTabCount is red and idk what the problem with that :(
@MasterCodingTeam4 жыл бұрын
Yes you need to update sdk
@haziqaharman59194 жыл бұрын
Okay thankyou sir! Do you have any tutorial for any sandbox online payment too? If not i would love to see that tutorial
@MasterCodingTeam4 жыл бұрын
No. We will make it soon
@haziqaharman59194 жыл бұрын
Hi sir i update the sdk but still red tho should i unistall and install again?
@MasterCodingTeam4 жыл бұрын
Yes try it
@ankitchopkar77874 жыл бұрын
In my tab item text appears in the capital letter but I want tab item text in small case letter please tell me, sir
@MasterCodingTeam4 жыл бұрын
Change it in strings
@ankitchopkar77874 жыл бұрын
@@MasterCodingTeam i already use @string in text
@androidApiCrack4 жыл бұрын
public class MyAdapter extends FragmentPagerAdapter { private Context myContext; int totalTabs; public MyAdapter(Context context, FragmentManager fm, int totalTabs) { super(fm); myContext = context; this.totalTabs = totalTabs; } // this is for fragment tabs @Override public Fragment getItem(int position) { switch (position) { case 0: DashBoardFrag homeFragment = new DashBoardFrag(); return homeFragment; case 1: sellsFragment sportFragment = new sellsFragment(); return sportFragment; case 2: CreditFragment movieFragment = new CreditFragment(); return movieFragment; default: return null; } } // this counts total number of tabs @Override public int getCount() { return totalTabs; } } // MainActivity public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TabLayout tabLayout = findViewById(R.id.tabMode); TabItem db = findViewById(R.id.dashboard); TabItem sells = findViewById(R.id.sales); TabItem credit = findViewById(R.id.credit); final ViewPager viewPager = findViewById(R.id.viewpager); final MyAdapter adapter = new MyAdapter(this,getSupportFragmentManager(), tabLayout.getTabCount()); viewPager.setAdapter(adapter); viewPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout)); tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() { @Override public void onTabSelected(TabLayout.Tab tab) { viewPager.setCurrentItem(tab.getPosition()); } @Override public void onTabUnselected(TabLayout.Tab tab) { } @Override public void onTabReselected(TabLayout.Tab tab) { } }); } } //
@MasterCodingTeam4 жыл бұрын
Please check your material dependency in manifest
@nikithabangre33924 жыл бұрын
First I created ChatFragment, but whenever I am trying to to create one more fragment , ie status fragment and call fragment I am getting error
@MasterCodingTeam4 жыл бұрын
You need to declare it in manifest
@nikithabangre33924 жыл бұрын
Please can u help me how to do it
@taehyungkwon4764 жыл бұрын
On PagerAdaptor the line with super(fm); is crossed out :(
@MasterCodingTeam4 жыл бұрын
Check your pager adapter class
@taehyungkwon4764 жыл бұрын
@@MasterCodingTeam wow... thanks so much!
@MasterCodingTeam4 жыл бұрын
Welcome. Subscribe to get more awesome tutorials and courses FREE
@Yes-ok5me4 жыл бұрын
write this super(fm,BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT);
@MasterCodingTeam4 жыл бұрын
Yes
@certifiedtoxicity71234 жыл бұрын
When I slide the tab bar doesn't move. it only moves when the tab is clicked.
@MasterCodingTeam4 жыл бұрын
Check your viewpager settings
@certifiedtoxicity71234 жыл бұрын
@@MasterCodingTeam thanks for replying bro.
@jennenilyes10464 жыл бұрын
Help:: in fragment how to write GetSupportFRagementmanager(); ???
@MasterCodingTeam4 жыл бұрын
Try to add supportfragmentmanager
@andesta21334 жыл бұрын
thank you so much
@vikasmalik17444 жыл бұрын
PagerAdapater class can't run show error when Initialised in mainactivity Like Adapter = new PagerAdapater (getSupportFragmentManager(), Tab layout. getTabCount() ) ; This whole line show error PagerAdapater is abstract cannot be instantiated
@MasterCodingTeam4 жыл бұрын
Yes. You need to set the fragments and then instantiate adapter
@djcity8574 жыл бұрын
"extends FragmentActivity" add this or "new PagerAdapter(getFragmentManager()"
@worldoffun96004 жыл бұрын
y you recorded with dark android studio theme... its stupid nothing is visible even at 1080p ......waste...
@MasterCodingTeam4 жыл бұрын
Check your computer. 4k recorded
@worldoffun96003 жыл бұрын
@@MasterCodingTeam ... yeah i lower my computer brightness for my eyes to less irritate.... and thats y i cant see coding lines in dark theme...... your video is good... but still dark theme is not useful because some people play the video in low resolution and dark theme is not good for that