android中的自定义进度对话框?

Pra*_*een 3 android progressdialog

我按照文档中customdialog示例中的步骤操作,但是我得到了这个例外.有任何想法吗?

04-03 18:50:28.787: VERBOSE/Bru_Press_Tab(750): Exception in Tabsjava.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.brown/com.example.brown.Bru_Press_MostRecent}: android.util.AndroidRuntimeException: requestFeature() must be called before adding content
Run Code Online (Sandbox Code Playgroud)

Com*_*are 10

最有可能的是,你打电话requestWindowFeature()后打电话setContentView().可能是你没有直接这样做,但你继承的类是,因为你正在做一些其他的事情略微不按顺序.

因此,找出你在做什么并改变顺序,以便你requestWindowFeature()先打电话.

例如,这是我的一本书中的示例项目,它使用了标题中的进度指示器,因此需要调用requestWindowFeature().onCreate()在调用setContentView()活动之前我必须这样做.