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

请问怎么设置自己的布局文件layout 进去 我要设置自己样式? #32

Open
Andjdd opened this issue Mar 24, 2021 · 3 comments

Comments

@Andjdd
Copy link

Andjdd commented Mar 24, 2021

请问怎么设置自己的布局文件layout 进去 我要设置自己样式?

@Andjdd
Copy link
Author

Andjdd commented Mar 24, 2021

    FloatingView.get().customView(R.layout.view_chat);
    FloatingView.get().add();

这样设置后提示:
Attempt to invoke virtual method 'void android.widget.ImageView

@ZuJunJun
Copy link

    FloatingView.get().customView(R.layout.view_chat);
    FloatingView.get().add();

这样设置后提示: Attempt to invoke virtual method 'void android.widget.ImageView

你要在customView之前先设置Floating.get().icon(),然后你自己的布局文件中的icon view的id要设置成icon. 不然会报View空指针。或者你可以重写他的代码

@MaleWxt
Copy link

MaleWxt commented Jun 27, 2022

    FloatingView.get().customView(R.layout.view_chat);
    FloatingView.get().add();

这样设置后提示: Attempt to invoke virtual method 'void android.widget.ImageView

你要在customView之前先设置Floating.get().icon(),然后你自己的布局文件中的icon view的id要设置成icon. 不然会报View空指针。或者你可以重写他的代码

正解啊,看了源码之后发现的,自己布局里面的ImageView的ic必须是他源码中的icon.

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