Comment puis-je créer une barre d'outils personnalisée transparente avec des éléments de barre d'outils visibles? J'ai une page avec vue recycleur et je veux voir ma recyclerview sous mine barre d'outils transparente avec des éléments visibles de la barre d'outils. C'est devrait ressembler à thisComment créer une barre d'outils transparente avec des éléments de barre d'outils non transparents
Q
Comment créer une barre d'outils transparente avec des éléments de barre d'outils non transparents
0
A
Répondre
0
essayer cette
<android.support.v7.widget.Toolbar
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:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/background_toolbar" />
maintenant créer un background_toolbar.xml dans res/drawble
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="270"
android:endColor="@android:color/transparent"
android:startColor="#66000000"/>
</shape>
maintenant définissez votre barre d'outils
0
ensemble barre d'outils comme celui-ci:
<android.support.v7.widget.Toolbar
android:id="@+id/tbsobre"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@android:color/transparent"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>
@Nielsh Rathod, votre solution ne fonctionne pas comme je le veux. Okey, regarde encore ici. J'ai une page avec recyclerview, donc je veux voir le mien recyclerview sous ma barre d'outils transparente. – Vaniusha
vous ajouter en plein écran avec quetion je ne vous ai pas obtenu –
vérifier ma question à nouveau. J'ai fait un edit – Vaniusha