[android-developers] animation on image view on grid view

2013-10-22 Thread Amit Mangal
Hi team
i am having a grid view with 2 coloums and each item in grid view having
one image and 2 textview below the image.
i have added one button over each image and after clicking on button i want
that image should scale and move down to bottom tab.
like it should appear image drop down from its position in side one button
of tabview.

i am able to add animation on image using this code

 AnimationSet set = new AnimationSet(true);

 Animation trAnimation = new TranslateAnimation(0, 160,0, 100);

 trAnimation.setDuration(500);

 set.addAnimation(trAnimation);

 Animation scaleAnimation = AnimationUtils.loadAnimation(this, R.anim.
anim_scale);

 set.addAnimation(scaleAnimation);

 set.setFillEnabled(true) ;

 set.setFillAfter(true);

 view.setAlpha(100) ;

 view.startAnimation(set);


but problem is that image is not coming to bottom of screen it is going
inside of grid item where it is placed . any body knows how to move this
image to bottom.

thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] animation scale from 0.0 on an invisible View starts at its full size

2013-01-07 Thread Matteo Mazza
here's the issue I am experiencing:
if I animate fromAlpha=0 toAlpha=1 on an invisible view all is good, I 
get the animation as expected.
While if I animate fromXScale=0.0 fromYScale=0.0 toXScale=1.0 
toYScale=1.0 on an invisible view I can see in the first frame that the 
item is shown at its full size.
How does that come? And how can I avoid that?

jumpIn.xml file: http://nopaste.info/82b3e84803.html
piece of Activity.java: 
http://nopaste.info/4774905fcf.htmlhttp://nopaste.info/4774905fcf.html

can anyone help me?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation Tool

2012-10-16 Thread raveesh L
Hi All,
Is android providing any tools for 3D animation? like page flipper, turning 
book pages animation etc., Please help me friends. 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation moving image in random

2012-09-07 Thread Haris


For my application I need to move my image randomly throughout the screen 
using motion sensor
The motion sensor part completed. So as the next step I need to move an 
arrow throughout the screen. I searched in internet a lotPlease 
help..

thanks in advance  

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Animation moving image in random

2012-09-07 Thread TreKing
On Fri, Sep 7, 2012 at 5:49 AM, Haris haris...@gmail.com wrote:

 So as the next step I need to move an arrow throughout the screen. I
 searched in internet a lotPlease help..


Help with what? You provided almost no information. What *exactly* do you
need help with?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation

2012-07-25 Thread Meena Rengarajan
How do i wanna do pop up in animation can anyone suggest me ? please ..

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Animation

2012-07-25 Thread TreKing
On Wed, Jul 25, 2012 at 11:28 AM, Meena Rengarajan
meenasoft...@gmail.comwrote:

 How do i wanna do pop up in animation can anyone suggest me ? please ..


First explain what pop up in animation means.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Animation

2012-07-25 Thread Meena Rengarajan
My task is like pop up and alert button using animation in Android . I am
very new to Android . I do not how to do .. please can anyone help me
atleast suggest me a idea, i can do it !

On Wed, Jul 25, 2012 at 10:01 PM, TreKing treking...@gmail.com wrote:

 On Wed, Jul 25, 2012 at 11:28 AM, Meena Rengarajan meenasoft...@gmail.com
  wrote:

 How do i wanna do pop up in animation can anyone suggest me ? please ..


 First explain what pop up in animation means.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Animation

2012-07-25 Thread TreKing
On Wed, Jul 25, 2012 at 11:35 AM, Meena Rengarajan
meenasoft...@gmail.comwrote:

 My task is like pop up and alert button using animation in Android .


Using animation for what?


  I am very new to Android . I do not how to do .. please can anyone help
 me atleast suggest me a idea, i can do it !


Read the documentation section on Animation?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation overlay over camera preview

2012-06-30 Thread Yamanoor Sai Ram
I would like to create an animation over a camera preview. * *My camera
preview is a derivative of the following
examplehttps://github.com/commonsguy/cw-advandroid/blob/master/Camera/Preview/src/com/commonsware/android/camera/PreviewDemo.java
.

I have attached an example of the layout of my app. There are 9 rectangular
bars on the left hand side. I would like to display one rectangle after the
other to animate a status bar. I created a relative layout for the camera
preview overlay. I am not sure how should I go about doing it. Any
suggestions would be appreciated.

Thanks,
Sai

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=enattachment: layout_2.png

[android-developers] Animation Problem

2012-06-07 Thread abhijeet tomar
Hello Developers,

I have done frame Animation suceessfully and the frame images comes from
Drawable folder .
Actually problem is that...images are alot then we have not store in
Drawable folder..thats why images will be stored in SdCard...
Problem is that ,How to read images from sd card and set into animation
frame...
Please Help me...

Thanks in Advance

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation...

2012-06-07 Thread abhijeet tomar
Hello Developers,

I have done frame Animation suceessfully and the frame images comes
from Drawable folder .
Actually problem is that...images are alot then we have not store in
Drawable folder..thats why images will be stored in SdCard...
Problem is that ,How to read images from sd card and set into
animation frame...
Please Help me...

Thanks in Advance

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation...

2012-06-07 Thread Narendra Singh Rathore
On Thu, Jun 7, 2012 at 3:01 PM, abhijeet tomar abhijeet...@gmail.comwrote:

 Hello Developers,

 I have done frame Animation suceessfully and the frame images comes
 from Drawable folder .
 Actually problem is that...images are alot then we have not store in
 Drawable folder..thats why images will be stored in SdCard...
 Problem is that ,How to read images from sd card and set into
 animation frame...
 Please Help me...

 Thanks in Advance



Hi Abhijeet, here is your solution.

Use addFrame() method like this:

 animation.addFrame(BitmapDrawable.createFromPath (sdcard/image1.png),
250);


I hope, you got it.



With Regards,
NSR

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Animation Problem

2012-06-07 Thread Narendra Singh Rathore
On Thu, Jun 7, 2012 at 1:19 PM, abhijeet tomar abhijeet...@gmail.comwrote:

 Hello Developers,

 I have done frame Animation suceessfully and the frame images comes from
 Drawable folder .
 Actually problem is that...images are alot then we have not store in
 Drawable folder..thats why images will be stored in SdCard...
 Problem is that ,How to read images from sd card and set into animation
 frame...
 Please Help me...

 Thanks in Advance


Use this.

animation.addFrame(
BitmapDrawable.createFromPath (sdcard/image1.png), 250);

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation is too slow with xhdpi device.

2012-04-05 Thread btai...@gmail.com
I've faced problem that animation of view is too slow and with Galaxy
Note which has 1280x800 and 320dpi display.

Actually, I use ScaleAnimation and TransAnimation with RelativeLayout
in code and  I'm pretty sure that code is not incorrect. Size of Image
animated is 67.5 kb.

Device with 800x480 and 240dpi display even shows faster and smooth
anmation than Galaxy Note which has better hardware performance.

I just guess the reason to cause the slow is that devices with high
resolution are slow because they have to make up high quaility UI
suitable for them.

what exact reason caused this problem?
is there  any way to find solution to the problem?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation is too slow with xhdpi device.

2012-04-05 Thread Mark Murphy
On Thu, Apr 5, 2012 at 6:42 AM, btai...@gmail.com btai...@gmail.com wrote:
 I've faced problem that animation of view is too slow and with Galaxy
 Note which has 1280x800 and 320dpi display.

 Actually, I use ScaleAnimation and TransAnimation with RelativeLayout
 in code and  I'm pretty sure that code is not incorrect. Size of Image
 animated is 67.5 kb.

That is the size on disk, I presume. Bear in mind that the image is a
fair bit larger in memory. And, more importantly, it is the resolution
of the image that will drive performance with respect to animating it,
not the file size.

 I just guess the reason to cause the slow is that devices with high
 resolution are slow because they have to make up high quaility UI
 suitable for them.

That is certainly a guess. You might consider using Traceview to try
to determine exactly where the problem is. For example, if Android is
rescaling the image, that might have an impact on its animation
performance.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation is too slow with xhdpi device.

2012-04-05 Thread Dianne Hackborn
Have you made sure hardware accelerated drawing is enabled?

On Thu, Apr 5, 2012 at 3:42 AM, btai...@gmail.com btai...@gmail.com wrote:

 I've faced problem that animation of view is too slow and with Galaxy
 Note which has 1280x800 and 320dpi display.

 Actually, I use ScaleAnimation and TransAnimation with RelativeLayout
 in code and  I'm pretty sure that code is not incorrect. Size of Image
 animated is 67.5 kb.

 Device with 800x480 and 240dpi display even shows faster and smooth
 anmation than Galaxy Note which has better hardware performance.

 I just guess the reason to cause the slow is that devices with high
 resolution are slow because they have to make up high quaility UI
 suitable for them.

 what exact reason caused this problem?
 is there  any way to find solution to the problem?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Animation is too slow with xhdpi device.

2012-04-05 Thread Mark Murphy
On Thu, Apr 5, 2012 at 4:57 PM, Dianne Hackborn hack...@android.com wrote:
 Have you made sure hardware accelerated drawing is enabled?

AFAIK, the Galaxy Note runs 2.3.x at the moment, not 3.0.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation is too slow with xhdpi device.

