六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 97|回复: 0

Android带进度条文件上传

[复制链接]

升级  69.5%

788

主题

788

主题

788

主题

探花

Rank: 6Rank: 6

积分
2390
 楼主| 发表于 2012-12-19 23:09:05 | 显示全部楼层 |阅读模式
<div id="cnblogs_post_body">
Being able to display a progress bar during a time consuming upload to a web server is important when dealing with users and appeasing their impatience. Here is one approach of achieving this.

In this example we are going to use 2 classes – the first one is going to implement Android’s really handy threading function: Async Task and the other is going to extend MutlipartEntity – the basic object used for a multipart POST. Let’s take a look at extending a MultipartEntity object:


CustomMultiPartEntity.java


<div class="dp-highlighter bg_java"><div class="bar"><div class="tools">[java] view plaincopyprint?
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表