の右側にあるサークルです:私は私のレイアウトにツールバーを追加私のツールバー
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/gray">
<ProgressBar
android:id="@+id/progress_spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:indeterminate="true"
android:visibility="gone" />
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
と私はmainActivityでそれを初期化:
Toolbar toolbar = findViewById(R.id.toolbar);
toolbar.setVisibility(View.VISIBLE);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setDisplayUseLogoEnabled(false);
getSupportActionBar().setDisplayShowTitleEnabled(false);
が、私のツールバーでのサークルが登場して私のツールバーの権利!私もツールバーからロゴとタイトルを削除しましたが、私はまだこのサークルを見て、それは消えません!
この意味は?どうすれば削除できますか? は
私は間違っているかもしれませんが、ProgressBarをツールバーの中でxmlに使用しています。だからそれを得るのはなぜですか? – Raghavendra
はい、可視性がなくなり、まだ表示されません。このプログレスバーを使用しているものを読み込むために。 –
コードで 'progress_spinner'の可視性を' GONE'に設定しようとしています。 –