Youtube style sliding Tab Layout in Android App - android

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.

Related

Xamarin Android Wear - Navigation

I'd like an example of a step-by-step implementation of this type of menu on Android Wear.
I can not understand the concept of this implementation
It can be in Xamarin or Java.
Documentation:
https://developer.android.com/training/wearables/ui/ui-nav-actions#java
Expectancy:
ndroid
Glad you are enjoying Xamarin!
There's multiple ways of navigating between fragments, regardless if it's a Watch. One of them is using ViewPagers. If you look into the Android documentation, you will find details of how to make it look really cool and fancy with small changes to the ViewPager code.
As far as examples to the Google Wear app that uses ViewPagers, you can take a look at this and some of the other examples of Android wear applications. Let me know if that helps. Btw, you might have more success simply implementing that code (layout/activity_main.xml, SimpleGridPagerAdapter.cs and MainActivity.cs) in your project, than making those projects works since they're old.
Since you are looking for the usage of the android.support.wear.widget.drawer.WearableDrawerLayout, you can take a look at this, particularly at the activity_main.xml. For implementing the WearableDrawerLayout, you have the following
WearableNavigationDrawerView that acts as the top navigation drawer
FrameLayout that contains your fragment
WearableActionDrawerView that acts as your bottom action drawer
PS: I noticed you are looking for Java examples too, this one seems very simple example to follow. You just have to check the Planets.java, MainActivity.java, and activity_main.xml files in that repo

Tab Layout with Sliding Views

I want to create an app that uses a tab layout with sliding views (something like this):
Here's the issue:
I searched all over the web for a guide that could explain how to do this kind of thing but all I tried didn't work for me. I read somewhere that tabs layout is deprecated with Lollipop, so I tried to find an alternative way to do what I wanted to do, but nothing. Every tab layout app I try to create ends up with a crash while testing and I think it's due to something about the ActionBar, always because of the ActionBar Tabs are deprecated in Lollipop. I'm not going to post any code because I created so many projects that I lost their count, and also because they are quite the same.
So, anyone could please link me a guide or explain a working method that allows to do what I explained?
All I can say is that the app has to be used on Lollipop, so I'd like to know the compile settings to put in the gradle files.
Another important thing is that i use Android Studio, even if most of the tutorials i find on web are about Eclipse.
I hope to have explained in detail my problem and what i want to do and i thank you all in advance.
Here is a detailled description of how to use the SlidingTabLayout like Google uses it in the Store:
https://github.com/codepath/android_guides/wiki/Google-Play-Style-Tabs-using-SlidingTabLayout
Like Hugo already mentioned: it works with viewpager

Android Tab Bar Controller (Fragment or Action Bar or TabHost)

I've been slowly porting my iOS App to Android so I can take my time and make sure that it functions correctly and I'm now at the part where I need to create a TabBarController like environment. I've been searching for days and have come across numerous examples but with each example there's a problem.
First, most examples refer to using a TabActivity, which when I just checked is deprecated and can't be used. The one's that don't use TabActivity either use Fragments (sometimes with an Action Bar) or a Tab Host. It looks like Fragments is the way to go, but then how to you support older devices (from the Android website over 50% of there users are still on API 10).
Basically what I need to set up is a Tabbed environment that will let each tab load a new Activity, and then each of those Activities will have their own navigation based hierarchy as well so I'm trying to see what is the best option to pursue and if anyone has seen some examples that can help.
I've found 4 tutorials so far that have fragments and different activities for each Tab, so I'm going to look into those now but just wanted to see if any other developers that have already come across and issue like this did to work with the compatibility issues with older devices.
You can use Fragments all the way down to API 4 using the Support Library. I'd use a single Activity with multiple Fragments in ActionBar tabs, though you might need to do it with TabHost to support lower APIs.

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.

Categories

Resources