For smart Primates & ROBOTS (oh and ALIENS ).

Blogroll

Friday, August 30, 2013

Rotate any text in android


Rotate any text in android

////// Rotate any text ///////////////////////////
static int flag=0;
private Handler mHandler;
final Context context=this;
RelativeLayout.LayoutParams par;
private int mCount = 0;
protected void onCreate() {
mHandler = new Handler();
mHandler.post(mCountUpdater);


}
private Runnable mCountUpdater = new Runnable() {
// private int mCount = 0;
@Override
public void run() {
rotate();
flag++;
mCount++;
if(mCount>=360) {
mCount=0;
}
mHandler.postDelayed(this, 1);
}
};
public void rotate() {
txtMessage.setRotation(


mCount);

}
Share:

0 comments:

Post a Comment

How to make center align child div

 How to make center align child div?   Suppose you have 2 Div tag. And want the make inner tag center <div id="d1">      ...

Ads Inside Post

Powered by Blogger.

Arsip