2012-04-05 Thread Dianne Hackborn
Ah, I missed that this is the note.  If this is a Tegra 3 on a 1280x800
screen then there is very little rendering complexity you can have to keep
full-screen drawing going at 60fps.  For example I think getting into a
situation where a large bitmap is scaling will probably kill you.

Keep in mind:

1280x800x32bpp == 4MB per frame buffer
800x480x32bpp == 1.5MB per frame buffer

So you have nearly 2.5x as many pixels to draw.  Drawing is single
threaded, so your multiple cores aren't going to help.  How much faster is
a single core on your Note compared to a single core on your other device?

On Thu, Apr 5, 2012 at 2:03 PM, Mark Murphy mmur...@commonsware.com wrote:

 On Thu, Apr 5, 2012 at 4:57 PM, Dianne Hackborn hack...@android.com
 wrote:
  Have you made sure hardware accelerated drawing is enabled?

 AFAIK, the Galaxy Note runs 2.3.x at the moment, not 3.0.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 Android App Developer Books: http://commonsware.com/books

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] animation

2012-03-21 Thread Indraneel Kulkarni
hey all i have to create a basic animation. i want to make a stick
figure walk. how do i do it? i have no clue. please help!
thanks!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] animation becomes choppy or appears to not work when placed on top of LayerDrawable

2012-02-21 Thread Aaron
I have a LayerDrawable that I am creating in code because I have to do
some color filtering to individual components of the layered image. On
top of the layered image I have 2 ImageViews on top of one another and
one is set to invisible. When the visible ImageView is clicked it
rotates to 90 and made invisible and the invisible ImageView is made
visible and rotated from -90 to 0.

My issue is when I added the LayerDrawable which is made up of 8 pngs
to the Activity the animation didn't work as well as before. It got
very choppy or didn't appear to rotate at all.

Does anyone have any ideas regarding this?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] animation for splash screen

2012-01-30 Thread aparna rani
hii all


i am implementing splash screen for my app. i just implement
display sometime and go to next activity. but i want to show any animation
show my activity/
please give me idea how to do that.

thanking you..

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] animation for splash screen

2012-01-30 Thread Ratheesh Valamchuzhy
use fade_in animation in android

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation on a set of ImageViews

2012-01-16 Thread MikeMike
I have been trying to find the answer to this question for 3 days
now.  I am developing a game.  And as one progresses in levels, I want
to AlphAnimate each of my imageviews.  So I have an array list of
imageviews.

For iterator i current_game.next()
{
   AlphaAnimation anim = new AlphaAnimation(0.0,1.0)
   anim.setDuration(500);
   i.startAnimation( anim );
}

I want the animation to complete then start the next one, but what is
happening is they are all being animated at the same time.  Please
help!

Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation Is repeating...why?

2012-01-16 Thread MikeMike
I am trying to get my imageView animations to play serially.  But when
onAnimationEnd the original one somehow replays :


   private void drawCurrentGame()
{
final LinkedListImageView animation_queue =
(LinkedListImageView) current_game.clone();

ImageView working_view;

final AlphaAnimation anim = new AlphaAnimation(0.0f, 1.0f);
anim.setDuration(500);

anim.setAnimationListener(new Animation.AnimationListener() {
public void onAnimationStart(Animation a)
{

}
public void onAnimationRepeat(Animation a) {}
public void onAnimationEnd(Animation a)
{
ImaveView v = ((AlphaAnimation)a).getView();

if( animation_queue.isEmpty() ) return;
animation_queue.poll().startAnimation(anim);
}
});

 if( !animation_queue.isEmpty())
 {
 animation_queue.poll().startAnimation(anim);
 }
}


HElp please!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation in ExpandableListView

2012-01-13 Thread TreKing
On Tue, Jan 10, 2012 at 3:40 AM, dileep dileepk...@gmail.com wrote:

  How can i add animation effect in subitems of an ExpandableListView


RTFM, try something, read this
http://www.catb.org/~esr/faqs/smart-questions.html, then ask again.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation in ExpandableListView

2012-01-10 Thread dileep
HI,

 How can i add animation effect in subitems of an
ExpandableListView

thanks.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] animation while mutation hierarchy

2012-01-08 Thread satahippy
is it possible? just, only main thread can change hierarchy, but the 
animation also suggest mutation heirarchy

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation Trail while using Rotate Animation

2011-12-29 Thread sunil bhatia
Hi,
I am trying to rotate a framelayout at orientation change.
Layout is getting rotated but it shows trail on device , Like some
spots remain on the screen while roatating.
Can anyone help in this regard, How to remove those animation trails?
Any help on this would be highly appreciated.

Thanks and Regards

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation doesn't start again after several times of running

2011-12-21 Thread AlexBonel
Hello everyone. I make custom AdapterView which items should be
scrolled in two directions (from bottom left to top rigth and
conversely). During scrolling I use TranslateAnimation and
AlphaAnimation.

Here is the steps of scrolling:

1) Top (Bottom) View starts to hidem using AlphaAnimation
2) I start TranslateAnimation for every other items in loop and they
relocated to the new positions
3) At the end of AlphaAnimation I make border View invisible and
remove
4) At the end of TranslateAnimation every translated item get new
positions (using layout() calling)), I remove faded View from layout
and store it as convert in the buffer
5) Then I call adapter's getView() to get convertedView and position
it on the bottom (top) of my AdapterView, make this view visible and
start AlphaAnimation (fade in)

The problem is that this combination of animation works well with
deffinite values of their durations, but if I make duration values
smaller they stop working after third running.

Here are the code snippets for more clearness:

private void hideView(final View v, final boolean scrollDown) {
AlphaAnimation hiding = new AlphaAnimation(1.0f, 0.0f);
hiding.setDuration(700);

hiding.setAnimationListener(
new AnimationListener() {

@Override
public void onAnimationStart(Animation 
animation) {}

@Override
public void onAnimationRepeat(Animation 
animation) {}

@Override
public void onAnimationEnd(Animation animation) 
{
v.setVisibility(View.INVISIBLE);
}
}
);
v.startAnimation(hiding);
}

private void scrollDown() {
final View frontView = getChildAt(getChildCount() - 1);
hideView(frontView, true);

for(int i = getChildCount() - 2; i = 0; i--) {
final View child = getChildAt(i);
final int newleft = child.getLeft() - 
mOffsetBetweenItems;
final int newTop = child.getTop() + mOffsetBetweenItems;
final int index = i;
TranslateAnimation scrollDown = new 
TranslateAnimation(0, -
mOffsetBetweenItems, 0, mOffsetBetweenItems);
scrollDown.setDuration(750);
scrollDown.setFillEnabled(true);
scrollDown.setAnimationListener(
new AnimationListener() {

@Override
public void onAnimationStart(Animation 
animation) {}

@Override
public void onAnimationRepeat(Animation 
animation) {}

@Override
public void onAnimationEnd(Animation 
animation) {
child.layout(newleft, newTop, 
newleft +
child.getMeasuredWidth(), newTop + child.getMeasuredHeight() );
if(index == 0) {
removeFromFront();
fillFromBehind();
}
}
}
);

child.startAnimation(scrollDown);
}
}

