dankito / RichTextEditor

Rich text WYSIWYG editor for Android and JavaFX
Apache License 2.0
95 stars 36 forks source link

cannot set background to richtexteditor #9

Closed applehong5013 closed 6 years ago

applehong5013 commented 6 years ago

<net.dankito.richtexteditor.android.RichTextEditor android:id="@+id/editor" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="10" android:background="@drawable/border" />

error

android.view.InflateException: Binary XML file line #227: Binary XML file line #227: Error inflating class net.dankito.richtexteditor.android.RichTextEditor Caused by: android.view.InflateException: Binary XML file line #227: Error inflating class net.dankito.richtexteditor.android.RichTextEditor Caused by: java.lang.reflect.InvocationTargetException

dankito commented 6 years ago

Thanks for reporting this bug to me!

This is a real tough initializing issue and will take me some time to re-write the code to solve this (still no 100 % satisfying solution came to my mind).

In the meantime, a way to circumvent this bug would be to set the background image in code:

editor.setBackgroundResource(R.drawable./* your drawable id */)

Would this solve the issue to your satisfaction temporarily?

applehong5013 commented 6 years ago

Thanks for reporting this bug to me!

This is a real tough initializing issue and will take me some time to re-write the code to solve this (still no 100 % satisfying solution came to my mind).

In the meantime, a way to circumvent this bug would be to set the background image in code:

editor.setBackgroundResource(R.drawable./* your drawable id */)

Would this solve the issue to your satisfaction temporarily?

Thanks you, I have been solved this problem too :D You can make this post to close.