gpt4 book ai didi

android - 如何在 android 中选项卡方向更改时删除进度对话框

转载 作者:行者123 更新时间:2023-11-29 22:01:00 24 4
gpt4 key购买 nike

我创建了两个包含两个不同内容的选项卡。一个是视频流,另一个是 ListView 。

tab1->视频流tab2-> ListView 。

我在这里为 tab1 放置了带有文本“缓冲视频”的进度对话框,为 listview 放置了带有文本“加载”的进度对话框。它适用于纵向模式。在保持 tab2 的同时,当我将其方向更改为横向时,它显示“loading.."& "buffering"both.How could move the "buffering"progress for tab2(landscape).?

谢谢。

最佳答案

试着在你的适配器中做一些改变,比如你的所有列表项应该像我在纵向和横向模式下工作得很好一样

      public View getView(int position, View convertView, ViewGroup parent) {

if (convertView == null) {
convertView = ((LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.gallery_main_page_grid_item, parent, false);
}
Holder holder = new Holder();

AQuery aq = listAQ.recycle(convertView);

holder.imgView_Grid_Thumbnail_Gallery = (ImageView) convertView.findViewById(R.id.imgView_Grid_Thumbnail_Gallery);

if (holder.imgView_Grid_Thumbnail_Gallery != null) {
aq.id(holder.imgView_Grid_Thumbnail_Gallery.getId()).image(dataArray.get(position).get("thumbUrl") + "/11");
}

holder.txtView_Grid_Name_Gallery = (TextView) convertView.findViewById(R.id.txtView_Grid_Name_Gallery);
if (holder.txtView_Grid_Name_Gallery != null) {
aq.id(holder.txtView_Grid_Name_Gallery.getId()).text(dataArray.get(position).get("user_name"));
Typeface txtViewForName = Typeface.createFromAsset(convertView.getContext().getAssets(), "fonts/arial_bold.ttf");
holder.txtView_Grid_Name_Gallery.setTypeface(txtViewForName);

}

尝试像这样添加您的列表项。希望它会有所帮助。

如果(convertView == null)如果 (holder.txtView_Grid_Name_Gallery != null)

if (holder.imgView_GridItem_Gallery != null) {
Bitmap cachedImage = aq.getCachedImage(R.drawable.loading);
String publicUrl = dataArray.get(position).get("publicUrl") + "/13";
if (aq.shouldDelay(convertView, parent, publicUrl, 0)) {
aq.id(holder.imgView_GridItem_Gallery.getId()).image(cachedImage, 0.75f);
} else {
aq.id(holder.imgView_GridItem_Gallery.getId()).image(publicUrl, true, true, 0, 0, cachedImage, 0, 0.75f);
}

关于android - 如何在 android 中选项卡方向更改时删除进度对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11947875/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com