NO FRAGMENTS found in the NAVIGATION EDITOR - android

Navigation Editor
Though there are fragments present in the layout directory, none of it shows up in the navigation editor, except main activity.
p.s: I've also tried Invalidate Caches and Restart but didn't work.
Somebody please help me with this. Thanks in advance :)

I found a similar issue here: Fragments are not displaying in Android Navigation component .
Without seeing any code like your dependencies or your fragments it is hard to deduce. If you are not already using the Androidx libraries you could try migrating to those and seeing if that helps.

Related

Preferences Fragment not working in PageViewer

I've been looking around and I cant really find any good answers that solve my problem.
I'm currently using a Page Viewer to view a bunch of fragments. I now want one of the fragments to be a preferences page, which would be easiest done with a preferences fragment. However in my adapter when i am directing which page is which fragment i get the error:
Incompatible types.
Required:
android.support.v4.app.Fragment
Found:
package...Settings_Fragment
Is there any way to get a v4 support preferences fragment. I really don't want to have to rebuild my app with non-v4 fragments.
Is there any way i can solve this?
Thanks in advance, sorry if its a silly question!
Yup - just use PreferenceFragmentCompat.

Disable animation on tabs click android bottom bar navigation - roughike

I'm using roughike library for bottom bar navigation in my android project. But facing a problem that is when I click on the tabs it's getting bigger. I tried many ways to disable the animation but unable to do it. I asked on the github support page but no luck. I just took a look at the source code and found there is a fix property which causing the problem and there may no functions to edit this. Someone please help me if there is any way to disable the animation.
Note: I'm using all default settings from the github readme. But I tried changing options etc.
Thanks,
Robin
https://github.com/roughike/BottomBar
To achieve some solution to this problem,I am also trying. I got some luck.May be you can try that
1. Please try to add this is in gradle file.
compile 'com.roughike:bottom-bar:1.4.0.1'
in your java code add the following:
bottomBar.useFixedMode();

How can i create navigation drawer with header using eclipse

I read all other related links in Stackoverflow. I didn't find the right answer that can solve my problem.
I need to create navigation drawer with header using Eclipse.
I can't use martial design with Eclipse.
This is the tutorial for Navigation Drawer using Eclipse
Hope it solves your problem.

other alternatives to sliding tabs

seems that starting Lollipop the ActionBar "setNavigationMode" method is deprecated. i know that google now offers to use sliding tabs and view pager however I am unable to understand the code completely. is there any alternative that I can use? if there isnt then can someone suggest for a good tutorial on that?
I need to achieve two tabs when each one holds a fragment.
I plan on using the SlidingTabsLayout technique instead of the new ActionBarCompat or Toolbar. It seems you don’t like it when reading from your original post. However there is sample working code at SlidingTabsBasic.
If you download the zip file, you may have to import the project instead of opening it. When you import, find the build.gradle file of the project. So far it seems this is not much difference than the link you posted at Github https://gist.github.com/eluleci/199be9a0d1af42653b5b.
I predict when the new Toolbar is stable, I can integrate some of this code like the ViewPager and PageAdapter.
I am thinking of the same thing since I want to support the new Lollipop. There is a Stackoverflow link at Action bar navigation modes are deprecated in Android L
Let me know what you found or decided. Perhaps we can work together. Have fun!

Viewpager fragment doesn't running functionally

I am now trying to implement viewpager with fragment. Everything is cool except i got error ViewPager has not been bound.
Exception details are logged in Window > Show View > Error Log in xml graphical layout.
And Here's a screenshot of my application.
Does anyone know why there is not showing indicator line below title ?
I did this project by referring this: https://github.com/JakeWharton/Android-ViewPagerIndicator.
Go through that sample project. It will really helps you to solve your problem.
For the records, hope it saves someone some time:
The Indicator needs to be bound to the ViewPager, something like indicator.setViewPager(viewpager)
Without a theme, the ViewPagerIndicator will not work. If you don't want to use the default style, set the ViewPagerIndicator style only as described here
Issue has been solved by myself. All i need is just to add theme style android:theme="#style/Theme.PageIndicatorDefaults" in project manifest file.

Categories

Resources