I have a Viewpager and want to set title for the same. I am able to do this. But customizing the same is creating problems for me.
1). I dont want the default strip below the title instead I want my selection bar to be in that place. I know we can change color for the strip but is it possible to give a drawable for the same.
2). I only have 3 pages for ViewPager so I want all 3 titles to be visible at the same time.
3). Can we define the width for the strip below title
Please provide suggestions for the same. Ihave stuck in middle of this.
Thanks in advance.
I'm not sure if I understand correctly your first question, but try reading this post:
android: How to add icons/drawables to the PagerTabStrip from the Android Support Lib version 4?
Related
Hello first of all i'm a newbie for the libraries stuff.
I found a Demo Project on Github here but it contains more than i need
I want this like Slider
Image
I have optimized it but its not working. So someone here, please take a look and guide me
Or any other stuff by which i can make that like layout?
Need to use padding for SlidingTabStrip. TabLayout has only app:tabContatentStart property, but you need to set both sides for this behavior.
Look here: https://stackoverflow.com/a/36886331/651770
I tried to find a lot about this. I was never satisfied by any answers.
Please look at the below two images:
The action bar tabs in the first image are simple without any formatting. But the action bars in second image has a different style. Only 3 tabs being shown at a time with left and the right being aligned to extremes and the center tab being present at the center.
When I am trying to add tabs in my application, tabs are added with default formats. I read about styles and themes. But I am not able to generate the one in the second image.
How can I achieve the style (as in image 02) in my application? Is there any package or is it something different from tabs?
Thanks, in advance.
Firstly, I would like to mention that since i am not sure of the terminology of the view that i am looking for so I shall try and explain the behaviour.
I am looking for build a screen with multiple tabs where the tab indicators do not fit all inside the screen so it is scrollable. This is fine but i want that when the scrolling happens, after the last tab indicator, the tab widget automatically shows the first tab indicator right after it. So kind of like a circular tab widget.
Could someone please give pointers on how this could be achieved in android.
Thanks,
Sunny
I'm not sure, since you're not so clear...but i think you're looking for this:
https://github.com/astuetz/PagerSlidingTabStrip
Sliding tabs like the ones in Google Play.
I'm working on a project with a tab navigation. Because it should be compatible with Gingerbread I'm using Actionbar Sherlock for this approach. My Problem is that one tab is too short an one letter of the word is shown in a second line:
What can I do to set the width of an tab so that it fits the word?
Thanks for your help!
You can reduce font size in tabs to make it according to your needs, but his solution has its limits.
One of other solution is that, you can use ViewPagerIndicator library, It has tabs, which can scroll if they do not fit in screen. See example code from following link
https://github.com/JakeWharton/Android-ViewPagerIndicator
I'm finding lots of discussion about how to replace the default group icons in an ExpandableListView, but I'm not coming up with anything on how to get the defaults to display in the first place.
The defaults (as shown here, if that's what they look like [new to Android, this is my first ExpandableListView]) will be fine with me, if I can get them to show.
I'm using the sample code from the article; I have no need for the embedded CheckBoxes at this time.
Any assistance is appreciated.
--EDIT--
Also, does anyone have any theories as to why the default icons show in the article (again, if that's what they look like--if someone could confirm that'd be great) but don't show for me?
If you are using custom layouts for your group rows the default icons are overridden by your layout. You'll need to add them to your layout in order for them to display.
you can changed default icon with your own icon as below.
android:groupIndicator="#drawable/image"