在Jelly Bean和KitKat上填充TabLayout时出错

时间:2017-12-06 14:51:01

标签: android android-layout xamarin.android android-4.4-kitkat android-4.2-jelly-bean

我的活动中有以下TabLayout,它在Nougat,Marshmallow和Lollipop上工作正常,但在Jelly Bean和KitKat上引发了异常。有任何想法吗?这已经令人沮丧了。

<android.support.design.widget.TabLayout
        p1:minWidth="25px"
        p1:minHeight="25px"
        p1:layout_width="match_parent"
        p1:layout_height="wrap_content"
        p1:id="@+id/notificationTypes"
        p1:theme="@style/Theme.AppCompat.Light" />

    Android.Views.InflateException: Binary XML file line #1: Error inflating class android.support.design.widget.TabLayout ---> Java.Lang.Reflect.InvocationTargetException: Exception of type 'Java.Lang.Reflect.InvocationTargetException' was thrown. ---> Java.Lang.IllegalArgumentException: You need to use a Theme.AppCompat theme (or descendant) with the design library. 

0 个答案:

没有答案