"Show More" option in TabHost (Android) like in iOs - java

Is there any built-in solution when a TabHost have a high number of tabs and dont fit in the screen like the "More ..." option in iOs?

In android you usually approach this using a horizontalScrollView to hold the tabs, or better yet use a viewpager like the Google+ or Google Play app.
Take a look at http://viewpagerindicator.com/ to see an implementation and a library of this functionality

Related

How to implement slider view with tabs in custom keyboard or input method service

I'm working on a android keyboard app. The only problem I couldn't get around is slider tabbed view like this:
I don't know how to implement tabs with view pager in an input method service. It's fairly easy to do with activities and fragments but no idea about how to get it done in a custom keyboard.
Can anyone point me in right direction?
Is there any available library for this or a nice hack?
I'd really appreciate your help at this point.
regards,
For implementing sliding tabs with ViewPager you can refer this link or in Android studio you can select from samples available while creating a new Activity.
If you want to add library support for it you can implement this library.
Mind the min sdk version of the library to avoid any trouble in future.

How to create a navigation that open from bottom of screen?

I want to create some thing like drawer menu that open from bottom of screen.
some thing like blow image. Also I want to know is that any special name?
You can use BottomSheet library. It works on Android 2.1+
https://github.com/soarcn/BottomSheet
It's called a SlidingDrawer. It was on the SDK but got deprecated a while back.
That said, this thrid-party library should do the job just as good. I've used it in multiple projects.

What is the best way to create an settings page

I want to make an Android application that controls an Raspberry Pi (singleboard computer).
To do that, I want to create a control page like the one below:
As you can see, there are section headers, listview items with a switch, listview-items with a checkbox and listview-items with only text and listview-items that go to a new activity(of fragment).
I want to create the same thing for my android application. But I want to know what the best way is to create a page like this. I have already tried a listview with a CustomListAdapter, but the problem is that ALL my listview-items have a switch or ALL my listview-items have a checkbox, and so on.
So is it better to create a page like this in an other way? (build it mostly in the layout file, item for item?).
The Android API includes an easy way to handle this. You need to create a PreferenceActivity. The Android API documentation provides a full, thorough explanation with examples. You can find that here

Scrolling left/right to new pages

I am creating an application which displays several "pages" of content. Typically this is representative as tabs on a desktop based application.
On android, I want to be able to flick between the tabs of information, using there finger anywhere on the screen. The content of these tabs will just be XML views, or programmatically created views.
Looking at Applications on android, there are several applications that do this. Google Play, Gmail, Beautiful Widgets, BBC News, Contacts, Engadget.
I've looked for several terms, mostly scrollable tabs but haven't found anything that is similar to the above applications. I'm looking at TabHost, TabWidget and ViewPaper at the moment, but not sure if these do what I'm looking for.
Can anyone tell me which control can be used in android to get the functionality. Out of the apps listed I'm looking to have it styled more like the Google Play store, with the name of the tab at the top, and the names of the nearby tabs to the left and right if applicable.
There is an example on the android blog for this, used on google play app.
Horizontal View Swiping with ViewPager
Sounds like you're looking for this. It's compatible with ViewPager, the v4 compatibility library, and ActionBarSherlock.

Android View similar to Google's Youtube app?

I know that Android's Youtube app is not open source, but I pulled apart the apk with apktool and found that they have a class, YoutubeListView used frequently in their app. Is there already an open source implementation of the Youtube Player Activity's title/ fling view/ layout? I know of similar views like Joao Machete's FlingAndScrollViewer, but I need it to be rigge to a title menu and work as smoothly as that on the Youtube app. If there is no open source implementation, either how hard would it be to convince Google to release just that component's source, or to implement it myself?
Thanks
Btw, the footer in this layout is what I am talking about. It has titles like Info & Related videos that can be clicked and it scrolls to them, and it can be scrolled left and right.
I've come to the conclusion that there is no such view. It would be best to make my own custom layout.

Categories