Je règle l'élévation sur le TabLayout à l'intérieur d'un ViewPager mais il ne l'affiche pas du tout. J'ai essayé beaucoup de réponses ici sur stackoverflow mais je n'ai pas pu résoudre le problème. Réglage android: clipToPadding = "false" dans le CoordinatorLayout ne résout pas non plus le problème. Toute aide serait appréciée. Voici le xml de la mise en page que je me sers, mais maintenant obtenir altitude:L'élévation ne fonctionne pas sur TabLayout
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<View
android:id="@+id/statusBarBackground"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:clipToPadding="false" >
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false" >
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</ScrollView>
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="fixed"
app:tabGravity="fill"
app:elevation="3dp" />
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="android.support.design.widget.AppBarLayout$ScrollingViewBehavior" />
</android.support.design.widget.CoordinatorLayout>
ajoutez simplement l'application: elevation = "0dp" à AppBarLayout .. – ZeroOne
@ZeroOne ajoutant 'app: elevation =" 0dp "' AppBarLayout ne fonctionnait pas. – Ali
oh désolé .. changer 0dp à une autre valeur ex: 6dp .. – ZeroOne