private void scrollUp() {
final View backView = getChildAt(0);
hideView(backView, true);

for(int i = 1; i  getChildCount(); i++) {
final View child = getChildAt(i);
final int newleft = child.getLeft() + 
mOffsetBetweenItems;
final int newTop = child.getTop() - mOffsetBetweenItems;
final int index = i;
TranslateAnimation scrollUp = new TranslateAnimation(0,
mOffsetBetweenItems, 0, -mOffsetBetweenItems);
scrollUp.setDuration(750);
scrollUp.setFillEnabled(true);
scrollUp.setAnimationListener(
new AnimationListener() {

@Override
public void onAnimationStart(Animation 
animation) {}

@Override
public void onAnimationRepeat(Animation 
animation) {}

@Override
public void onAnimationEnd(Animation 
animation) {

[android-developers] Animation effect from button?

2011-12-20 Thread Duygu Kahraman
 It can be basic but i didnt do before.

I have a button.And i add a window from button.But i want to this
window color lightening like a alarm effect(Means black window will
turn red smooth effect).

How can i do that? I must use animation or a can do it this way.

THX.

Duygu Kahraman

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation effect from button?

2011-12-20 Thread TreKing
On Tue, Dec 20, 2011 at 9:17 AM, Duygu Kahraman
duygu.kahram...@gmail.comwrote:

 How can i do that?


Your question is not very clear. Have you reviewed the documentation on
Animation? What have you tried?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation in webview

2011-11-28 Thread Alex Georgantas
If anyone can help me with this I will be very happy. I have an
application that uses webview. The webview loads a url and I have used
the Google tutorial to overide all the other links that I want to open
with webview also. I have create an anim in res and a slide_right xml
and so far so good. I call the effect in my main java activity but it
only applies to the first page. The thing that I want is the effect to
apply in every page that links loads in webview.

Can you help my with my code?

package com.ihome;
import android.app.Activity;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.webkit.WebView;
import android.webkit.WebViewClient;



public class IhomeActivity extends Activity {
WebView mWebView;
private class HelloWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String
url) {
Animation slideRightAnimation =
AnimationUtils.loadAnimation(getBaseContext (), R.anim.slide_right);
mWebView.startAnimation(slideRightAnimation);
view.loadUrl(url);
return true;
}
}


@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK) 
mWebView.canGoBack()) {
Animation slideLeftAnimation =
AnimationUtils.loadAnimation(getBaseContext (), R.anim.slide_left);
mWebView.startAnimation(slideLeftAnimation);
mWebView.goBack();
return true;
}
return super.onKeyDown(keyCode, event);
}

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mWebView = (WebView) findViewById(R.id.webview);
mWebView.setVerticalScrollBarEnabled(false);
mWebView.setHorizontalScrollBarEnabled(false);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.loadUrl(http://www.google.com/;);
mWebView.setWebViewClient(new HelloWebViewClient());

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation not repeat

2011-09-05 Thread Hadas Mobile
Bcd
Hi,
I write animation, but- even that I use with
AnimationDrawable.addFrame(mDrawable, 1000);
the animation not repeat.
What it can be???

Thanks
Hadas Mobile

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation not repeat

2011-09-05 Thread Appaholics
Would you mind posting more of your code?

Thanks

On Mon, Sep 5, 2011 at 8:15 PM, Hadas Mobile hadas.mob...@gmail.com wrote:

 Bcd
 Hi,
 I write animation, but- even that I use with
 AnimationDrawable.addFrame(mDrawable, 1000);
 the animation not repeat.
 What it can be???

 Thanks
 Hadas Mobile

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
--
Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
required to have complete control)
http://www.raghavsood.com/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation + Touch + Rotate bitmap

2011-08-18 Thread fala70
Hi, I need to make an animation to rotate a bitmap, using touch. The
user can do only the rotation of bitmap, when the touch is pressed and
moved the bitmap image go rotate animation, follow the finger. How can
I do it ?

thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation not displaying in onBackPressed

2011-08-11 Thread Stefan Alder
I'm trying to slide a custom modal view off the screen with a
translation animation when the user presses the hardware back button.

I call the panel.setAnimation method within onBackPressed, but while
the method executes, the animation is not visible.  Only until I touch
the display does it redraw to the final state (with no animation).  I
tried running the animation method via runOnUIThread, but that made no
difference.   Any idea why the animation is not being displayed?

If I use a custom button on the screen to call the animation, it works properly.

Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation not displaying in onBackPressed

2011-08-11 Thread Appaholics
Try calling invalidate() on the view you are using so that onDraw is called
again.

Thanks

On Thu, Aug 11, 2011 at 12:17 PM, Stefan Alder twigbra...@gmail.com wrote:

 I'm trying to slide a custom modal view off the screen with a
 translation animation when the user presses the hardware back button.

 I call the panel.setAnimation method within onBackPressed, but while
 the method executes, the animation is not visible.  Only until I touch
 the display does it redraw to the final state (with no animation).  I
 tried running the animation method via runOnUIThread, but that made no
 difference.   Any idea why the animation is not being displayed?

 If I use a custom button on the screen to call the animation, it works
 properly.

 Thanks

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 

Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
required to have complete control)
http://www.raghavsood.com/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Animation not displaying in onBackPressed

2011-08-11 Thread Stefan Alder
That was it. Thanks.

On Thu, Aug 11, 2011 at 8:01 AM, Appaholics raghavs...@appaholics.in wrote:
 Try calling invalidate() on the view you are using so that onDraw is called
 again.
 Thanks

 On Thu, Aug 11, 2011 at 12:17 PM, Stefan Alder twigbra...@gmail.com wrote:

 I'm trying to slide a custom modal view off the screen with a
 translation animation when the user presses the hardware back button.

 I call the panel.setAnimation method within onBackPressed, but while
 the method executes, the animation is not visible.  Only until I touch
 the display does it redraw to the final state (with no animation).  I
 tried running the animation method via runOnUIThread, but that made no
 difference.   Any idea why the animation is not being displayed?

 If I use a custom button on the screen to call the animation, it works
 properly.

 Thanks

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


 --
 
 Raghav Sood
 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
 required to have complete control)
 http://www.raghavsood.com/
 https://market.android.com/developer?pub=Appaholics
 http://www.appaholics.in/

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation

2011-06-10 Thread Neha
Hii all,
   I tried a lot to animate an image without clicking on the image.but i 
didn't get the result. send me your suggestions. below i mentioned my code
  * project.java*
final ImageView imageView = (ImageView) 
findViewById(R.id.blankImageView); 
final AnimationDrawable yourAnimation; 
imageView.setBackgroundResource(R.drawable.loadinganim); 
yourAnimation = (AnimationDrawable) imageView.getBackground();
  yourAnimation.start(); 
  
 and an Xml file like this in the res/drawable/anim
  ?xml version=1.0 encoding=utf-8?
animation-list xmlns:android=http://schemas.android.com/apk/res/android;
android:oneshot=false
item android:drawable=@drawable/load0 android:duration=60 /
item android:drawable=@drawable/load1 android:duration=60 /
item android:drawable=@drawable/load2 android:duration=60 /
item android:drawable=@drawable/load3 android:duration=60 /
item android:drawable=@drawable/load4 android:duration=60 /
item android:drawable=@drawable/load5 android:duration=60 /
item android:drawable=@drawable/load6 android:duration=60 /
item android:drawable=@drawable/load7 android:duration=60 /
item android:drawable=@drawable/load8 android:duration=60 /
   /animation-list
 

Thanks in advance

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation

2011-06-09 Thread Neha
Can anyone help me in creating animated image in frame animation type.


Thanks in advance

Neha

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Animation

2011-06-09 Thread TreKing
On Thu, Jun 9, 2011 at 7:02 AM, Neha cibin.p.oom...@gmail.com wrote:

 Can anyone help me in creating animated image in frame animation type.


http://www.catb.org/~esr/faqs/smart-questions.html

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Animation Leaving Trail Using AnimatorSet

2011-06-04 Thread Craig
Thank you for the offer, but it is part of a larger app that is being made 
for my employer, which I cannot distribute.  If it comes to it though, 
perhaps I can create a small standalone app with just the animation code in 
it.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation Leaving Trail Using AnimatorSet

2011-06-03 Thread Craig
I am using the new honeycomb animation api and am having a problem with 
animated ImageView objects leaving a trail when animated.  The app downloads 
images via http, makes and ImageView and adds that to a list view (which is 
in a fragment) and animates each one with its own AnimatorSet (consisting of 
2 ObjectAnimator.ofFloat for the x/y coords).  Screenshot sample:  
http://imageshack.us/photo/my-images/824/trailm.png

10 images are displayed at a time, each being downloaded asynchronously, 
added to the view, and animated immediately.  The trail is usually only 
there for 1 or 2 of the 10 animated images, but it happens for about 95% of 
the times I test it.

If it helps, this is bring done on Android 3.0.1 on a Galaxy Tab 10.1 device 
(from Google IO).

I saw an old thread in this group, but the answer was that it was fixed in 
Donut:
http://groups.google.com/group/android-developers/browse_thread/thread/5481450f8b71a26c/e750730b9953d9a8?lnk=gstq=animation+trail#e750730b9953d9a8

Given that this is the new animation system, is there a new, similar bug 
here?  Can anyone offer suggestions on how to fix this?

Thanks.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Animation Leaving Trail Using AnimatorSet

2011-06-03 Thread J Handal

 I can try it in my Moto Xoom 3.1 using the last Animation Api?




  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation transition between activities in ActivityGroup?

2011-05-26 Thread imran ali
Hi,
I am using ActivityGroup and in that i have been using activities, how
can i animate activities
at the time of setContentView(view)?

Regards
Imran ali

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation transition between activities in ActivityGroup?

2011-05-26 Thread TreKing
On Thu, May 26, 2011 at 8:15 AM, imran ali imran...@gmail.com wrote:

 I am using ActivityGroup and in that i have been using activities, how can
 i animate activities at the time of setContentView(view)?


Maybe this: 
http://developer.android.com/reference/android/app/Activity.html#overridePendingTransition(int,
int)

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation of the videoView in Android 2.2 is not working

2011-05-19 Thread Shiva bhole
Dear all,

I want to know how can we animate the video. I tried animating the
Image using the ImageView and it happened very smoothly. But, when I
try to animate the VideoView using the animation class, I am able to
move the view only (can see a black screen moving) but our video is
played in the same position.

Can anyone please explain how we can implement it?

TIA

SB

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] ANIMATION WITH BUTTON CLICK

2011-04-18 Thread Raghavaraju K
hi,  I am new to android and I could nt able to solve this, I want to
create a button and with the click of the button the animation should
happen , whats the wrong with this , please help me with the sample
code

Help is always appreciated
Thanks



package com.transformation;

