I am working on a Menu that slides in from right to left. The sliding menu is done, also a Button that triggers the Slidein/out.
Now i want to animate the Button too. Currently i let it move by setting Margin, but thats ugly because its jumping like hell... Is there any simple way to attach the Button to the Menu? Or any simple way to animate it?
The Menu is a LinearView in a RelativeView. The RelativeView contains the Button.
best way to do that is to use nineoldandroids library. here is the link and you can see in usage section how you can do it.
Related
I'm trying to make an extra effect to menu that will come down from the top of the screen
I want to make it enter the screen while swiping it from the top and if the user left it, it should continue to the end
this is the figure that demonstrate what I want to do:
I tried to do it with animation but the animation will not go on while swiping and it will go to the end without touching
any other ideas to move the view down with finger ?
Check this out for a sliding Drawer http://developer.android.com/reference/android/widget/SlidingDrawer.html
it sound like you kind of want the same thing as the pulldown menu at the top of all android phones except you want it customized, the link will show you that.
OK
It works for me now
I used SlidingTray.java class from this API
API Website
btw : this api open source
I wanted to achieve the same sort of functionality found in Google Now where you can tap the cards overflow icon and a menu appears next to it with options (shown here).
Does anyone know how to implement this sort thing to achieve the same style etc?
I think you can do this by placing a listview under your button, and set its visibility to invisible.
Then place an onclicklistener on your button to turn your visibility to visible.
I am working on a simple application that is supposed to work on 800x480 tablet. Currently:
[][][][]
[][][][]
OOO
These are all buttons and they are working as expected. I, however, need to add menu items to the bottom-buttons. When clicked, menu items should pop up.
-Can I create a menu and place it at the bottom of the screen to replace those buttons? If so, could you show an example, cause I couldn't find any.
-Or, can I add menu items to these buttons?
What You want is an OptionsMenu, if I understand You the right way. I could give You an example later, I am not at home. But for now, look at this example. If You follow this, You donĀ“t need those buttons at the bottom.
http://www.edumobile.org/android/android-beginner-tutorials/options-menu/
if it is not clear, just let me know and I try to give You an example at the evening...
EDIT
for custom menu, You could use PopUpMenu. I had not tried this for now, but I think it is a good solution
http://android-er.blogspot.de/2012/03/example-of-using-popupmenu.html
all
I have a tabbar in my Android app like pic
now I want to add a layout on the back of my tab bar like pic
and when I click the press button the layout appear with a flip animation to the top like pic
Help
u can use frame layout in tab with bottom gravity. and on click you can adjust its size.
You can use SlidingDrawer which already includes android sdk.
Here is simple tutorial : link.
You should have to create One Layout let say pressLayout which contain that Press Button.
initially that layout is invisible. Now while you press on Tab or any other button, that Layout will show with the translate(or Scroll) animation from Bottom to Top.
Now while you click on Press Button. Set another animation on the Layout/view you want to effect.
Hope you got the point. For Translate Animation, you can see this: translate Animation
Enjoy coding...
In my application, I have an activity where I have one button. When I click on that button, it should show a customized layout from the bottom the screen,keeping parent layout visible. I want to achieve this using animation. Can someone please help me by providing some example code. Thanks in advance.
Here you can simply use Sliding Drawer example.Refer Following Link.
http://androidimran.blogspot.in/2012/06/android-slidingdrawer-example.html