登录
首页 » Java » 实现进度条效果

实现进度条效果

于 2014-05-16 发布
0 172
下载积分: 1 下载次数: 0

代码说明:

实现进度条效果

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • android 从相册选择一张或者多张图片例子源码下载
    android 从相册选择一张或者多张图片例子源码下载
    2015-05-08下载
    积分:1
  • android 异步 执行 任务 例子 附讲解
    Rules::The AsyncTask instance must be created in UI thread. .execute must be invoked on the UI thread.Never call  objMyTask.onPreExecute(), objMyTask.doInBackground(), objMyTask.onProgressUpdate(),  objMyTask.onPostExecute manually.The AsyncTask can be executed only once (an exception will be thrown if a second execution is attempted.)AsyncTask have Four Main Method... onPreExecute()  doInBackground() onProgressUpdate() onPostExecute()  onPreExecute-This method is called first when you start AsyncTask using objAsync.execute().And mostly this method is use for initializing dialog(ProgressDialog,CustomDialog) and showing. doInBackground-The main purpose of AsyncTask is accomplished by this method.Any non-UI thread process is running in this method.Such as Rss Feed Reader,Image and video Uploading and Downloading.You cant handle your View in this method.Because this method is non-UI thread.While any background process is running if you want to handle UI therea are  onProgressUpdate method. after completion of process this method send result to OnPostExecute. onProgressUpdate-While backgrounding task is running ,you can handle your UI using this method .Such as status of downloading or uploading task.and this method is called from  doInBackground.Using publishProgress() you can call onProgressUpdate method to update UI while process is running. onPostExecute -This method is called after the background computation finishes.The result of background process in passed in this method as parameters.And now you can dismiss progress dialog ,to indicate that background task is completed. You can cancel AsyncTask using objAsyncTask.cancel().then you just check in doInBackground, if (isCancelled()) { break; } else {        //continue... } See this Image For more Clear.
    2013-07-05下载
    积分:1
  • android 播放网络MP3 音乐播放
    简单的基本功能,实测可行。 核心代码:package com.sharpandroid.music.activity;import java.io.IOException;import android.app.Activity;import android.os.Bundle;import android.util.Log;import android.view.View;import android.widget.Button;import android.widget.ImageButton;import android.widget.SeekBar;import android.widget.TextView;import com.sharpandroid.music.R;import com.sharpandroid.music.StreamingMediaPlayer;public class MediaPlayer extends Activity { private Button streamButton; private ImageButton playButton; private boolean isPlaying; private TextView playTime; private StreamingMediaPlayer audioStreamer; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); initControls(); } private void initControls() { playTime=(TextView) findViewById(R.id.playTime); streamButton = (Button) findViewById(R.id.button_stream); streamButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { startStreamingAudio(); }}); playButton = (ImageButton) findViewById(R.id.button_play); playButton.setEnabled(false); playButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { if (audioStreamer.getMediaPlayer().isPlaying()) { audioStreamer.getMediaPlayer().pause(); playButton.setImageResource(R.drawable.button_play); } else { audioStreamer.getMediaPlayer().start(); audioStreamer.startPlayProgressUpdater(); playButton.setImageResource(R.drawable.button_pause); } isPlaying = !isPlaying; }}); } private void startStreamingAudio() { try { final SeekBar progressBar = (SeekBar) findViewById(R.id.progress_bar); if ( audioStreamer != null) { audioStreamer.interrupt(); } audioStreamer = new StreamingMediaPlayer(this, playButton, streamButton, progressBar,playTime); audioStreamer.startStreaming("http://192.168.64.1/xa.mp3",5208, 216); streamButton.setEnabled(false); } catch (IOException e) { Log.e(getClass().getName(), "读取音乐出错!", e); } }}
    2014-05-26下载
    积分:1
  • android绝对布局入门实例 附完整源码
    android绝对布局(AbsoutLayout)入门实例,春晓秋冬 四个字依次显示,如下效果图
    2013-03-14下载
    积分:1
  • mob 手机短信验证码例子源码下载
    实现了 手机验证码以及读取手机通讯录功能
    2015-04-25下载
    积分:1
  • android listview实现复选框(checkboxlist) 例子源码下载设计
    android listview实现复选框(checkboxlist) 例子源码下载设计
    2015-05-05下载
    积分:1
  • javaweb电影网站
    http://127.0.0.1:8081/moviesys/manage/login.jsp管理员账号:王长荡密码:kissherhttp://127.0.0.1:8081/moviesys/用户账号:aa密码:aa数据库导入:配好path环境的前提下在密令窗口里执行:imp scott/tiger@xe file=d:DVD.dmp
    2021-05-06下载
    积分:1
  • 安卓flv视频播放器例子源码下载
    安卓视频播放器,选择视频即可播放
    2015-03-26下载
    积分:1
  • android 一个listview 显示不同的布局的item 实例源码下载
    android 一个listview 显示不同的布局的item 实例源码下载
    2015-04-01下载
    积分:1
  • android 简化数据库操作 例子源码
    android 简化数据库操作 例子源码
    2014-11-11下载
    积分:1
  • 696518资源总数
  • 105678会员总数
  • 22今日下载