//import android.R;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.animation.Animation.AnimationListener;
import android.widget.Button;
import android.widget.LinearLayout;
public class Transformation extends Activity implements
AnimationListener {
  LinearLayout layout;
  LinearLayout layout2;
  Animation movement;
  Animation movement2;

  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
   final Button button = (Button)findViewById(R.id.widget40);
   button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {


public void startAnimation(View v)

// Get the layouts
layout = (LinearLayout) findViewById(R.id.linearLayout1);
layout2 = (LinearLayout) findViewById(R.id.linearLayout2);

// Create animation for right image
movement = AnimationUtils.loadAnimation(this,
R.layout.animation_test);
movement.reset();
movement.setAnimationListener(this);

// Create animation for left image
movement2 = AnimationUtils.loadAnimation(this,
R.layout.animation_test2);
movement2.reset();
movement2.setAnimationListener(this);


// Start animation on each image
layout2.startAnimation(movement2);
layout.startAnimation(movement);}

  // Listen for animations to be finished
  // There are more efficient ways, I'm just being lazy.
  public void onAnimationEnd(Animation animation) {
layout.setVisibility(View.INVISIBLE);
layout2.setVisibility(View.INVISIBLE);
// or do whatever it is you wanted to do here, like launch
another activity?
  }

  public void onAnimationRepeat(Animation animation) {
  }

  public void onAnimationStart(Animation animation) {
}
});


}

@Override
public void onAnimationEnd(Animation animation) {
// TODO Auto-generated method stub

}

@Override
public void onAnimationRepeat(Animation animation) {
// TODO Auto-generated method stub

}

@Override
public void onAnimationStart(Animation animation) {
// TODO Auto-generated method stub

}
  };

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation with only one view

2011-03-19 Thread Jeremy Cowgar
Wow, it's about time, but I finally got around to doing this. Thanks
for the help Kostya, it worked just fine.

Jeremy

On Tue, Feb 22, 2011 at 7:23 AM, Kostya Vasilyev kmans...@gmail.com wrote:
 22.02.2011 14:49, Jeremy Cowgar пишет:

 Can anyone point me in the right direction to make this type of
 animation work correctly?

 Any type of transition will require at least two views - one to hold the old
 value, one for the new one.

 With this in mind, use a ViewFlipper with two identical child views to
 represent the two values. Always push the new value into the child that's
 not visible, then animate from the visible/old view to the invisible/new
 one.

 If you decide to do it this way, take note of this:

 http://stackoverflow.com/questions/4674796/crash-when-rotating-activity-using-viewflipper

 -- Kostya

 --
 Kostya Vasilyev -- http://kmansoft.wordpress.com

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation with only one view

2011-02-22 Thread Jeremy Cowgar
Hello,

 I have a view that browses data with a large amount of numbers. When
going to the previous or next record if you're not really paying
attention it's possible to not detect that it actually moved because
many times the numbers are very similar. I have added a page counter
to the view (1/20, 2/20, ...) but even that is not the best solution,
I don't think.

I would like to do a slide out/in or some other type of animation when
chaning records as to provide a positive move but my problem is that
it is only one view. I am not changing views, just changing the data
with in the existing view. I have managed to make some terrible
transition animations but nothing is working as I would like. For
example, I slide the current view out then in the animation listener
when completed, I update the view and slide it in. It's not a nice
smooth transition and the screen is blank for a short period of time
between the two animations as one slides out, then blank, then one
slides in.

Can anyone point me in the right direction to make this type of
animation work correctly?

Thanks,

Jeremy

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation with only one view

2011-02-22 Thread Kostya Vasilyev

22.02.2011 14:49, Jeremy Cowgar пишет:

Can anyone point me in the right direction to make this type of
animation work correctly?


Any type of transition will require at least two views - one to hold the 
old value, one for the new one.


With this in mind, use a ViewFlipper with two identical child views to 
represent the two values. Always push the new value into the child 
that's not visible, then animate from the visible/old view to the 
invisible/new one.


If you decide to do it this way, take note of this:

http://stackoverflow.com/questions/4674796/crash-when-rotating-activity-using-viewflipper

-- Kostya

--
Kostya Vasilyev -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation on slide drawer

2011-01-10 Thread nikki
Hi Group

I created a slide drawer for my application but it doesn't open
smoothly as it get close. Is there any way i can add animation effect
on opening of my slide drawer..??

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation problem

2010-12-28 Thread iced
Hello,
I'm new here and I don't know if this is the right place for my
problem. Please excuse me if it's wrong.
I want to create a scale animation where a view grows a bit from it's
original size and then shrinks to it's old size.
My XML file:
?xml version=1.0 encoding=utf-8?
set xmlns:android=http://schemas.android.com/apk/res/android;
scale
android:repeatCount=infinite
android:fromXScale=1.0
android:toXScale=1.2
android:fromYScale=1.0
android:toYScale=1.2
android:pivotX=50%
android:pivotY=50%
android:duration=2000
android:startOffset=0 /
scale
android:repeatCount=infinite
android:fromXScale=1.2
android:toXScale=1.0
android:fromYScale=1.2
android:toYScale=1.0
android:pivotX=50%
android:pivotY=50%
android:duration=2000
android:startOffset=2000 /
/set
When I start this animation the view object grows directly by the
factor 1.2. Then the animation starts and the view grows and shrinks
like I want it. After that there is another jump to the original size
of the view. So there are two jumps, which I don't want and I don't
know how to solve this problem.
Please could you help me.
Thank you

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation problem

2010-12-28 Thread John Lussmyer
You may want to set the setFillBefore and/or setFillAfter values.  (one of
them defaults to true, the other to false.)

On Tue, Dec 28, 2010 at 3:21 PM, iced pascal-h...@t-online.de wrote:

 Hello,
 I'm new here and I don't know if this is the right place for my
 problem. Please excuse me if it's wrong.
 I want to create a scale animation where a view grows a bit from it's
 original size and then shrinks to it's old size.


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation stops timer (newbie alert!)

2010-12-23 Thread CasaDelGato
I'm starting to play with doing some simple animations.
I have one where I want a sound and animation to play every X seconds
after a button is pressed.
So I set it up like this:

private ScheduledThreadPoolExecutor threadRunner = new
ScheduledThreadPoolExecutor(
4);
private SoundPlayer mSoundPlayer = new SoundPlayer();
private ScheduledFutureSoundPlayer playerFuture = null;


private OnClickListener mClickButton = new OnClickListener() {
public void onClick(View v) {
Button button = (Button) findViewById(R.id.Button01);
if (playerFuture != null) {
button.setText(R.string.Button01);
playerFuture.cancel(false);
playerFuture = null;
} else {
button.setText(R.string.BtnStop);
playerFuture = (ScheduledFutureSoundPlayer)
threadRunner.scheduleAtFixedRate(mSoundPlayer,
0, 3000, TimeUnit.MILLISECONDS);
}
return;
}
};

private class SoundPlayer implements Runnable {
private MediaPlayer mPlayer;
private TextView testShape;
private Animation testAnimation;

public void run() {
if (mPlayer == null) {
mPlayer = MediaPlayer.create(getBaseContext(), 
R.raw.ding);
testShape = (TextView) 
findViewById(R.id.TextView02);
testAnimation = 
AnimationUtils.loadAnimation(getBaseContext(),
R.anim.testanim);
}
mPlayer.start();
testShape.startAnimation(testAnimation);
return;
}
}

The problem is that the call to startAnimation seems to stop the
timer.
The sequence of events is:

Press Button (starts timer)
Sound plays once
Press Button (to stop the timer)
Animation plays once
Press Button (starts timer)
Sound  Animation play once
Press Button (stops timer)
nothing happens
Press Button (starts timer)
Sound  Animation play once
...

If I remove the call to testShape.startAnimation(), the timer runs,
and the sound plays every 3 seconds until the button is pressed again.

I must be doing something wrong with the animation, but I haven't been
able to figure out what.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation stops timer (newbie alert!)

2010-12-23 Thread Kostya Vasilyev

23.12.2010 19:08, CasaDelGato пишет:

I must be doing something wrong with the animation, but I haven't been
able to figure out what.


You are calling an Android UI framework method from a background thread, 
and that's not allowed.


The UI portion of the framework is not thread-safe, and the consequences 
are undefined.


This link has a pretty clear description of the issue, as well as proper 
Android code patterns for this:


http://developer.android.com/resources/articles/painless-threading.html

-- Kostya

--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com


--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation stops timer (newbie alert!)

2010-12-23 Thread John Lussmyer
On Thu, Dec 23, 2010 at 8:31 AM, Kostya Vasilyev kmans...@gmail.com wrote:

 23.12.2010 19:08, CasaDelGato пишет:

  I must be doing something wrong with the animation, but I haven't been
 able to figure out what.


 You are calling an Android UI framework method from a background thread,
 and that's not allowed.

 The UI portion of the framework is not thread-safe, and the consequences
 are undefined.

 This link has a pretty clear description of the issue, as well as proper
 Android code patterns for this:

 http://developer.android.com/resources/articles/painless-threading.html


Thanks, that does help.  I figured it was something like that, I just
couldn't find the correct docs.
Now, I have the problem that my animation won't repeat.
It plays just once.

My onCreate does this:
testAnimation = AnimationUtils.loadAnimation(getBaseContext(),
R.anim.testanim);
testAnimation.setAnimationListener(mAnimationListener);
testAnimation.setDuration(3000);
testAnimation.setRepeatCount(10);
testAnimation.setRepeatMode(Animation.RESTART);

