Swipe between Activities by touch in android - java

how can i let user swipe between pages by touch in android
i am using android 2.1
i found this Link but i am not sure ViewPager works with 2.1
ViewPager
so i found Viewflipper and ViewSwitcher.is it doing the same thing as Viewpager?
Thanks in advance

I think you will get an idea from these links.For swiping a page left and right the best way will be using a customized view.
http://mobile.tutsplus.com/tutorials/android/android-user-interface-design-horizontal-view-paging/
https://github.com/grantland/android-horizontalpager
http://savagelook.com/blog/android/swipes-or-flings-for-navigation-in-android
http://blog.sephiroth.it/2011/04/04/imageview-zoom-and-scroll/
Horizondalpager is the best option.Hope this will help you to get there :-)

Viewpager is the one you want to use and does work with 2.1 (It is part of the backwards compatible support library)
Viewflipper does not allow you to swipe. It simply switches one view with another on demand.

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.

Fragment transition?

Any help would be great with my issue. Basically I'm using this tutorial and its a web view fragment. So I got rid of the WebView and made new activities. My issue is connection the activities with the drawer so then every thing goes to a different activity. Once again, any idea on how to do this would be helpful.
I would recommend this tutorial instead.
http://www.androidhive.info/2013/11/android-sliding-menu-using-navigation-drawer/
I've used it and I have a functioning application at the moment. You can download the source, change the text and images if you'd like.

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