How to have two layer tabs in android? - android

I want to implement two layers of tabs like the image below.
With the use of support library I have been able to make a single layer tab set for all android versions. But since I am new to android and I don't have a good grasp on this I don't know how to make it for two layers.
I need to support Android 2.2 and above.
image from:
Scrollable tabs style in Android
Any help will save some lives here :)
Thanks in advance.
ps: please remember I'm a beginner in Android and explanations may need to go in details :S

Related

Creating a scroll-able level selecting menu in android

I am developing a native android app and I want to implement a scroll-able menu for selecting a specific level. I know that I can use fragments for this, but there are 15 levels so I have to create many fragments and layouts. I want to achieve this by some thing simple and more manageable.
I have attached the images for better understanding of what I want!
Hope you answer this question soon. Thanks in advance.
You can use ViewPager to achieve that.

How to position controls in Android?

I am trying to create the UI but I'm having a lot of difficulty just placing controls where I want them to appear on the main screen. For example I want to add a few ImageButtons but they just seem to snap to one corner and I can't seem to add more than one.
Do I need to use a layout or something? Can't I just drag and drop and move the controls around where I want?
I suggest you start by reading a few of the developer tools out there. http://developer.android.com/guide/topics/ui/declaring-layout.html This guide will help you get your feet wet with how to properly layout a screen in Android. There are also a bunch of other great guides on there to help with other aspects of the UI. Even though you use C# in Xamarin Studio, the UI portion is native Android so the guides should still be relevant.
try to use relative layout , its kind of easy for visual studio developer and others too.
details here : http://developer.android.com/guide/topics/ui/layout/relative.html

Android ViewPagerIndicator Tabs

I got stuck with Jake Wharton ViewPagerIndicator.
The problem is that when I try to make a Tab indicator - the result I'm getting is extremely different from what I need and I can't get to style it or make it behave as it should.
So, what I ask for is two things:
1) Am I right when I say that TabIndicator is Foursquare-like ViewPagerIndicator? (when all tabs are shown on screen)
2) Can anyone provide me links to some tutorials or samples of using this type of ViewPagerIndicator, cause samples from JWs' site don't want to get working.
Thanks a lot for your attention!
Jake Wharton provides a lot of examples. Have you checked it?
https://github.com/JakeWharton/Android-ViewPagerIndicator
And you can take a preview installing this apk:
https://play.google.com/store/apps/details?id=com.viewpagerindicator.sample&hl=es
moskis is right on about ViewPagerIndicator. Installing that APK helped me a lot when I first started working with it and it is a great library.
However, to answer the first part of your question and what I think you are asking in general, I think ViewPagerIndicator isn't what you need to solve this specific problem. Foursquare's tabs at the top are the standard Android tabs as shown in http://developer.android.com/design/building-blocks/tabs.html.
Standard Android tabs are implemented using a TabHost and TabWidget. There is an official tutorial about creating a tabbed interface at http://developer.android.com/guide/topics/ui/layout/tabs.html
Foursquare achieves a custom look by providing state-list drawables for the tabs and you will probably want to provide your own to get the style that you want for your app.
Note that I don't have access to the Foursquare implementation, but am going off of what I observe whiel using the app. However, I have implemented a tabbed interface for Android in past projects.

How to use Multi-pane layouts with ViewPager

The Android Design guidelines suggest using Multi-pane layouts, but as far as actually implementing this there are no examples given. Specifically I'm referring to the dual-pane layout used in conjunction with ViewPager like in the People app shown in the guidelines.
Does anyone have some advice or examples to give on implementing this?
In the screen shot:
You can swipe with ViewPager back and forth between the About and Updates lists or you can tap on the photos to page over. You can see a small part of the Updates tab while viewing whatever you have in the About tab and visa versa. Specifically, I want to know how to create this multi-pane layout. The screen shot is from the People app in Ice Cream Sandwich.
SOLVED:
I ended up creating my own open sourced library for this widget. You can find it at this address:
https://bitbucket.org/adneal/tabcarousellib/wiki/Home
For View Pager first you go through this svn.I have gone through android developer site.If you want multi-pane Layout with out Fragment then it very difficult.I will suggest you to go for the Fragment and achieve your multi-pane layout.
But one i can understand your problem also as Fragment are available from Android 3.0 (API level 11).If you want to target device below this then it became necessity to use View Pager.So you have to work hard to achieve it.
Study this for creating horizontal List View
Try this first If you can Customize it
ViewPager Indicator in android
First of all as I got you want to implement the SplitView in android.
If yes then Use this link to get information of fragments from developer site.
Use this Demo of developer site.
If not getting solution then use this Demo Example : Demo
If still its not what you want then also let me know.
I will like to help you.

Youtube style sliding Tab Layout in Android App

The new Youtube app, and the newer version of JuiceDefender, contains a sliding tabbed layout similar to those seen in Windows 7 Phone. This is a UI feature I would like to include in an app I'm am designing but I cannot find any information or tutorials online. Has anyone seen a tutorial on this?
I believe it's implemented as a HorizontalScrollView containing a TabWidget with custom, fixed-width, tab indicator views.
Now, getting the tab content views to be paged horizontally is less easy, and that requires something like adapting Workspace.java in the Launcher.git project in AOSP.
I have found the answer to this question. The Sliding layout I described is a ViewPager, available from the Android Compatibility Package v4, which is available from the SDK installer.
A tutorial for this can be found here :http://mobile.tutsplus.com/tutorials/android/android-user-interface-design-horizontal-view-paging/
Edit
An improvement over the Android Compatibility package is the http://actionbarsherlock.com/ an improvement over the support package that adds more Jelly bean style stuff.
I haven't seen a tutorial like this, but you won't be able to do something like this with just the native widgets as they are. You're really looking at implementing your own custom widgets and views, or at the very least wrapping the included widgets with your own code. Maybe a future api will have such features built in, but at this point you're forced to do everything yourself if you want such an interface.

Categories

Resources