[android-developers] Re: How can I minimize the stuttering of the graphics?

2010-01-03 Thread Martin
This tutorial describes the best way!! ;-)
http://www.droidnova.com/playing-with-graphics-in-android-part-i,147.html

Greetings, Martin


On 1 Jan., 19:18, Martin google-gro...@digle.de wrote:
 Thank you, I will try it :-)
 Martin

 On 31 Dez. 2009, 16:16, skink psk...@gmail.com wrote:



  On Dec 31, 3:13 pm, Martin google-gro...@digle.de wrote:

   Hi!

   How can I minimize the stuttering of my graphics?
   I am using MANY ImageView's in my program (and JUST ImageView's). I
   change their positions directly, when I need to change them without
   using onDraw to redraw everything. Is it ok, If I do not overwrite
   onDraw?

   I have in average 10 objects which I added to the mainscreen-layout.
   These 10 objects are 5 trees and 5 flowers.
   The trees and flowers have 5 different states and therefore 5
   different ImageViews which I all added to the layout, whose just are
   invisible.
   So I have about 50 ImageViews added to my main screen
   When one of these objects changes its state, I just make its ImageView
   invisible and the ImageView of the new state visible.

   Is it ok to do it like that?
   I realized that if I just use one ImageView for every object and
   change the ressource of it when its state changes, all objects, which
   are currently added to the mainscreen-layout, change their position to
   (0;0). That was the reason, I have so many ImageView's added to the
   mainscreen-layout.
   Is there a better solution for that?

   Greetings,
   Martin

  hi,

  i'd use 10 ordinary Views, each one with own LevelListDrawable

  pskink

-- 
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] Re: How can I minimize the stuttering of the graphics?

2010-01-01 Thread Martin
Thank you, I will try it :-)
Martin


On 31 Dez. 2009, 16:16, skink psk...@gmail.com wrote:
 On Dec 31, 3:13 pm, Martin google-gro...@digle.de wrote:





  Hi!

  How can I minimize the stuttering of my graphics?
  I am using MANY ImageView's in my program (and JUST ImageView's). I
  change their positions directly, when I need to change them without
  using onDraw to redraw everything. Is it ok, If I do not overwrite
  onDraw?

  I have in average 10 objects which I added to the mainscreen-layout.
  These 10 objects are 5 trees and 5 flowers.
  The trees and flowers have 5 different states and therefore 5
  different ImageViews which I all added to the layout, whose just are
  invisible.
  So I have about 50 ImageViews added to my main screen
  When one of these objects changes its state, I just make its ImageView
  invisible and the ImageView of the new state visible.

  Is it ok to do it like that?
  I realized that if I just use one ImageView for every object and
  change the ressource of it when its state changes, all objects, which
  are currently added to the mainscreen-layout, change their position to
  (0;0). That was the reason, I have so many ImageView's added to the
  mainscreen-layout.
  Is there a better solution for that?

  Greetings,
  Martin

 hi,

 i'd use 10 ordinary Views, each one with own LevelListDrawable

 pskink

-- 
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] Re: How can I minimize the stuttering of the graphics?

2009-12-31 Thread skink


On Dec 31, 3:13 pm, Martin google-gro...@digle.de wrote:
 Hi!

 How can I minimize the stuttering of my graphics?
 I am using MANY ImageView's in my program (and JUST ImageView's). I
 change their positions directly, when I need to change them without
 using onDraw to redraw everything. Is it ok, If I do not overwrite
 onDraw?

 I have in average 10 objects which I added to the mainscreen-layout.
 These 10 objects are 5 trees and 5 flowers.
 The trees and flowers have 5 different states and therefore 5
 different ImageViews which I all added to the layout, whose just are
 invisible.
 So I have about 50 ImageViews added to my main screen
 When one of these objects changes its state, I just make its ImageView
 invisible and the ImageView of the new state visible.

 Is it ok to do it like that?
 I realized that if I just use one ImageView for every object and
 change the ressource of it when its state changes, all objects, which
 are currently added to the mainscreen-layout, change their position to
 (0;0). That was the reason, I have so many ImageView's added to the
 mainscreen-layout.
 Is there a better solution for that?

 Greetings,
 Martin

hi,

i'd use 10 ordinary Views, each one with own LevelListDrawable

pskink

-- 
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