登录
首页 » Java » 自定义进度框

自定义进度框

于 2014-01-08 发布
0 251
下载积分: 1 下载次数: 0

代码说明:

自定义进度框

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

发表评论

0 个回复

  • android 拍照或从相册中选择并保存到sd卡
    拍照或从相册中选择并保存到sd卡
    2015-05-07下载
    积分:1
  • Vitamio 视频播放器 的使用
    Vitamio 视频播放器 的使用
    2014-05-26下载
    积分:1
  • gallry输出视频每一帧图片
    实现截取视频中每一帧图片在gallry上显示出来
    2014-06-26下载
    积分: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
  • andriod滚轮选择生日 例子源码下载
    andriod滚轮选择生日 例子源码下载
    2015-04-21下载
    积分:1
  • android 自绘switchButton
    android 自绘switchButton
    2014-01-10下载
    积分:1
  • Android 应用程序自动升级 更新至新版本 例子 有截图 附完整源码
    由于Android项目开源所致,市面上出现了N多安卓软件市场。为了让我们开发的软件有更多的用户使用,我们需要向N多市场发布,软件升级后,我们也必须到安卓市场上进行更新,给我们增加了工作量。因此我们有必要给我们的Android应用增加自动更新的功能。既然实现自动更新,我们首先必须让我们的应用知道是否存在新版本的软件,因此我们可以在自己的网站上放置配置文件,存放软件的版本信息: 2 baidu_xinwen_1.1.0 http://gdown.baidu.com/data/wisegame/f98d235e39e29031/baiduxinwen.apk在这里我使用的是XML文件,方便读取。由于XML文件内容比较少,因此可通过DOM方式进行文件的解析public class ParseXmlService{ public HashMap parseXml(InputStream inStream) throws Exception { HashMap hashMap = new HashMap(); // 实例化一个文档构建器工厂 DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); // 通过文档构建器工厂获取一个文档构建器 DocumentBuilder builder = factory.newDocumentBuilder(); // 通过文档通过文档构建器构建一个文档实例 Document document = builder.parse(inStream); //获取XML文件根节点 Element root = document.getDocumentElement(); //获得所有子节点 NodeList childNodes = root.getChildNodes(); for (int j = 0; j < childNodes.getLength(); j ) { //遍历子节点 Node childNode = (Node) childNodes.item(j); if (childNode.getNodeType() == Node.ELEMENT_NODE) { Element childElement = (Element) childNode; //版本号 if ("version".equals(childElement.getNodeName())) { hashMap.put("version",childElement.getFirstChild().getNodeValue()); } //软件名称 else if (("name".equals(childElement.getNodeName()))) { hashMap.put("name",childElement.getFirstChild().getNodeValue()); } //下载地址 else if (("url".equals(childElement.getNodeName()))) { hashMap.put("url",childElement.getFirstChild().getNodeValue()); } } } return hashMap; }}通过parseXml()方法,我们可以获取服务器上应用的版本、文件名以及下载地址。紧接着我们就需要获取到我们手机上应用的版本信息:/** * 获取软件版本号 * * @param context * @return */private int getVersionCode(Context context){ int versionCode = 0; try { // 获取软件版本号, versionCode = context.getPackageManager().getPackageInfo("com.szy.update", 0).versionCode; } catch (NameNotFoundException e) { e.printStackTrace(); } return versionCode;}           通过该方法我们获取到的versionCode对应AndroidManifest.xml下android:versionCode。android:versionCode和android:versionName两个属性分别表示版本号,版本名称。versionCode是整数型,而versionName是字符串。由于versionName是给用户看的,不太容易比较大小,升级检查时,就可以检查versionCode。把获取到的手机上应用版本与服务器端的版本进行比较,应用就可以判断处是否需要更新软件。处理流程                                  
    2013-07-06下载
    积分:1
  • android 数字滚动 wheel示例源码下载
    android 数字滚动 wheel示例源码下载
    2014-07-24下载
    积分:1
  • android 时间轴 实例源码下载
    android 时间轴 实例源码下载
    2014-12-04下载
    积分:1
  • RTKlib关于高精度GPS动态定位函数与处理过程整理
    该资源基于RTKLIB,整理了相对定位中调用的函数及公式,从读文件到解算结果的步骤,包括文件读取、计算基站位置、卫星位置、双差、卡尔曼滤波、模糊度估计等的原理与公式。
    2020-05-26下载
    积分:1
  • 696518资源总数
  • 106148会员总数
  • 10今日下载