admin管理员组文章数量:1355721
Recently, I stumbled upon what seems to be a strange glitch in Android Studio. No matter what kind of Kotlin file I create (object
, interface
, class
—anything), the IDE always opens it as if it contains a Jetpack Compose function with previews. Most of the time, I have to manually switch back to the "Code" pane, since I create Fragment
s, ViewModel
s, and UseCase
s far more often than Composables. This ends up wasting time with each new file.
Is there a way to fix this through Studio’s configuration settings? I believe there should be some setting which I changed without even noticing it, because I couldn't find anything about such behavior on web, so most likely this is not an issue experienced by many.
Recently, I stumbled upon what seems to be a strange glitch in Android Studio. No matter what kind of Kotlin file I create (object
, interface
, class
—anything), the IDE always opens it as if it contains a Jetpack Compose function with previews. Most of the time, I have to manually switch back to the "Code" pane, since I create Fragment
s, ViewModel
s, and UseCase
s far more often than Composables. This ends up wasting time with each new file.
Is there a way to fix this through Studio’s configuration settings? I believe there should be some setting which I changed without even noticing it, because I couldn't find anything about such behavior on web, so most likely this is not an issue experienced by many.
Share Improve this question asked Mar 28 at 11:28 agaaga 29.5k13 gold badges90 silver badges127 bronze badges 01 Answer
Reset to default 4You can toggle this in Settings | Editor | UI Tools:
Make sure the setting for Kotlin is set to Code. You may want to tick the checkbox Show split mode if file contains preview annotation to automatically enable the split mode instead when the file actually contains previews.
本文标签:
版权声明:本文标题:Android Studio always opens up Compose Preview pane no matter what kind of Kotlin file gets created - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744040180a2580515.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论