android - 处理所有屏幕尺寸的android

标签 android dimensions screen-size

我正在开发一个 android 应用程序,它是用数字(边距等)设计的,没有相关的东西所以我想我会发现不同屏幕尺寸的很多问题所以我想制作一个函数来保存数据DIMENSIONS 文件与用户屏幕尺寸成比例,例如 (用户屏幕尺寸 X dimen)/(应用程序设计的屏幕尺寸),所以我想知道这是否获胜不会对应用程序工作等造成任何问题..

谢谢 =)

最佳答案

//Dimen
implementation 'com.intuit.ssp:ssp-android:1.0.5'
implementation 'com.intuit.sdp:sdp-android:1.0.5'

使用这两个库, ssp 为文本大小,sdp 为边距、填充和布局大小

android:layout_width="@dimen/_24sdp"
android:layout_height="@dimen/_24sdp"

关于android - 处理所有屏幕尺寸的android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41498646/

相关文章:

c# - Google Play 游戏在 Social.localUser.Authenticate 上返回 false

java - 将 android View 引用保密好吗?

java - Canvas.drawLines 显示不连续的线段

android - 将 STL 与 Android NDK C++ 一起使用

machine-learning - 在这种情况下如何计算H的*VC维度*?

android - 如何防止移动设备调整大小和使用正确的 css 文件

java - 如何传递数组维度?

c++ - 创建比初始化 C++ 更大的数组时会发生什么

IOS:无法获得正确的屏幕尺寸

Android 多种屏幕尺寸和密度问题