and my onClick does this:
if (running) { // Currently running, stop it
button.setText(R.string.Button01);
testShape.clearAnimation();
} else { // Currently stopped, start it
button.setText(R.string.BtnStop);
testShape.startAnimation(testAnimation);
}

The animation plays exactly once, and the listeners onAnimationStart() is
called exactly once.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation won't repeat

2010-12-23 Thread John Lussmyer
Now, I have the problem that my animation won't repeat.
It plays just once.

My onCreate does this:

testAnimation = AnimationUtils.loadAnimation(getBaseContext(),
R.anim.testanim);
testAnimation.setAnimationListener(mAnimationListener);
testAnimation.setDuration(3000);
testAnimation.setRepeatCount(10);
testAnimation.setRepeatMode(Animation.RESTART);

and my onClick does this:
if (running) { // Currently running, stop it

button.setText(R.string.Button01);
testShape.clearAnimation();
} else { // Currently stopped, start it

button.setText(R.string.BtnStop);
testShape.startAnimation(testAnimation);
}

The animation plays exactly once, and the listeners onAnimationStart() is
called exactly once.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Animation won't repeat

2010-12-23 Thread Mark Murphy
Try using:

this

instead of:

getBaseContext()

Also:

-- Does your listener get called with onAnimationRepeat()?

-- What is the animation?

On Thu, Dec 23, 2010 at 3:37 PM, John Lussmyer johnlussm...@gmail.com wrote:
 Now, I have the problem that my animation won't repeat.
 It plays just once.

 My onCreate does this:
         testAnimation = AnimationUtils.loadAnimation(getBaseContext(),
 R.anim.testanim);
         testAnimation.setAnimationListener(mAnimationListener);
         testAnimation.setDuration(3000);
         testAnimation.setRepeatCount(10);
         testAnimation.setRepeatMode(Animation.RESTART);

 and my onClick does this:
             if (running) { // Currently running, stop it
                 button.setText(R.string.Button01);
                 testShape.clearAnimation();
             } else { // Currently stopped, start it
                 button.setText(R.string.BtnStop);
                 testShape.startAnimation(testAnimation);
             }

 The animation plays exactly once, and the listeners onAnimationStart() is
 called exactly once.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation won't repeat

2010-12-23 Thread John Lussmyer
Using this instead of getBaseContext() made no difference.
listener onAnimationRepeat() is never called.
Very simple animation:

set xmlns:android=http://schemas.android.com/apk/res/android;
android:shareInterpolator=false
   translate

android:interpolator=@android:anim/accelerate_decelerate_interpolator
  android:fillAfter=false
  android:fromXDelta=50%p
  android:toXDelta=-50%p
  android:duration=100 /
/set



On Thu, Dec 23, 2010 at 12:42 PM, Mark Murphy mmur...@commonsware.comwrote:

 Try using:

 this

 instead of:

 getBaseContext()

 Also:

 -- Does your listener get called with onAnimationRepeat()?

 -- What is the animation?



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Animation won't repeat

2010-12-23 Thread Mark Murphy
Try specifying the repeat (and maybe the right duration) in the XML
instead of in Java. That should not make a difference, but it is at
least worth a try.

Otherwise, I see nothing obviously wrong.

On Thu, Dec 23, 2010 at 3:47 PM, John Lussmyer johnlussm...@gmail.com wrote:
 Using this instead of getBaseContext() made no difference.
 listener onAnimationRepeat() is never called.
 Very simple animation:

 set xmlns:android=http://schemas.android.com/apk/res/android;
 android:shareInterpolator=false
    translate

 android:interpolator=@android:anim/accelerate_decelerate_interpolator
   android:fillAfter=false
   android:fromXDelta=50%p
   android:toXDelta=-50%p
   android:duration=100 /
 /set



 On Thu, Dec 23, 2010 at 12:42 PM, Mark Murphy mmur...@commonsware.com
 wrote:

 Try using:

 this

 instead of:

 getBaseContext()

 Also:

 -- Does your listener get called with onAnimationRepeat()?

 -- What is the animation?


 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation won't repeat

2010-12-23 Thread John Lussmyer
Now, that is interesting.
Moving the repeatCount and repeatMode settings to the XML made it mostly
work.
Setting the Duration in the Java does properly override the setting in the
XML.  Setting Count and Mode does not.

Also, the listeners onAnimationStart() is called exactly once.
OnAnimationRepeat() is never called - even though the animation is
repeating.

On Thu, Dec 23, 2010 at 12:50 PM, Mark Murphy mmur...@commonsware.comwrote:

 Try specifying the repeat (and maybe the right duration) in the XML
 instead of in Java. That should not make a difference, but it is at
 least worth a try.

 Otherwise, I see nothing obviously wrong.



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Animation won't repeat

2010-12-23 Thread John Lussmyer
onAnimationEnd() is called exactly once - when I do the
testShape.clearAnimation() to stop it.

On Thu, Dec 23, 2010 at 1:14 PM, John Lussmyer johnlussm...@gmail.comwrote:

 Now, that is interesting.
 Moving the repeatCount and repeatMode settings to the XML made it mostly
 work.
 Setting the Duration in the Java does properly override the setting in the
 XML.  Setting Count and Mode does not.

 Also, the listeners onAnimationStart() is called exactly once.
 OnAnimationRepeat() is never called - even though the animation is
 repeating.


 On Thu, Dec 23, 2010 at 12:50 PM, Mark Murphy mmur...@commonsware.comwrote:

 Try specifying the repeat (and maybe the right duration) in the XML
 instead of in Java. That should not make a difference, but it is at
 least worth a try.

 Otherwise, I see nothing obviously wrong.




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation in appWidget

2010-11-25 Thread Honest
hello,

i have made a widget which display images from sd card and then
navigate through it. Now i want to animate the image while i navigate
through it.I need to achieve following animation.

 1step : default galleryView motion
  2step : perspective galleryView motion


hope to hear soon from some one. any link will be much helpful


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation startOffset failing, 2.1 bug?

2010-10-25 Thread Cardy
Hi,

I've taken some animation xml straight from the android docs, and as
far as I can see, doesn't work on either my 2.1 update 1 emulator or
my 2.1 update 1 Galaxy S device.

Specifically, I'm trying to create an animation to pulsate a view
(i.e. make it smaller then larger in one animation)

This is the very simple markup:

?xml version=1.0 encoding=utf-8?
set
xmlns:android=http://schemas.android.com/apk/res/android;

scale
android:fromXScale=1.0
android:toXScale=0.5
android:fromYScale=1.0
android:toYScale=0.5
android:pivotX=50%
android:pivotY=50%
android:duration=1000 /

set android:startOffset=1000
scale

android:fromXScale=0.5
android:toXScale=1.0
android:fromYScale=0.5
android:toYScale=1.0
android:pivotX=50%
android:pivotY=50%
android:duration=1000 /
/set
/set

So what I'm trying to achieve is to reduce the view from its size to
half of it over a second, then to increase it back to its original
size over a second.

What actually happens is it snaps instantly to half of the views size
(even though fromX/YScale is at 1.0) and then performs the animation
and snaps back afterwards.

Can anyone else try this our quickly? If others see this behaviour
I'll submit it as a bug. I just can't believe something so basic could
be broken!?

Also, copying this animation under the Tween Animation heading on
this page http://developer.android.com/guide/topics/graphics/2d-graphics.html
word for word also doesn't animate as per the page says.

Anyone got any ideas?

Thanks!

Andy.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation List View Help!!!!

2010-10-24 Thread Dev Android
Hi all,

Anyone has idea how to create animation from top to bottom for List View
with increasing the height of each list item view ?


Any Idea please share with us.


Cheers!
Dev

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation loop

2010-09-16 Thread arnouf
Hi all,

I created an animation in an xml file.
I apply it on a textview like this :
Animation anim = AnimationUtils.loadAnimation(this,
R.anim.exit_about);
anim.setRepeatMode(Animation.RESTART);
anim.setRepeatCount(Animation.INFINITE);
v.findViewById(R.id.global_about).startAnimation(anim); // v is my
view

This runs once even if I set a repeat count.

Any idea ?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation support different resolution rate?

2010-08-22 Thread CaryWang
I use Animation Translate in my application,my mobile phone resolution rate
is 320*280,but In the 480*800 resolution rate don't support.I want ask I
should how to do ?



-- 
Cary

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Animation support different resolution rate?

2010-08-22 Thread Kostya Vasilyev

 Cary,

Redo your layouts using device-independent units (dp) instead of pixels 
if you use them, and use % values in animation definitions (e.g. animate 
-100% to 0% or some such).


-- Kostya

22.08.2010 19:23, CaryWang пишет:
I use Animation Translate in my application,my mobile phone resolution 
rate is 320*280,but In the 480*800 resolution rate don't support.I 
want ask I should how to do ?



--
Cary
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en 



--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation support different resolution rate?

2010-08-22 Thread CaryWang
I use % in animation xml
translate
android:fromYDelta=0%
android:toYDelta=-100%
android:duration=5000
/
in 320*280 ok.but 480*800..


