android - 如何修复安卓手机的屏幕尺寸?
问题描述
我的应用程序在我的 LGG4 手机上正确运行,屏幕尺寸正确。但其他设备,例如三星 Galaxy Note 粉丝手机,屏幕有很多空白处。我该如何解决?我更改了mpi
, xhdpi
,... 文件夹。这是我的content_main xml
:(也许是那个代码)
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context=".MainActivity"
tools:layout_editor_absoluteY="81dp"
tools:showIn="@layout/activity_main">
<RelativeLayout
android:id="@+id/mainLayout"
android:layout_width="410dp"
android:layout_height="670dp">
</RelativeLayout>
</RelativeLayout>
解决方案
推荐阅读
- kendo-asp.net-mvc - asp kendo multiselect 通过 jquery 手动选择项目
- plantuml - 如何防止 PlantUML 创建错误图像?
- c# - 如何每次使用 C# Kestrel 打开 cmd
- android - 更改开发操作系统后,它显示“未解决的参考:合成”
- javascript - 在 Vue 应用程序中为经过身份验证的用户获取数据的最佳位置?
- python - 在python中访问上一个对象值
- android - 我可以在服务中使用 Runtime.getRuntime().exec("input tap x y") 吗?
- php - 将服务器时间与碳 php laravel 中的某个时间进行比较
- android - Android 房间查询返回 null
- python - 根据某些列上的条件将 Na 放在几列上