为什么写个这东西呢,纯粹是闲的没事,写着玩玩
1.效果图:
2.主界面:
MainActivity
package com.example.administrator.testz;
import android.app.Activity;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
public class MainActivity extends Activity implements View.OnClickListener {
private Button btn;
private PercentProgressDialog dgSetting;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
btn = (Button) findViewById(R.id.button);
btn.setOnClickListener(this);
dgSetting = new PercentProgressDialog(this);
}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
case R.id.button:
dgSetting.show();
break;
}
}
}
3.自定义dialog
PercentProgressDialog
package com.example.administrator.testz;
import