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

Multiple attribute passing in querySelectorAll

Multiple attribute passing in querySelectorAll     Here I am demonstrating code to how to pass multiple attributes in querySelectorAll. <...

Ads Inside Post

Powered by Blogger.

Arsip