简体   繁体   English

为什么我的手机和 android studio 预览中的视图不同?

[英]different view in my phone and android studio preview why?

安卓工作室预览

诺基亚 2 预览

显示配置

Why is it showing different layout in my phone?为什么它在我的手机中显示不同的布局?

It is sometimes because of the density you use in android studio and the density of your phone doesn't match and sometimes if you use constraints layout and you don't declare the constraints when you run the app the widgets automatically jumps to top and sometimes because of wrong constraints and sometimes when the android studio IDE crushes.有时是因为你在 android studio 中使用的密度和你手机的密度不匹配,有时如果你使用约束布局并且你在运行应用程序时没有声明约束,小部件会自动跳转到顶部,有时由于错误的约束,有时当 android studio IDE 崩溃时。 It has many reasons and without seeing your codes i can't say why is this.它有很多原因,没有看到您的代码,我无法说出这是为什么。 Hope this helps希望这可以帮助

It happens sometimes because there are many phones in market with different density.有时会发生这种情况,因为市场上有许多不同密度的手机。 So density of emulator and your phone does not match, and it is also depend how you write the code.所以模拟器的密度和你的手机不匹配,也要看你怎么写代码了。 So please share your code.所以请分享您的代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 android studio预览和何时在手机上工作不同 - android studio preview and when it works on phone is different Android Studio Designer预览版与手机不同 - Android Studio designer preview different to phone 为什么我的Android Studio预览看起来不同? - Why does my Android studio preview look different? 为什么我的 Android Studio (Kotlin) 在 Preview 中显示了 Android 手机的布局,而在 Build App 中没有显示? - Why is my Android Studio (Kotlin) showing the layout of an Android phone in Preview but not in the Build App? 无法在我的Android Studio中查看布局预览 - Not Able to view layout preview in my Android studio Android Studio 约束布局预览与手机屏幕不同 - Android Studio Constraint Layout Preview is different than phone screen 为什么我在Android Studio中的布局预览为空? - Why is my layout preview in Android Studio empty? Android Studio:静态电话预览 - Android Studio: Static phone preview 为什么我的图像出现在 Android Studio 设计视图中,而在手机中运行时却没有? - Why does my image appear in Android Studio design view but not when run in phone? 为什么 Activity 在 Android Studio 预览中的外观与设备上的不同? - Why is the look of the activity different in the Android Studio preview than on the device?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM