I'm looking for a way to develop a menu which could be visible by sliding on the left of the current screen. One example is the mobile version of Firefox, when you slide on the left, you can access to the current tabs navigation, but the main page is still visible. It is called a sidebar I think :
EXAMPLE
One possible way to do that is to use ViewFlipper, I guess, but maybe is there an easier and more efficient possibility ? And I'm afraid that handling scrolling horizontally and vertically could be a bit difficult...
Thanks for any answers,
Maxetx.
Maybe this will give you an idea
https://github.com/korovyansk/android-fb-like-slideout-navigation
https://github.com/walkingice/gui-sliding-sidebar
You may try out SlidingMenu. There is example in lib.
Related
I want to make a tab host in such a way that if I swipe left inside the tab host, a new tab will appear from the right and pushes the rest towards the left. I want the new tab that would appear will be able to position itself properly. I want smooth transition effect in swiping, so can anyone give me idea on how to achieve this effect? any sample codes? or any useful links containing tutorials? I googled this up and sadly no result showing what I want.
One way that I could think of is applying a scroll view there that could only be scrolled horizontally. But one problem I am worrying is the automatic positioning of the item. How can I achieve that?
Please help. Many Thanks!
it seems that you are looking for ViewPager and PagTabStrip Example.
google out on both topic and you will definitely find your ans.
I know that we can place tabs on our convenient with top alignment or bottom alignments.But when i was reading the developer.android.com.The training section for lateral navigation has emphasized on the fact that tabs should not be used at bottom of the screen.But i don't find any reason why they are insisting someone to not use tabs at bottom.
Can any one explain me?
you can find this article here
you can find that lines below figure 5 at the end of the paragraph.
advance thanks for giving attention to question.
Consitency: It is at the top in most apps
Usability: If you use eye trackers you see that users read a page from top to bottom. If the tabs are at the top they are easier to find.
Option menu: There is already an option menu at the bottom.
It's very simple, it's all about UserInterface Concepts (there are many out there, android has an own: http://developer.android.com/guide/practices/ui_guidelines/index.html ). One of them is "Consistency" - we users expect tabs (especially in android, but also in browsers) at the top and that's why they should stay there.
Also there are a few "famous" rules for userinterfaces.
One set for example is from Shneidermann: http://faculty.washington.edu/jtenenbg/courses/360/f04/sessions/schneidermanGoldenRules.html
I'm no expert, but I'd think it's simply a matter of convention. Users would probably expect tabs to be towards the top of the page. It's comparable to putting a file menu to the far right of a menu bar rather than the left.
The idea I'm having is having a view that can be pulled down on top of the current view, with similar animation features like the one you can pull down from the top all the time, on Android Devices.
Here's an illustration:
The idea is to grab it and being able to pull it down on top of the other view, and then being able to interact with that view. To slide it up again, you should grab the bottom of the view (the grey area in the illustration) again, and then pull it up.
I haven't even worked with animations before but I found a lot of topics on that, while searching for solutions to my problem, including this: Slide down view in android
but my impression is that, that is about making animations when the user isn't touching the phone.
What is the best way to do this?
Is there a better way to do something very similar?
EDIT:
Here's the topic that made me find the solution: How to make an Android SlidingDrawer slide out from the left?
And here's the solution I used:
SlidingDrawer Top-to-Bottom
You could use a SlidingDrawer, this is a built in component into Android, but as far as I know it slides only from bottom - up.
If you a comfortable to modify your app design, then this could be an option for you.
However, on internet are some libraries of custom SlidingDrawer that lets you put the marker on any side of your screen, so you can drag it top-down, left-right, right-left.. any way you want.
Useful links:
How to make an Android SlidingDrawer slide out from the left?
SlidingDrawer Top-to-Bottom
I'm supposed to make a simple android application, in fact it's almost as simple as a slideshow.
The good thing is that the content of each slide is very similar - some text and a photo. So I only have to do one layout and simply switch it's content on a slide motion or a button press.
I think it would be more appealing if I add some suitable animation - e.g. flipping the whole page.
Is there already a tool for this? If there's not than what's the best/simplest way to do this?
http://code.google.com/p/android-page-curl/
I'd like to make a view in my Android app that flips between multiple views on a swipe/fling. I'd like it to behave more or less like the Android Launcher behaves when flipping between views. In particular,
It should flip views on swipe.
Generally a swipe will flip between one view and the next. It should not fling across all of the views.
If you swipe slowly, you should see the views dragging as you're swiping, eg. the way the Launcher does it.
I tried using a ViewFlipper with a GestureOverlayView as per Romain Guy's blog post here, but there's no indicator to the user as they're swiping. This makes discoverability difficult, which is presumably why Launcher does it the way they do.
I tried using a Gallery object, but when I swipe from left to right, there's a certain amount of momentum that flings the users through all the views rather than just taking them to the next view.
Is there a good way to accomplish what I'm trying to do?
I know this is an old question but ViewPager is created for this exact same purpose. ViewPager is part of android compatibility package and more can be found at http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html
Take a look at HorizontalPager. It's actually based on RealViewSwitcher, which in turn is based on the Android homescreen's code, and supports snap-to paging with drag feedback, as well as nested vertically-scrolling subviews. Gesture support for fast swipes isn't all it should be, but this may get you part of the way there (and I'd welcome contributions back).
EDIT: As of 2012 you're much better off using Google's ViewPager - it's in the compat library.
Check out SwipeView within this project https://github.com/fry15/uk.co.jasonfry.android.tools It does exactly what you want it to do and is super simple to implement.
#CommonsGuy extended ViewFlipper to do it.
https://github.com/commonsguy/cwac-viewswiper
Ihaven't used this one yet so im not sure if it moves with your finger like the launcher if not your going to have to make an OnTochListener to do it for you in me.ACTION_MOVE you will update the view to change its position. I'll post some sample code when I get home if you don't get another answer.