android - Sliding Tab layout not working in Pre - Lollipop Devices but working fine in Lollipop Devices -


i using slidingtablayout,its working fine in lollipop devices when m trying run in pre-lollipop devices showing error

"android.view.inflateexception: binary xml file line #2: error inflating class @ android.view.layoutinflater.createview"

but have made project having same codes, in slidingtablayout working fine in both lollipop , pre-lollipop devices.

i m not getting whats prob, same code not working. please me.

this xml layout code of custom layout tab.

<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android"        android:id="@+id/tabcontainer"        android:layout_width="match_parent"        android:layout_height="match_parent"        android:padding="8dp"        android:background="@drawable/tab_bg"        android:orientation="vertical">  <imageview     android:id="@+id/tabimage"     android:layout_gravity="center"     android:layout_width="match_parent"     android:layout_height="wrap_content" />  <textview     android:id="@+id/tabtext"     android:gravity="bottom|center"     android:textsize="14sp"     android:padding="4dp"     android:layout_width="match_parent"     android:layout_height="wrap_content" />  </linearlayout> 


Comments