Is there a way to make Android tabs slide? - android

I'm new to Android development, and I was wondering if anyone knew either how to make Tabs slide, or how to get a similar effect without tabs. I have quite a few tabs in my application, and it does not look good on devices with smaller screens. Or maybe tabs are not what I am looking for. If you don't know what I'm talking about, I'd like to reproduce something similar to Photoshop.com Mobile's effects screen.
I know this is possible. Thanks in advance!

I haven't experimented w/ sliding tabs, but I know other applications I have used have a panel at the top with buttons, and that is slide-able so that you can slide for the content needed and select. It does the same thing without the tabs, and should only be a little more overhead from the code side of things.

Related

Can I reposition and/or split android keyboard?

I am writing a custom android IME, and would like the keyboard on the side of the display rather than the bottom (actually, I want the user to have options). If possible, I would like to split the keyboard into 2 or more parts, located around the display edges.
I have reviewed various complicated solutions which may need extensive cross-device testing.
Is there a simple (and reliable) way to do this, with say, XML layout? I know Java, but not much about android layout.
Answering my own question, after much digging I think the answer is no, there is no simple way of moving the keyboard from the bottom of the display. I have settled on a very small "keyboard" along the bottom, and then creating a mostly transparent popup view. Not nearly as simple as what I was hoping for, but I think I can eventually get it to look the way I want.

General android layout questions

I should begin by saying that I'm brand new to android development, although I have a good understanding of the fundamentals of java. That being said, I usually learn best by doing, so I'm writing an app for a campus magazine I work for and trying to learn through the process of making it.
At the top of the screen is a bar with two spinners labeled "issues" and "sections," which allow the user to filter the articles shown to only those in the respective issue / section. The rest of the screen is taken up by what I will describe as a vertically-oriented gallery, which shows the headline for each story underneath an image associated with it. The user can then "flip" through the stories in the magazine by scrolling through the "gallery." Selecting one of the stories will open the full story up in ViewPager.
I have two main questions at this point:
1) Initially, I planned to place the "issues" and "sections" spinners in the ActionBar. However, as I understand it, ActionBars are not displayed to users using Android 2.x. Given that these elements are critical to navigating the app, and that a majority of android users are still using 2.x, this seems unacceptable. As a result, I'm using an ActionBar-less theme and essentially drawing my own action bar via a linear layout on top of my main activity. Am I correct in my understanding that ActionBars do not display on Android 2.x devices? If so, am I correct in including my "tool bar" as a part of the main activity, or is there a better way to implement it? (Perhaps as a fragment? I don't really understand how those fit in yet...).
2) I am aware that the gallery widget is deprecated, so obviously I'm not going to use it. What alternative widgets would best achieve the same visual goal of having the user "flip" through the stories in the magazine by scrolling through the widget? Is there a way to animate a ListView to achieve this goal?
Again, any help - particularly which helps me to understand the wider issues involved here - will be greatly appreciated.
Thanks in advance.
You can use ActionBarSherlock - it is compatible down to Android v 1.6.
ViewPager might help you

creating a bottom bar menu

I am looking into ways of building a bottom menu bar in android. I was initially planning to make use of splitting the action bar with the uiOptions:splitWhenNarrow but unfortunately that only applies to phone screens.
I am aiming to design for nexus 7, so slightly bigger screen!
I came across one tutorial which I've linked below. It seems like just the thing I was looking for but before I dive into the coding I just wanted to check whether it's a good way of doing such a thing?
Perhaps someone can suggest an alternative? I'm relatively new to android so this is a huge learning curve for me and I am trying to develop based on the best practices.
Many thanks.
http://www.paxmodept.com/telesto/blogitem.htm?id=810
*The menu bar in the tutorial is pretty much what I am trying to achieve.

Correct Way To Implement A Tabbed Bar

I have been browsing the web for a while now and looking at different examples of how to implement a tab bar.
The problem I am having is deciding the correct approach to creating this feature. The option that seems most used is to have one main activity called MainActivity or something and using fragments as the tabs. This is all well and good and I have created an application like this fine.
The problem I am having is I am in two minds as to whether this is the right way to go about it as coming from an iOS development background it just doesn't seem right due to these tabs having different functions.
Any pointers would be great.
EDIT I have also looked into ActionBarSherlock but couldn't get to use it in a project as it kept coming up with errors and I couldn't find a thread that sorted the problems I was having out.
Disco
You should be using fragments, yes. There is an example of how to do it here: http://developer.android.com/guide/topics/ui/actionbar.html#Tabs
This "only" works with Tabs that are part of your Actionbar, though. Shouldn't be too much of a problem, because they usually should be part of your Actionbar. You can also manually move the tabs if you're not content with their location, or roll your own buttons that look like tabs.
Keep in mind that tabs in Android aren't quite the same beast as the tab bar is in iOS. They look similar and behave similar, but there are subtle conceptual differences in how they are supposed to be used. Don't use them for your basic app navigation, but rather for switching between similar "things".
If you want to employ this on device pre-3.0 though, you will have to use ActionBarSherlock. It does work fine and we're using it in several projects, so if you're having problems integrating it I suggest creating a new question for that, I'll be happy to help.

clients still want lower screen iphone tabs on android, solution?

clients want exact replica app on iphone and android. the iphone design is the only one thought about, and it frequently has tabs on the lower part of the screen
in android, this can be replicated but the primary way of doing this was deprecated, for various reasons. (tabhost, tab groups, activity) android's replacement methods include action bars and viewpagers and fragments with a varying degree of backwards compatibility but they don't really put the resulting tabs at the bottom of the screen.
similarly, multiplatform web app tools like Sencha Touch can generate intuitive "bottom tabs" on both platforms. So for Android there are still a variety of ways to do bottom tabs, so it would be fiction to tell a client that they need to change their iphone design for android
how do developers and consultants approach this. any best practices?
I don't quite know what you're asking for. If it's a programming solution, then someone who's made bottom tabs before could answer. I've never done it, so I don't know if there's an easier way than the brute force do-it-yourself approach.
If it's a consultation answer, then the best approach that's worked for me is to convince the client that the "Android way" is to put tabs on the top. As such, people who use Android phones regularly come to expect a certain way things are done. Especially since ICS came out, soft buttons have been moved to the bottom of the screen. These can't be shifted, moved, or removed and having tabs on the bottom could result in the user accidentally pressing either back, home, or process-list.

Categories

Resources