Android sidebar - android

I've been using firefox for Android and really like the use of the sidebar to hold shortcut icons and the like. How would I go about creating a similar bar myself with the following attributes:
progressively revealed as I swipe in one direction
progressively hides as I swipe in the other direction
can be a custom width
I can dynamically inject layout in to it or it can hold static content
Is there any open source code available? If not, what approach would I use to create this?

Sound like you're describing a Gallery control. There are some examples in the ApiDemos project here.

The first part can be solved by using a ListView. The second part I don't know yet. I'm looking for such a component as well.

Related

How to design live tiles in android like Windows phones?

Is there any way we can design a live tiles in android like windows phone? If so can you please guide me
hello you have to look at android design principles ,
just look at this link
You can use fragments for mimicking live tiles in android!
The container for the fragments should be dynamically created frame layout or any other layout.
You can add a long click listener for these layouts, to show options like unpin,re-size as in windows.
Add a drag listener too, so that the user can freely drag and drop the view any where within the parent layout.
I hope this idea is pretty clear.

Android Custom Activity

http://tinypic.com/r/2v85soh/5
Hi!,
Do you see that bottom arrow pointing up? I want to allow users in Android to be able to drag it and use buttons from there!
Regards,
Michael
Android has a SlidingDrawer UI component that can be used for this sort of thing: http://developer.android.com/reference/android/widget/SlidingDrawer.html
Android has a SlidingDrawer widget, but it's deprecated. I would look online for open source libraries/projects that have implemented this kind of functionality. Perhaps something like this: AndroidSlideUpPanel

How to design a iPhone like menu/button in android at the bottom?

I have googled this, most of the solutions are using:
1.TabHost with customized style which would cover the separate line between each tab to archive the requirement.
2.On the android developers website, there is a article is using Merge layout to put 2 buttons on top of the background image kind of archive what I want.(http://developer.android.com/resources/articles/layout-tricks-merge.html)
3.What about using button but style the looking like the example below? I don't need the selection, cause each item in the menu will be a button, which takes the user to another page.
I am wondering is there any other solutions apart from these two?
This is something want:
I don't need the menu likes a tab which has selected and unselected, they are better like a button always displaying in certain screen(activity).
Thank you.
You can use simple buttons, and provide any custom background for it. For such simple form as on your screenshot look for this link.
But #Janne write right thing - you should be very careful with transplanting controls from another platforms.

Making game like menu in Android

I'm trying to cope with some problem in finding good idea. I would like to make interesting menu like in games on Android (eg. ANngry Birds or here: http://www.youtube.com/watch?v=Q3g6SdTODY4) In this panda game I supose that first menu are simply 3 color buttons, but what about this sliding menu later with stages description - this same as in angry birds? Telling the truth I have got no idea what object it can be?
I will be glad if someone can tell me that. Or the best to give some tutorials about it. I cant google any.
Well, it seems that this sliding stage description is implemented with some simple layout placed to HorizontalScrollView and some animation applied to the buttons.
It can be your custom view provided with your translation animations and handling its visibility on the click of the default menu button (via onKeyDown()) on Android.
There are similar questions:
Custom options menu in Android
Android: customize application's menu (e.g background color)

Android Tweetdeck-like UI

I'm getting started with Android development, and I would like to have an interface similar to that of tweetdeck: there are several workspaces (activities) that are laid out left to right, and the user can switch between them with a horizontal gesture. The same way the Android desktops are switched.
In tweetdeck there are also dots in the titlebar, that indicate on which side and how many workspaces there are.
Is it a standard Android interface, or something custom built? How do I do something like this?
How you go about this is going to be partially dependent on the content you want to present. If there are going to be many heavyweight pages you'll want to look into doing something like a custom AdapterView. If there are only a few fixed pages such as in the stock home screen you can treat it like a scrollable view with some custom logic to handle snapping to pages.
Here's a link to the custom view that implements this in the stock Android launcher. The bits you're interested in will mostly be in onTouchEvent, onInterceptTouchEvent, and computeScroll.
https://android.googlesource.com/platform/packages/apps/Launcher2/+/master/src/com/android/launcher2/Workspace.java
Take a look at ViewFlipper: http://developer.android.com/reference/android/widget/ViewFlipper.html
In addition to studying the actual Android code (referenced in another answer), some folks have extracted and isolated the workspace (Launcher2) code into a re-usable view group. You can find the work in github here https://github.com/olibye/AndroViews

Categories

Resources