2010/8/23 Kostya Vasilyev kmans...@gmail.com

  Cary,

 Redo your layouts using device-independent units (dp) instead of pixels if
 you use them, and use % values in animation definitions (e.g. animate
 -100% to 0% or some such).

 -- Kostya

 22.08.2010 19:23, CaryWang пишет:

 I use Animation Translate in my application,my mobile phone resolution
 rate is 320*280,but In the 480*800 resolution rate don't support.I want ask
 I should how to do ?


 --
 Cary
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



 --
 Kostya Vasilev -- WiFi Manager + pretty widget --
 http://kmansoft.wordpress.com

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Cary

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] animation is starting with a large black screen....

2010-08-15 Thread sdphil
i am trying to get a slide down animation to work, and it seems to
work except that it starts with a big black screen instead of the
screen that was there.

so I have layout1 and layout2.

when I start the animation using ViewFlipper.showNext it puts a big
black background over layout1, and then slides in layout2.  if I use
ViewFlipper.startFlipping() it slides in layout2 out as it is sliding
in layout1 -- which is what I would expect.

My slide_down.xml looks like this:
?xml version=1.0 encoding=utf-8?
set xmlns:android=http://schemas.android.com/apk/res/android;
translate android:fromYDelta=0
   android:toYDelta=100%
   android:duration=4000
   android:detachWallpaper=true/
/set

My java code looks like this:
ViewFlipper vf = (ViewFlipper) findViewById(R.id.DropDownList);
vf.setAnimation(AnimationUtils.loadAnimation(this,
R.anim.slide_down));
vf.showNext();or
vf.startFlipping();

tia.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation doubt

2010-07-16 Thread Sebastián Treu
Hi all,

I want to slide down a RelativeLayout filled with information. I have
written this animation:

?xml version=1.0 encoding=utf-8?
translate
xmlns:android=http://schemas.android.com/apk/res/android;
android:fromYDelta=0
android:toYDelta=87%
android:duration=350
android:fillAfter=true
/

