これは重複した質問のようですが、私はそれを行うことができません。私は完全な透明(半透明ではない)のステータスバーとナビゲーションバーを望み、その背後にコンテンツを表示したい。活動のJavaファイルでステータスとナビゲーションバーの内容を表示
activity_details.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
tools:context="com.bitspilanidvm.bosm2017.DetailsActivity">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/q"
android:scaleType="centerCrop"/>
</LinearLayout>
V21ののstyles.xml
<resources>
<!-- Theme for API level > 21 -->
<style name="AppTheme" parent="AppBaseTheme">
<!--Customize your theme here. -->
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
</style>
getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
);
これは私が得るものです。ナビゲーションバーの背後にあるコンテンツを取得する方法
?
私は私のstyles.xmlここ
に
<item name="android:windowTranslucentNavigation">true</item>
を追加する場合は、あなたが見ることができるように、私は
得るものである、コンテンツはナビゲーションバーの後ろに行くが、このためにナビゲーションバーは半透明でなければなりません。
解決方法はありますか?
このデバイスには戻るボタンがありませんか? –