0

我可以让进度对话框停止,但 TabbedView 活动永远不会启动,只是进入黑屏。有任何想法吗?

    class DownloadWebPageTask extends AsyncTask<String, Void, String> {
    private final ProgressDialog dialog = new ProgressDialog(MainScreen.this);
     @Override
        protected void onPreExecute() {
            dialog.setMessage("Gathering data for\n"+selectedSportName+".\nPlease wait...");
            dialog.show();
        }


    @Override
    protected String doInBackground(String... urls) {
        String response = "";
        updateMaps();
        return response;
    }



    @Override
    protected void onPostExecute(String result) {
      dialog.dismiss();
      startTabbedViewActivity();
    }
}


private void startTabbedViewActivity(){
    Intent intent = new Intent(this, TabbedView.class);
    intent.putExtra(SPORT_NAME_EXTRA, selectedSportName);
    intent.putExtra(HEADLINES_FOR_SPORT_EXTRA,         existingSportHeadlines.get(selectedSportName));
    intent.putExtra(SCORES_FOR_SPORT_EXTRA, existingSportScores.get(selectedSportName));
    intent.putExtra(SCHEDULE_FOR_SPORT_EXTRA, existingSportSchedule.get(selectedSportName));
    startActivity(intent);
}

我查看了 Manifest 文件,并没有看到任何奇怪的外观。想不通这个

4

2 回答 2

0

您忘记在“onPostExecute”方法上方添加@Override,因此根本不会执行它。

于 2012-05-01T23:10:06.937 回答
0

活动的布局方向是否正确

 android:orientation="vertical"
于 2012-05-01T04:16:13.353 回答