The animation parameters are ok. But, when fillAfter is true, the
RelativeLayout measures are wrong. In fact, the getTop() is still the
same as before. And, if I set a listener to call
layout(int,int,int.int) onAnimationEnd(), the layout dissapears until
I click it. I call layout() this way in onAnimationEnd() method:

 if (animations[MOVE_DOWN] == animation) {
textBox.layout(left, top, right, bottom);
textBox.postInvalidate(left, top, right, bottom);  //just for
testing if this redraws the layout


And, if I set the fillAfter to false, and onAnimationEnd() I call the
layout() method without the invalidate method, when the view gets
updated (it's connected to a onItemClickListener from a Gallery) with
information, it will be redraw expanded.

Anyone can give me a tip how to create such effects? I set a
background layout as those folders tabs. I want to slide it down and
up, upon user touch events. I managed to do that. The animation is
like I want, but data it's not consistent. How to make the layout data
consistent with the animation data? I tried out with the listener
calling the layout() method, but the RelativeLayout dissapears.

Any help?

Regards,

PS: I can make a video to show how the animation is missbehaving.
-- 
If you want freedom, compile the source.

Sebastián Treu
http://labombiya.com.ar

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation and flickering - a possible solution

2010-07-14 Thread avigadl
I have a code that after a TraslateAnimation() ends the layout gets
recomputed (by using AnimationListener). This cause to flickering
effect.

I suspect that this problem  happens since the onAnimationEnd event is
called before the drawing of the last frame.

My solution was to postpone the layout process by a few milliseconds
and set the fillAfter(true) for the animation.

This will persist  the last frame of the animation before the re-
layout.

Hope this helps.

Lidor




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation behavior

2010-06-20 Thread gymshoe
I want to perform animations within a view.  However, the behavior of
the animations does not seem consistent depending on the sequence, and
I don't understand why.  This example performs a simple fade out of
the image:
XML:
set xmlns:android=http://schemas.android.com/apk/res/android;
android:interpolator=@android:anim/accelerate_interpolator
alpha
   android:fromAlpha=1.0
   android:toAlpha=0.0
   android:duration=1000 /
/set

However, if I have change the XML, so that the animation should fade
back in, nothing happens. The screen blanks out (not fades out) and
then reappears after the animation is over.
XML:
set xmlns:android=http://schemas.android.com/apk/res/android;
android:interpolator=@android:anim/accelerate_interpolator
alpha
   android:fromAlpha=1.0
   android:toAlpha=0.0
   android:duration=1000 /
alpha
   android:fromAlpha=0.0
   android:toAlpha=1.0
   android:duration=1000
   android:startOffset=2000
   /
/set
NOTE: if I run just the fade-in sequence alone (the second half),
then it also works appropriately.

What am I missing?  Thanks for any assistance.
JIm

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation not start immediately when the target view is out of window

2010-06-15 Thread funnything
Hi.
When I apply some animation to the view, which is out of window, the
animation not start immediately.
And then, I scroll the screen to show the animation target view, the
animation will start.
I hope to the animation will start immediately when it apply. Any
ideas?
Bellow is sample code. Thank you.

public class AnimationValidationActivity extends Activity {
private ViewSwitcher _viewSwitcher;
private Button _button;

/**
 * utility method for animation
 */
private Animation buildTranslateAnimation( float fromXDelta ,
float toXDelta , float fromYDelta , float toYDelta ) {
Animation ret = new TranslateAnimation( fromXDelta ,
toXDelta , fromYDelta , toYDelta );
ret.setDuration( 1000 );

return ret;
}

/**
 * build view in place of layout.xml
 */
private View buildView() {
ScrollView ret = new ScrollView( this );
ret.setLayoutParams( new
LinearLayout.LayoutParams( LinearLayout.LayoutParams.FILL_PARENT ,
LinearLayout.LayoutParams.WRAP_CONTENT ) );

LinearLayout parent = new LinearLayout( this );
parent.setLayoutParams( new
LinearLayout.LayoutParams( LinearLayout.LayoutParams.FILL_PARENT ,
LinearLayout.LayoutParams.WRAP_CONTENT ) );
parent.setOrientation( LinearLayout.VERTICAL );
ret.addView( parent );

_viewSwitcher = new ViewSwitcher( this );
_viewSwitcher.setLayoutParams( new
LinearLayout.LayoutParams( LinearLayout.LayoutParams.FILL_PARENT ,
100 ) );
parent.addView( _viewSwitcher );

View spacer = new View( this );
spacer.setLayoutParams( new
LinearLayout.LayoutParams( LinearLayout.LayoutParams.FILL_PARENT ,
getWindow()
.getWindowManager().getDefaultDisplay().getHeight() ) );
parent.addView( spacer );

_button = new Button( this );
_button.setText( button );
parent.addView( _button );

return ret;
}

@Override
public void onCreate( Bundle savedInstanceState ) {
super.onCreate( savedInstanceState );
setContentView( buildView() );

_viewSwitcher.setFactory( new ViewSwitcher.ViewFactory() {
@Override
public View makeView() {
TextView view = new
TextView( AnimationValidationActivity.this );
view.setLayoutParams( new
ViewSwitcher.LayoutParams( ViewSwitcher.LayoutParams.FILL_PARENT ,
ViewSwitcher.LayoutParams.FILL_PARENT ) );
view.setBackgroundColor( 0x );

view.setText( foobar );

return view;
}
} );

_button.setOnClickListener( new View.OnClickListener() {
@Override
public void onClick( View v ) {
 
_viewSwitcher.setInAnimation( buildTranslateAnimation( _viewSwitcher.getWidth() 
,
0 , 0 , 0 ) );
 
_viewSwitcher.setOutAnimation( buildTranslateAnimation( 0 , -
_viewSwitcher.getWidth() , 0 , 0 ) );

int color = new Random().nextInt();
 
_viewSwitcher.getNextView().setBackgroundColor( 0xff00 | color 
0xff );
_viewSwitcher.showNext();
}
} );
}
}

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation not start immediately when the target view is out of window

2010-06-15 Thread Romain Guy
When you set the animation on your View, set the start time of the
Animation to AnimationUtils.currentAnimationTimeMillis(). Otherwise,
the start time will be the first time your View is drawn, which is the
first time your View appears on screen.

On Thu, Jun 10, 2010 at 6:55 AM, funnything
coding.while.sl...@gmail.com wrote:
 Hi.
 When I apply some animation to the view, which is out of window, the
 animation not start immediately.
 And then, I scroll the screen to show the animation target view, the
 animation will start.
 I hope to the animation will start immediately when it apply. Any
 ideas?
 Bellow is sample code. Thank you.

 public class AnimationValidationActivity extends Activity {
    private ViewSwitcher _viewSwitcher;
    private Button _button;

    /**
     * utility method for animation
     */
    private Animation buildTranslateAnimation( float fromXDelta ,
 float toXDelta , float fromYDelta , float toYDelta ) {
        Animation ret = new TranslateAnimation( fromXDelta ,
 toXDelta , fromYDelta , toYDelta );
        ret.setDuration( 1000 );

        return ret;
    }

    /**
     * build view in place of layout.xml
     */
    private View buildView() {
        ScrollView ret = new ScrollView( this );
        ret.setLayoutParams( new
 LinearLayout.LayoutParams( LinearLayout.LayoutParams.FILL_PARENT ,
                LinearLayout.LayoutParams.WRAP_CONTENT ) );

        LinearLayout parent = new LinearLayout( this );
        parent.setLayoutParams( new
 LinearLayout.LayoutParams( LinearLayout.LayoutParams.FILL_PARENT ,
                LinearLayout.LayoutParams.WRAP_CONTENT ) );
        parent.setOrientation( LinearLayout.VERTICAL );
        ret.addView( parent );

        _viewSwitcher = new ViewSwitcher( this );
        _viewSwitcher.setLayoutParams( new
 LinearLayout.LayoutParams( LinearLayout.LayoutParams.FILL_PARENT ,
 100 ) );
        parent.addView( _viewSwitcher );

        View spacer = new View( this );
        spacer.setLayoutParams( new
 LinearLayout.LayoutParams( LinearLayout.LayoutParams.FILL_PARENT ,
 getWindow()
                .getWindowManager().getDefaultDisplay().getHeight() ) );
        parent.addView( spacer );

        _button = new Button( this );
        _button.setText( button );
        parent.addView( _button );

        return ret;
    }

   �...@override
    public void onCreate( Bundle savedInstanceState ) {
        super.onCreate( savedInstanceState );
        setContentView( buildView() );

        _viewSwitcher.setFactory( new ViewSwitcher.ViewFactory() {
           �...@override
            public View makeView() {
                TextView view = new
 TextView( AnimationValidationActivity.this );
                view.setLayoutParams( new
 ViewSwitcher.LayoutParams( ViewSwitcher.LayoutParams.FILL_PARENT ,
                        ViewSwitcher.LayoutParams.FILL_PARENT ) );
                view.setBackgroundColor( 0x );

                view.setText( foobar );

                return view;
            }
        } );

        _button.setOnClickListener( new View.OnClickListener() {
           �...@override
            public void onClick( View v ) {

 _viewSwitcher.setInAnimation( buildTranslateAnimation( 
 _viewSwitcher.getWidth() ,
 0 , 0 , 0 ) );

 _viewSwitcher.setOutAnimation( buildTranslateAnimation( 0 , -
 _viewSwitcher.getWidth() , 0 , 0 ) );

                int color = new Random().nextInt();

 _viewSwitcher.getNextView().setBackgroundColor( 0xff00 | color 
 0xff );
                _viewSwitcher.showNext();
            }
        } );
    }
 }

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation on element in a custom view

2010-06-01 Thread swgillan
Hello,

I have been trying to take one of the elements that I am drawing in a
custom View class and apply an animation on it.

The custom view itself is essentially a background image that I draw
and some overlay images that I am also drawing in the onDraw method
using canvas.drawBitmap(). It is larger then the screen but I can
scroll around and see it. The overlays are sitting on specific
locations of the background image.

Essentially, I am trying to animate one of the overlay bitmaps (just a
simple fade in / fade out with AlphaAnimation). But am having a hard
time only animating that particular element.

The problem I am having is that the animation is being applied to the
entire view, and I just want this one element to be animated. I have
tried using a seperate view for just that overlay, but that creates
other problems, namely when I do this, only the new view will move
with the screen. If there is a away to combine this view with the main
custom view, perhaps that would also help (such that they both move
around).

I am fairly new with Android, so any assistance would be much
appreciated.

Regards,

Steven Gillan

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation in List, When contents are more

2010-05-14 Thread Nithin
Hi,

Like in list, if contents are more, it will display the contents by
animation, slowly will come and when the content is complete. It will
stop for a moment and start again. Can anybody tell how to implement
that.

I tried with translate animation. But I can't stop for the moment
after showing full text. Then I tried with translate animation , so
when text is moving, its jerking slowly, not as smooth as in the case
of list. I am using 1.6

Nithin

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation using several drawables

2010-05-14 Thread Michael
Hi,

I am a little stuck with exactly what approach to take with an
animation problem.

I have several bitmap resource drawables, a face with no eyes or
mouth, a mouth and eyes. I want to be able to build these drawables up
to make the face and then use tween animations on them to animated the
face. The size of the eyes and mouth drawables are only big enough to
contain the content and so need offsetting when overlayed on the
face.

I initially thought i could use a LayerListDrawable in an ImageView to
overlay the drawables with appropriate offsets and then animate each
drawable, but in this case all the the drawables are scaled up to the
size of the largest drawable.

I was also wondering if I could use a FrameLayout with several
ImageViews and somehow offset them to build the initial image and then
animate each ImageView, but I am not sure how I would do this.

I could use a custom View or a SurfaceView and do the animation
myself, but I would like to stick to using the stock components if at
all possible just to keep it simple.

Anyone got any ideas or done something similar?

Cheers,
Mike

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation for Bitmap

2010-04-13 Thread Sebastian
Hi list

i'm developing a small game and for that purpose i extended
SurfaceView and override the onDraw() method to draw Bitmap objects on
the x/y coordinates i like:

public void onDraw(Canvas canvas) {

fCanvas = canvas;

fCanvas.drawColor(Color.rgb(0, 0, 255));

if (!pausing) {
GameObject[][] gameObjs = level.getLevel();

for (int x = 0; x  gameObjs.length; x++) {
for (int y = 0; y  gameObjs.length; y++) {
if (gameObjs[x][y] != null) {
gameObjs[x][y].drawObject();
}
}
}
}

here the drawObject() method

getCanvas().drawBitmap(getBitmapCache().get(bitmapRef), x, y, null);

this works great, but now i like to rotate or fade out the bitmap im
drawing. for this purpose i create an animation but the problem is,
there is no method Bitmap.startAnimation() or something like that. how
can i do this nevertheless? any hints??

thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using remove me as the subject.


[android-developers] Animation and ListView

2010-04-13 Thread Sebastian Müller
Hi

Im using a listview to display some self defined objects. this works great.
then i wrote an animation to smoothly slide down the list:

 *Code:*
public static void downFromTopAnimation(ViewGroup panel, Context ctx) {

  AnimationSet set = new AnimationSet(true);

  Animation animation = new AlphaAnimation(0.0f, 1.0f);
  animation.setDuration(100);
  set.addAnimation(animation);

  animation = new TranslateAnimation(
  Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f,
  Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF, 0.0f
  );
  animation.setDuration(500);
  set.addAnimation(animation);

  LayoutAnimationController controller =
  new LayoutAnimationController(set, 0.25f);
  panel.setLayoutAnimation(controller);

}


i call this with downFromTopAnimation(listview, context); This works really
great, but if a expand the list with more objects, the whole list is slide
down with the animation but i'd like to change it so that only the new items
slide down smoothly.

has anybody any hint how to do this??

thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using remove me as the subject.


[android-developers] Animation Jerking when background operation running

2010-03-30 Thread Nithin
Hi,

In the background(seperate thread) when extensive operations are
going, like create database and parsing, in the UI thread I am
displaying an animation. But its not smooth, the view is jerking. How
can I remove the jerking and make the animation smooth.

Nithin

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Animation from AppWidget to Activity

2010-03-22 Thread Aditya D
Is it possible to have an animation between the AppWidget and the
activity which is called with pending intent from AppWidget?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Animation fillAfter(true) and click locations

2010-02-28 Thread Loki117
Evening all,

I had a quick questions around animations and what is going on. So I
have buttons in a vertical row down the side of the screen. Upon
clicking the last button the row animates and slides out at the top of
the screen. This works HOWEVER when the user clicks the same button
again (the only button still visible) nothing happens. It seems that
if I click where the button used to be the view reanimates. Does
anyone know why this happens or how I can fix it?

Tom

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Animation fillAfter(true) and click locations

2010-02-28 Thread Mark Murphy
Loki117 wrote:
 I had a quick questions around animations and what is going on. So I
 have buttons in a vertical row down the side of the screen. Upon
 clicking the last button the row animates and slides out at the top of
 the screen. This works HOWEVER when the user clicks the same button
 again (the only button still visible) nothing happens. It seems that
 if I click where the button used to be the view reanimates. Does
 anyone know why this happens or how I can fix it?

I'm sure there's a purpose for fillAfter(true), but I have not found it.

If you want the effects of the animation to be permanent, you need to
add a listener to the animation, find out when the animation ends, and
then take steps to make the changes that the animation simulates.

So, for example, if you are sliding a button off of the screen, when the
animation ends, you could make the visibility of that button be GONE, or
remove it from its parent container, or something.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Consulting/App Development: http://commonsware.com/consulting

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] animation fillAfter question

2010-01-26 Thread Susan
Animation fill* attributes confuse me. The document is simple. For
example:

layout xml:

TextView android:id=@+id/TextView01
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:layout_x=0px
  android:layout_y=0px
  android:text=TEXT
/TextView

anim xml:

?xml version=1.0 encoding=utf-8?
set xmlns:android=http://schemas.android.com/apk/res/android;
translate
android:startOffset=0
android:fromXDelta=50
android:toXDelta=100
android:fromYDelta=0
android:toYDelta=0
android:duration=3000
android:fillEnabled=true
android:fillAfter=true
/

translate
android:startOffset=4000
android:fromXDelta=0
android:toXDelta=0
android:fromYDelta=50
android:toYDelta=200
android:duration=3000
android:fillEnabled=true
android:fillAfter=true
/
/set

I think text will freeze after animation end. But it returned to (0,0)
again. Why? Is the second translate's fillAfter=true invalid?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation using Matrix + Camera looks dirty...

2009-12-21 Thread Nivek
Hello,

I have been reusing Rotate3dAnimation.java from the ApiDemo in my own
application to apply a transition between imageviews in a viewflipper.

My problem is that while the animation runs, some frames leave a few
1px vertical lines on the screen black background... (It happens on
both the Emulator 2.0.1 and my htc magic 1.6).

Any idea on how to solve this ?

Thanks !

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Animation of View size

2009-12-15 Thread hoha
Hi all.

I've noticed that animation framework is based on matrix
transformations (with additions for alpha). Did I get it right that
it's impossible to animate an arbitrary property (e.g size) of my view
with android.animation.* tools? If so, can you please give me some
hints how size animations can be implemented?

My task is to resize some custom view smoothly (redrawing/laying out
it on every 'frame').

Thanks!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] animation between two activities

2009-12-02 Thread tstanly
hi all,

I design a rotate animation when activity 1 ends, and then start
activity 2.
so my code is:
===when activity 1 ends function===

rotate_animation();  //first call up the animation

Intent i=new Intent();
i.setClass(activity1.this,activity2.class);
startActivity(i);

===
but this code will not saw the animation totally,
that's means, the animation will pop up a second then soon activity2
start!
but I need the animation play over, then the activity 2 start.


so how I do for that requestion?
I almost use the threadhandler to do, but it wasn't work.

thanks!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] animation between two activities

