Renaud Favier
Renaud Favier

Reputation: 401

Android Scroller Issue

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.

Upvotes: 0

Views: 230

Answers (1)

Oleksii Masnyi
Oleksii Masnyi

Reputation: 2912

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

Upvotes: 1

Related Questions