Load fragments on part of the screen only? - android

I would like to know if it is possible to type a Tablayout system only on part of the screen. ex:
Where the green, blue and orange colors would be the Tabs buttons, and the red part would be the Fragment loaded, then clicking each of the buttons (green, blue and orange) would trade Fragment without affecting the rest of the layout. I wonder if this is possible and if so, how would you do it? If it's any other way than being with Fragments, it works.
If anyone has an example, I am grateful.

Related

How to make the title bar change color when the tab is changed

If I am on a tab in a tabbed activity, and I change tabs, how do I make the title bar and tab indicator change colors? An example of what I'm talking about can be seen below (done on paint).
App bar changing color when different tabs are selected
I figure that manipulating the different elements and what color resources that they use could be done to change everything uniformly, but at the same time, I don't know how to do that. I have four tabs, and four sets of colors picked from the material design library, red, blue, green and yellow. Including red dark, blue dark, etc.
I'm not using the default tab layout activity that comes with android studio, instead, I am using one similar to the one used here
https://androidbelieve.com/navigation-drawer-with-swipe-tabs-using-design-support-library/
minus the navigation drawer. All help would be sincerely appreciated, though I'm afraid that I'm still quite a beginner so I would appreciate it if you could make it as simple as possible.
:D
You can just right code according to selected tab position
for tab 1
getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor("#F00")));
for tab 2
getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor("#FF0")));
for tab 3
getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor("#F0F")));
I use
getWindow().setStatusBarColor(color);
for change color title bar.

TabLayout Android Color Bug

I have a tablayout in fragment which has its colors predefined in the xml. When the fragment is initialised, the tablayout shows the right color.
However in certain devices (Especially api 21 and above), the tablayout changes its color to white without any reason when some action happens in the fragment. I am nowhere touching the tablayout color through my code. Can someone explain why. Also, I noticed when keyboard comes up in the fragment for any user action, the tab layout color changes to white. Can activity resizing be a cause of this ? It seems when keyboard comes up, the tablayout background color seems to go away as if it has moved up or something.
My Home with tab layout.
I resolved this issue by setting tablayout drawable xml's for selected and unselected states instead of using just background color from resources

How to Create ViewPager with invisible tab bar

I'm not sure a ViewPager is the way to go, but it might.
My goal is to create an App with 3 screens.
A main screen and 2 other screens the are reachable by swiping left and right from the main screen.
i would like to have the screens as Fragments.
I have used a ViewPager, but I would like to get rid of the TabBar, and just stay with the swipe.
I managed to get rid of the Tabs, but the bar remains empty. I want it to be hidden.
Is that possible?
Is there a better way to do it ?
If this question was already answered, I have failed to find it and will appreciate redirection as well.
Thanks a lot,
Giora.
In your AnsroidStudio layout screen, go to the "Design" tab. Click on the theme option and select a theme with "NoActionBar.FullScreen" AFAIK ViewPager does not have any TabBar by default.

UI screen design

I am working on an Android application and have to code up the following design for one of the screens:
(Ignore the yellow stuff, I have just masked the Logo and the App-specific information for now)
My question is: How do I design this particular type of screen? The top pane is akin to an ActionBar in Android. However, when any button on the top pane is hit, this custom "popup" having a rectangular form with a small arrow on top pointing towards the button is display and does not interrupt the current/main activity.
I have looked around, but still dont understand how to accomplish this.
Any thoughts? Thanks!
You can use the native Action Bar along with the icons.
The only problem is if you want to show them all at once.
Some icons may be hidden depending on the size of the phone.
As for the custom pop-up, the toast feature is available to do that.
It is quite easy to adjust the position of toasts and customise toasts :
Customisation of toasts: http://developer.android.com/guide/topics/ui/notifiers/toasts.html#CustomToastView
Changing postion of toasts: How to change position of Toast in Android?

Change the truck color of a listview in android

I'm not sure if it's called the truck in the world of java, but I've always referred to the scroll bar size thing as a truck. That bit on the right that gets smaller as there are more items in the list, and that stays relative to the current scroll position. Truck? Right?
Well regardless of what it's called, does anyone know how to change it from white to another color. I've a list with green text in it, and in fact all my controls are green on a black background. It looks quite spunky and fun. But for the "truck"; it remains white.
Does anyone know how to change the truck color?
Just do
android:scrollbarThumbVertical="#drawable/scrollbar_vertical_thumb"
and let scrollbar_vertical_thumb be a gradient
refer to this

Categories

Resources