を使用してActionBarSherlockいます。スプラッシュ画面がロードされたら、次のActivityように開始します。
Intent i = new Intent(SplashActivity.this, MainFragmentActivity.class);
startActivity(i);
私のメインFragmentActivityではこれを行います:
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Window;
public class MainFragmentActivity extends SherlockFragmentActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.fragment_layout);
actionBar = getSupportActionBar();
actionBar.setDisplayShowCustomEnabled(true);
actionBar.setDisplayShowTitleEnabled(false);
// Set up Main Fragment
FragmentTransaction t2 = this.getSupportFragmentManager()
.beginTransaction();
SherlockListFragment mainFrag = new FollowingFragment();
t2.replace(R.id.main_frag, mainFrag);
t2.commit();
// lots more edited out
}
で(これは、起動時にFollowingFragment最初Fragmentに自動的に読み込まれます。私のでは、これを行います:ActivityAsyncTask
@Override
protected void onPreExecute() {
((MainFragmentActivity)Context).setSupportProgressBarIndeterminateVisibility(true);
}
ここに問題があります。FIRST が開始されるActivityと、ProgressBar は表示されません。しかし、Activityがロードされ、ユーザーが を交換するFragmentと、同じものを使用しsetSupportProgressBarIndeterminateVisibility(true);てプログレス バー スピナーが完全に表示されます。
最新(4.04だと思いますか?)を使用して、すべての正しいSherlockライブラリをインポートしていSherlockます。何が悪いのか誰にもわかりますか?