Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dataBinding在布局添加TintToolbar运行报错 #65

Open
NeVaDaAAA opened this issue Oct 12, 2018 · 3 comments
Open

dataBinding在布局添加TintToolbar运行报错 #65

NeVaDaAAA opened this issue Oct 12, 2018 · 3 comments

Comments

@NeVaDaAAA
Copy link

XML:

<data>

    <variable
        name="viewModel"
        type="com.ani.dylan.peony.module.home.vm.MainViewModel" />
</data>

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true">


    <com.bilibili.magicasakura.widgets.TintToolbar
        android:id="@+id/main_toolbar"
        style="@style/Widget.App.Toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="@color/theme_color_primary"
        android:elevation="@dimen/dp_4"
        android:fitsSystemWindows="true"
        app:popupTheme="@style/AppTheme.PopupOverlay" />

    <com.ani.dylan.peony.view.CustomViewPager
        android:id="@+id/main_vp"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_above="@+id/main_tab"
        android:layout_below="@+id/main_toolbar" />


    <me.majiajie.pagerbottomtabstrip.PageNavigationView
        android:id="@+id/main_tab"
        android:layout_width="match_parent"
        android:layout_height="55dp"
        android:layout_alignParentBottom="true"
        android:background="@color/white" />

</RelativeLayout>

报错信息:
Caused by: android.view.InflateException: Binary XML file line #20: Binary XML file line #20: Error inflating class com.bilibili.magicasakura.widgets.TintToolbar
Caused by: android.view.InflateException: Binary XML file line #20: Error inflating class com.bilibili.magicasakura.widgets.TintToolbar

换成V7自带的Toolbar就没有问题。
求各位大佬帮忙看看 感激不禁

@NeVaDaAAA
Copy link
Author

机型:OnePlus3
Android版本:8.0.0

项目版本:
compileSdkVersion: 28,
buildToolsVersion: "28.0.2",
applicationId : "com.ani.dylan.peony",
minSdkVersion : 21,
targetSdkVersion : 28,
versionCode : 1,
versionName : "1.0",

@JChunyu
Copy link

JChunyu commented Oct 14, 2018

遇到了相同的问题

@fg2q1q3q
Copy link

建议暂时先换到0.1.8版本(compile 'com.bilibili:magicasakura:0.1.8@aar'),亲测无此问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants