Closed piemmm closed 2 years ago
Hello, @piemmm Thanks for your report,
I have tested it with Activity, not AppCompatActivity and its work good, for example, you can download the example app and change AppCompatActivity by Activity in the MainActivity class and you will see it will run without problems and you can edit it easily.
So if you can provide more information about this problem so we can know what exactly the problem is, such as android version, SDK version, code example, or a full example if you can and we can solve it 👍🏻
Thanks Amr Hesham
Hi!
The issue happens if the themes parent is: parent="android:Theme.Material" (and the MainActivity extends plain Activity)
Hi, Thank you @piemmm,
The problem is when you use android:Theme.Material
theme you can't navigate on the source code of the View by clicking, if you use Emulator you can work with arrows so after searching I found that if you want to work with this theme you need to add this attribute and it will work fine.
In XML
android:textIsSelectable="true"
Or in Java or Kotlin code
codeView.setTextIsSelectable(true);
I have tested it on the example app, and I will test it more in different SDK's, if you found any other problem please report it 👍🏻
Thank you so much 😄 Amr Hesham
Thankyou!
Describe the bug Documentation does not mention the activity must extend AppCompatActivity that uses codeView
If you do not, you can't edit anything.
To Reproduce Steps to reproduce the behavior: use CodeView in a normal Activity, not an AppCompatActivity
Expected behavior You should be able to use it regardsless (I guess)