获取页面可见的list,刷新可见的进度条
[1].[代码] [Java]代码 跳至 [1]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
handlerGetData.sendEmptyMessage(REFLASH__PROGRESSBAR);
for
(
int
j =
0
; j < mChannelListView.getChildCount(); j++)
{
View view = mChannelListView.getChildAt(j);
ProgressBar progressBar = (ProgressBar)view.findViewById(R.id.livetv_play_status);
Channel channel2 =
(Channel)mChannelAdapter.getItem(j + mChannelListView.getFirstVisiblePosition());
PlayBill mPlayBill = channel2.getmCurrentPlayBill();
if
(mPlayBill !=
null
)
{
try
{
int
percent =
DateUtil.getProBarShow(mPlayBill.getmStrStartTime(), mPlayBill.getStrEndTime(),
100
);
progressBar.setProgress(percent);
if
(percent >=
100
)
{
getChannelDetails(mResponseChannelList);
}
}
catch
(ParseException e)
{
e.printStackTrace();
}
}
}
|