• 大小: 1.28MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-01-11
  • 语言: Java
  • 标签: ProgressBar  android  

资源简介

Android 自定义ProgressBar显示百分比,博客地址:http://blog.csdn.net/zhoumushui

资源截图

代码片段和文件信息

package com.demo.progressbarwithpercent;

import java.util.Timer;
import java.util.TimerTask;

import com.demo.progressbarwithpercent.view.OnProgressBarListener;
import com.demo.progressbarwithpercent.view.ProgressBarWithPercent;

import android.app.Activity;
import android.os.Bundle;

public class MainActivity extends Activity implements OnProgressBarListener {

private Timer timer;
private ProgressBarWithPercent progressBarWithPercent;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

progressBarWithPercent = (ProgressBarWithPercent) findViewById(R.id.progressBarWithPercent);
progressBarWithPercent.setOnProgressBarListener(this);
timer = new Timer();
timer.schedule(new TimerTask() {

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         475  2017-02-24 09:48  .classpath
     文件         862  2017-02-24 09:48  .project
     目录           0  2017-02-24 09:48  .settings\
     文件         177  2017-02-24 09:48  .settings\org.eclipse.jdt.core.prefs
     文件         874  2017-02-24 09:48  AndroidManifest.xml
     目录           0  2017-02-24 09:48  assets\
     文件       51394  2017-02-24 09:48  ic_launcher-web.png
     目录           0  2017-02-24 09:48  libs\
     文件     1422188  2017-02-24 09:48  libs\android-support-v4.jar
     文件         781  2017-02-24 09:48  proguard-project.txt
     文件         563  2017-02-24 09:48  project.properties
     目录           0  2017-02-24 09:48  res\
     目录           0  2017-02-24 09:48  res\drawable-hdpi\
     文件        7658  2017-02-24 09:48  res\drawable-hdpi\ic_launcher.png
     目录           0  2017-02-24 09:48  res\drawable-ldpi\
     目录           0  2017-02-24 09:48  res\drawable-mdpi\
     文件        3777  2017-02-24 09:48  res\drawable-mdpi\ic_launcher.png
     目录           0  2017-02-24 09:48  res\drawable-xhdpi\
     文件       12516  2017-02-24 09:48  res\drawable-xhdpi\ic_launcher.png
     目录           0  2017-02-24 09:48  res\drawable-xxhdpi\
     文件       24777  2017-02-24 09:48  res\drawable-xxhdpi\ic_launcher.png
     目录           0  2017-02-24 09:48  res\layout\
     文件         719  2017-02-24 10:24  res\layout\activity_main.xml
     目录           0  2017-02-24 09:55  res\values\
     目录           0  2017-02-24 09:48  res\values-v11\
     文件         334  2017-02-24 09:48  res\values-v11\styles.xml
     目录           0  2017-02-24 09:48  res\values-v14\
     文件         391  2017-02-24 09:48  res\values-v14\styles.xml
     文件        1003  2017-02-24 10:21  res\values\attrs.xml
     文件         189  2017-02-24 09:48  res\values\strings.xml
     文件        5384  2017-02-24 10:21  res\values\styles.xml
............此处省略8个文件信息

评论

共有 条评论