0

i've done a custom view group to display my menu in a different way :

it comes from the right of the screen.

I use scrollTo right now and it works fine, but i would like to get the scroll action animated, so i decided to add a scroller. but when i call :

mScroller.startScroll(0, 0, 100, 0, 1000); 

nothing happends. scrollTo(100,0) did its job

Could you explain me why ? I basically have no more code to do what i want. is it a problem ?

I've tried to do a simple animation : my xml :

<?xml version="1.0" encoding="utf-8"?> <translate xmlns:android="http://schemas.android.com/apk/res/android" android:duration="700" android:fromXDelta="0" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:toXDelta="100" > 

my Java :

Animation animation = AnimationUtils.loadAnimation(mContext, R.anim.translate_menu_animation); animation.start(); 

but still, it does nothing.

1
  • Please provide a layout xml file with a scrollable area Commented Feb 17, 2012 at 10:31

1 Answer 1

1

If a menu fitted all scrollable area then scroll not work. If you want animate your menu, you should use simple view animation.

Sign up to request clarification or add additional context in comments.

2 Comments

i've tried it and post it above, it still doesn't do anithing, do you know why ? it's the first time i use those
I have the feeling that i'm not clear, when i push the physical menu button, i want to make appear a menu layout from the right of the screen which is just at the right of my main layout. i've created a custom view group that put my menu layout at the right of my main layout. when i perform scroolTo, the viewGroup is moved forward to the left and then make appear my menu

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.