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

Unable to resolve <website url> Try checking the for validity Google Pagespeed Insights

Unable to resolve <website url> Try checking the for validity Google Pagespeed Insights   You have a website and want to test it'...

Ads Inside Post

Powered by Blogger.

Arsip