786
社区成员
发帖
与我相关
我的任务
分享
package com.example.roundprogressbar;
package com.example.roundprogressbar;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import com.example.circlepregress.R;
public class MainActivity extends Activity {
private RoundProgressBar mRoundProgressBar1, mRoundProgressBar1_,
mRoundProgressBar2, mRoundProgressBar3, mRoundProgressBar4,
mRoundProgressBar5;
private int progress = 0, testInt = 19;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_cricle_progress);
mRoundProgressBar1 = (RoundProgressBar) findViewById(R.id.roundProgressBar1);
mRoundProgressBar2 = (RoundProgressBar) findViewById(R.id.roundProgressBar2);
mRoundProgressBar3 = (RoundProgressBar) findViewById(R.id.roundProgressBar3);
mRoundProgressBar4 = (RoundProgressBar) findViewById(R.id.roundProgressBar4);
mRoundProgressBar5 = (RoundProgressBar) findViewById(R.id.roundProgressBar5);
testInt = 20;
Log.w("test12", String.valueOf(testInt));
((Button) findViewById(R.id.button1))
.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
testInt = 21;
new Thread(new Runnable() {
@Override
public void run() {
new Thread(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
new Thread(new Runnable() {
@Override
public void run() {
while (progress <= 100) {
progress += 3;
// System.out.println(progress);
Log.w("test1", String
.valueOf(testInt));
mRoundProgressBar1
.setProgress(progress);
mRoundProgressBar2
.setProgress(progress);
mRoundProgressBar3
.setProgress(progress);
mRoundProgressBar4
.setProgress(progress);
mRoundProgressBar5
.setProgress(progress);
try {
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}).start();
}
}).start();
}
}).start();
}
});
}
}
package cn.sunzn.tevent;
class demo1 {
String name = "a";
int age = 33;
public String getName(){
return this.name;
}
}
public class demo {
public int mInt;
public static void main(String args[]) {
mInt=22;
new Thread(new Runnable() {
public void run() {
System.out.print(mInt);
}
}).run();
}
}