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

一个很奇怪的问题 #28

Closed
Caij opened this issue May 13, 2017 · 4 comments
Closed

一个很奇怪的问题 #28

Caij opened this issue May 13, 2017 · 4 comments

Comments

@Caij
Copy link

Caij commented May 13, 2017

<com.bilibili.magicasakura.widgets.TintTextView
    android:id="@+id/tv_name"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:textSize="?attr/eStatusTextSize"
    android:textColor="@color/emotion_item_tv_color_selector"/>

当textColor 设置为一个selector 然后 textSize设置主题里面的字体大小
在AppCompatCompoundDrawableHelper.loadFromAttribute 出现异常:
android.content.res.Resources$NotFoundException:Resource "com.caij.emore:dimen/status_text_size_16" (7f0900b0) is not a Drawable (color or path): TypedValue{t=0x5/d=0xf01 a=5 r=0x7f0900b0}

但是不是必现的。

@xyczero
Copy link
Member

xyczero commented May 15, 2017

AppCompatCompoundDrawableHelper内并没有解析textSize的方法 ):

@Caij
Copy link
Author

Caij commented May 15, 2017

@xyczero 我也看了源码 一直找不到问题的所在 所以才求助。 线上出问题还不少。

@xyczero
Copy link
Member

xyczero commented May 16, 2017

很遗憾我在线上崩溃日志中并没有发现类似异常,建议你可以写一个demo测试一下。

@Caij
Copy link
Author

Caij commented May 16, 2017

好吧 主要自己没有出现这样问题 都是线上出现的 不知道什么情况下发生的。

@Caij Caij closed this as completed May 16, 2017
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

2 participants