Re: [android-developers] Re: text animation

2009-11-04 Thread Anh Khoa Nguyen Pham
Hi pskink,
Can your way make text displayed in rotate mode?

On Wed, Nov 4, 2009 at 2:39 PM, skink psk...@gmail.com wrote:

 On Tue, Nov 3, 2009 at 2:49 PM, npak...@gmail.com npak...@gmail.com
   wrote:
 Hi all,
 
 Now i want to write an application to make a certain text to run
 slowly from right side screen to left side screen and rotate to
 repeat.
 How can i do that? Please help me !

 hi,

 just extend View and do custom drawing using Handler that runs forever
 incrementing some xOffset that you will use in your onDraw method.

 pskink
 Thanks all,
 
 NPAK

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


-- 
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] Re: text animation

2009-11-03 Thread Saurav
i am very sorry for the late reply.

here is a sample, (if u guys have not already figured it out). hope it
helps:


public class MyTextAnimation extends Activity {

Animation mAnimation;
TextView mTextView;
LinearLayout mLayout;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mLayout = new LinearLayout(this);
mLayout.setGravity(Gravity.CENTER);
mTextView = new TextView(this);
mTextView.setText(Saurav Mukherjee);
mTextView.setGravity(Gravity.CENTER);
mAnimation = new TranslateAnimation(100f, -100f, 0.0f, 0.0f);
mAnimation.setDuration(2000);
mTextView.setAnimation(mAnimation);
mLayout.addView(mTextView);
setContentView(mLayout);
}

}




Regards,
Saurav Mukherjee.



On Tue, Nov 3, 2009 at 8:36 PM, Gulfam gulfa...@gmail.com wrote:

 I want to make same component as mentioned by
 npak243 any one can help us regarding this. I am trying to use
 Animation Class but i dont know how to use it.

 I have also used marquee with text view its work fine but on getting
 focus but i need to scroll text with in text view if it is ocused or
 not means in both conditions.

 Gulfam Hassan

 On Nov 3, 6:45 pm, sham shamcs shamc...@gmail.com wrote:
  use animation class in Android.
 
  On Tue, Nov 3, 2009 at 2:49 PM, npak...@gmail.com npak...@gmail.com
 wrote:
   Hi all,
 
   Now i want to write an application to make a certain text to run
   slowly from right side screen to left side screen and rotate to
   repeat.
   How can i do that? Please help me !
   Thanks all,
 
   NPAK
 
   --
   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
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@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.comandroid-developers%2bunsubscr...@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] Re: text animation

2009-11-03 Thread Anh Khoa Nguyen Pham
Hi Saurav Mukherjee,

Thank a lot for your replying,
In your example, you move TextView object from center to left side of
screen. It means that when TextView has relative long content , it will look
not cool.
Do you know marquee property of TextView when we focus on this, don't you? I
want my text displayed symbol by symbol from right side screen to left side
screen ,and after the some symbols disappear in left side screen, they will
appear again at right side screen.
For example:
At begin time, screen display:
  S
After some miliseconds
Sa
.
  Saur
.
Saura
.
   Saurav
.
  Saurav 
.
Saurav M
  . . . . . . . .
  . . . . . . . .
  . . . . . . . .
  . . . . . . . .
.   Saurav
Mukherjee   
.   aurav
Mukherjee 
.   urav
Mukherjee   
.   rav
Mukherjee 
.   av
MukherjeeS
.   v
MukherjeeSa
.   
MukherjeeSau


Hope you understand clearly my problem and help me to solve that.
Can it be solved by animation?

Anyway, thank you again!
NPAK


On Wed, Nov 4, 2009 at 12:47 PM, Saurav to.saurav.mukher...@gmail.comwrote:

 i am very sorry for the late reply.

 here is a sample, (if u guys have not already figured it out). hope it
 helps:


 public class MyTextAnimation extends Activity {

 Animation mAnimation;
 TextView mTextView;
 LinearLayout mLayout;

 @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 mLayout = new LinearLayout(this);
 mLayout.setGravity(Gravity.CENTER);
 mTextView = new TextView(this);
 mTextView.setText(Saurav Mukherjee);
 mTextView.setGravity(Gravity.CENTER);
 mAnimation = new TranslateAnimation(100f, -100f, 0.0f, 0.0f);
 mAnimation.setDuration(2000);
 mTextView.setAnimation(mAnimation);
 mLayout.addView(mTextView);
 setContentView(mLayout);
 }

 }




 Regards,
 Saurav Mukherjee.




 On Tue, Nov 3, 2009 at 8:36 PM, Gulfam gulfa...@gmail.com wrote:

 I want to make same component as mentioned by
 npak243 any one can help us regarding this. I am trying to use
 Animation Class but i dont know how to use it.

 I have also used marquee with text view its work fine but on getting
 focus but i need to scroll text with in text view if it is ocused or
 not means in both conditions.

 Gulfam Hassan

 On Nov 3, 6:45 pm, sham shamcs shamc...@gmail.com wrote:
  use animation class in Android.
 
  On Tue, Nov 3, 2009 at 2:49 PM, npak...@gmail.com npak...@gmail.com
 wrote:
   Hi all,
 
   Now i want to write an application to make a certain text to run
   slowly from right side screen to left side screen and rotate to
   repeat.
   How can i do that? Please help me !
   Thanks all,
 
   NPAK
 
   --
   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
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@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.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at