mikaelzero / mojito

微信、bilibili大图、长图、gif、视频、自定义view的转场效果,The transition effect of wechat, bilibili large image, long image, GIF, video and custom view
Apache License 2.0
1.51k stars 164 forks source link

Android 5.0运行会carsh #56

Closed chenjx888 closed 3 years ago

chenjx888 commented 3 years ago

主要错误:requestFeature() must be called before adding content 机型:魅族 m2

mikaelzero commented 3 years ago

源码里这行 https://github.com/MikaelZero/mojito/blob/b648083449b6782b1fb34177b4db1732b8fa11ce/mojito/src/main/java/net/mikaelzero/mojito/ui/ImageMojitoActivity.kt#L35

和34行的互换,会出现同样的错误吗

chenjx888 commented 3 years ago

supportRequestWindowFeature(Window.FEATURE_NO_TITLE) window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN) super.onCreate(savedInstanceState) // ImmersionBar.with(this).fullScreen(true).init() setContentView(R.layout.activity_image)

我这样改的

mikaelzero commented 3 years ago

supportRequestWindowFeature(Window.FEATURE_NO_TITLE)
这句代码只加在onCreate前面,其他不动会有问题吗

chenjx888 commented 3 years ago

按照你的方法改就好了