在蜂窝片段加载微调

在蜂窝片段加载微调

本文介绍了在蜂窝片段加载微调/对话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

在将数据加载到我的片段我想有一个不确定的微调的片段(例如在下面PIC)的中间位置,表明加载内容特定的窗格中的用户。

When loading data into my Fragments I would would like to have an indeterminate spinner in the middle of the fragment (example in pic below) to show the user that content is loading within that particular pane.

什么是做到这一点的蜂窝最好的方法是什么?

What's the best way to do this in Honeycomb?

我真的不希望使用一个微调操作栏中,这不是显而易见的,其中数据加载。另外,我不希望有一个不确定的进度对话框,因为它出现在整个应用程序的中心,也将停止从做别的事情,直到它被驳回的用户。 N.B. FragmentDialogs似乎要做到这一点也

I don't really want to use a spinner in the action bar, it's not immediately obvious where data is loading. Also, I don't want an indeterminate progress dialog because it appears in the center of the entire app and also stops the user from doing anything else until it is dismissed. N.B. FragmentDialogs seem to do this also.

难道我将不得不砍围绕一个自定义的FrameLayout以获取每个窗格预期的效果?

Am I going to have to hack around with a custom FrameLayout to get the desired effect for each pane?

推荐答案

如果您使用的是 ListFragment 您可以致电 setListShown(假) 来,直到调用 setListShown(真)显示加载进度指示器。你可以调用这些片段中的装载机回调方法,以显示指示器,而列表加载。

If you're using a ListFragment you can call setListShown(false) to display a loading progress indicator until you call setListShown(true). You can call these in the fragment's Loader callback methods to show the indicator while the list is loading.

这篇关于在蜂窝片段加载微调/对话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 18:33