2009-12-02 Thread Dianne Hackborn
My suggestion would be -- generally don't do this.  Animations during
activity transitions are done by the window manager, on their windows.
 Prior to 2.0, these were turned off by default (though could be turned on
by the user), and as of 2.0 they are turned on by default.

Trying to create your own animation in your own view, is (a) inconsistent
with the standard Android UI, (b) not following the user's preference, and
(c) going to interact extremely poorly with the normal activity animations
when they are shown.

There can of course be exceptions to this, for example perhaps the next
activity is translucent in which case there is no animation on it normally
and an animation within the previous activity's UI would not conflict with
it.  But that kind of thing is going to be very, very rare.

Also as of 2.0 there are some new APIs to customize the actual activity
animation for a particular transition...  though again, I would highly
recommend not doing this except under extremely special circumstances, since
it makes your application inconsistent with whatever standard animations the
user sees.

And one other thought on animations: the animations that are shown during UI
transitions have a very strong impact on the user's perception on how they
are moving through the UI and where they are.  Replacing the standard ones
with gratuitous custom ones has a very high chance of harming the user
experience, because it tells the user something really importantly
different happened here; if what happened was actually a normal navigation
(such as between two activities), then this can end up being very misleading
and confusing.

On Wed, Dec 2, 2009 at 12:19 AM, tstanly tsai.sta...@gmail.com wrote:

 hi all,

 I design a rotate animation when activity 1 ends, and then start
 activity 2.
 so my code is:
 ===when activity 1 ends function===

 rotate_animation();  //first call up the animation

 Intent i=new Intent();
 i.setClass(activity1.this,activity2.class);
 startActivity(i);

 ===
 but this code will not saw the animation totally,
 that's means, the animation will pop up a second then soon activity2
 start!
 but I need the animation play over, then the activity 2 start.


 so how I do for that requestion?
 I almost use the threadhandler to do, but it wasn't work.

 thanks!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Animation is slow?

2009-10-22 Thread Mark Wyszomierski

Hi,

I'm trying to perform a simple animation, but it seems quite choppy.
This is it:

  Animation anim = new TranslateAnimation(0,0,-50,0);
  anim.setDuration(500);
  anim.setInterpolator(new LinearInterpolator());
  myLinearLayout.setAnimation(anim);

the animation does what it's supposed to do, just very choppy - is
there any reason why it's so slow? The linear layout I'm applying it
to is pretty simple, just has a few children,

Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Animation between 2 activities?

2009-10-16 Thread Marc Reichelt

Hi there!

I program on an application where different views are arranged
horizontally, each view of screen size. The user should be able to
switch between these views using his finger. I first used the
ViewFlipper, which was great for simple layouts, but which is *way*
too slow if the layouts of the views are more complex, because all
Views are drawn.

A much better method would be to place one layout per activity and
switch between these activities using the slide in / slide out
animations.
Is something in this direction possible with Android right now? Any
recommendations or best practices?


Regards  great thanks in advance

Marc Reichelt   ||   http://www.marcreichelt.de/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Animation not working as I want

2009-10-11 Thread fhucho

Hi,
I have a LinearLayout, with a text and a button, which I want to show
and hide (using translate animation) sometimes. As for now I show/hide
it by setVisibility() to View.GONE or View.VISIBLE. To set the
translate animation I do this:

myLinearLayout.setLayoutAnimation(new LayoutAnimationController
(myTranslateAnimation));

But when I call myLinearLayout.setVisibility(View.VISIBLE),
myLinearLayout shows imediately but without the text and the button.
The text then slides to the linearlayout and then the button does the
same. When I call setVisibility next time there is no animation at all.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] animation-less android menus

2009-10-06 Thread Gilles TALIS

I am planning to use android on a device with slow refresh rate
display.
I was wondering whether it was possible to bring up the apps menu
without sliding the apps menu pull-tab, just with a long-press menu
button for instance.

Ideally, this long press action would directly show the apps menu
without the sliding animation.

Is this possible?

Gilles

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Animation Maker and Viewer ?

2009-09-30 Thread ginnie

Hey..

I needed some insight on this issue :
( sorry if it sounds trivial :)  )

Is there a way to make and/or run an animation on android ?
(animations as in flash / powerpoint / applet or any thing else.. )

does webview support downloading and viewing any animation?

i intend to use some kind of an animation maker and viewer tool
running on android (some code that allows user to create animations
they may share with other android users who may view this animation)

for an application I wish to code..

Is there any thing like this out there ?

Thanks ..

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Animation

2009-09-21 Thread HVT

Hello All,

I'm facing a problem while clicking the objects while they animate.
Please help me identify the click on the objects while they are
animating.

My requirement is to randomly move a ball around the screen and the
user should be able to click this ball any time.

Also this ball changes colours. For this is i have 3 different images
of different colours and I want to create a frame by frame animation
between them while they are animating.

This makes it 2 animations at a time. a frame-by-frame animated image/
object has to animated may be a /translate animation and this should
be click able.

Please help me fix this. I have stuck on this part for almost over a
month now.

Thanks,
HVT

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Animation of a View

2009-09-09 Thread Eddified

I understand that animating a View using startAnimation() with a
TranslateAnimation object really just applies a transform on the
canvas that is being drawn on. In my case, the problems with this are:
a) sometimes I need to call bringChildToFront() (for a different View)
on the ViewGroup during the animation, which messes up the animation
because it triggers a requestLayout on all children, which in turn re-
lays out the child being animated... which messes up the continuity of
the animation. Perhaps causing a layout on the child being animated
isn't supposed to mess up animations, but it seems to be in my case.
b) after the animation (using an AnimationListener), I need to re-
layout the child to the new location, which is fine in concept, but
again messes up the animation because for some reason the actual
drawing of the last frame of the animation hasn't finished by the time
onAnimationEnd() is called. This causes the animation to go awry at
the very end. What's happening in my case is if I layout the animated
view to its new location in onAnimationEnd, the last step of the
animation is being applied to the new layout, so the view looks like
it is jumping around the screen. I tried a handler with no delay, and
that didn't work either. Using a handler with a delayed message to
accomplish the new layout works but is such a hack that I worry it may
not work correctly on another piece of hardware.

I could accomplish the animation by taking out the TranslateAnimation
and instead do a manual animation, and in the manual one, change the
layout of the view gradually (instead of transforming the matrix of
the canvas) but that's a lot of work and error-prone.

Any ideas? Are there tools I can use (besides manual application of
Handler.sendMessageDelayed()) to accomplish an animation that actually
re-lays out the view on each iteration instead of altering the canvas
matrix?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Animation on widgets

2009-08-27 Thread Daniel

In my app I have a EditText widget. Since I need that EditText at
different positions within the activity I perform some animations to
move it around. I don't want to set the position without an animation.
The animation also has the fillAfter attribute set to true so the
EditText widget stays at the new position after the animation is done.
Up to this point everything works perfectly. But now if I scroll
through my app the selection of the EditText is always drawn at the
original position of the EditText. Is there any possibility to move
around the EditText with an animation and have it behave correctly
also when it is selected (has the orange border)?

Thanks,
Daniel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Animation Problem

2009-08-11 Thread HVT

Hello All,

I'm new to Android and trying to develop an app that has loads of
animation.
Its a small game.

Currently i have a object (image) moving around the canvas. I used
animation to animate it around the screen.

But the problem here is i dont have the XY coordinates of that object
while its animating.
I want to get the coordinates of the bitmap whenever i want during the
animation.

I think if there was some way where i can read the presentation layer
probably i could get the cordinates of the object.

Please help me guys i'm stuck here now for like a week.


My another problem is with rotate animation, i some how dont seem to
understand its functionality.
I have played with it for a couple of days but no luck, i'm still new
to it and dont get anything.

The object makes big arcs even if the  x,y values are  0,0 and the
object jumps around when i try to give it random values.

Any help would be highly appreciated.


Thanks in advance.


HVT

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



  1   2   >