Comments (10)
是的,你demo的计算有问题,比如分辨率是1920* 1200 的平板,无论是横着用还是竖着用,最小宽度就是1200,而demo中直接取dm.widthPixels这个应该不对,这个值会跟随横竖屏变化而变化。
from dimens_sw.
设计图 宽960 高600
from dimens_sw.
屏幕分辨率 1920 * 1200
from dimens_sw.
计算的最小宽度应该是600才对的吧,就算添加了values-sw600dp 它还是使用490
from dimens_sw.
计算的最小宽度应该是600才对的吧,就算添加了values-sw600dp 它还是使用490
你这个是平板吧,分辨率是1920 * 1200 实际上最小宽度不会是1200,应该是1032,因为它会扣除底部虚拟导航键的高度,所以1032除以2约等于500,向下寻找,自然是490。
from dimens_sw.
平板的width pixels好像取的有点问题,应该是我写的demo里面计算有点问题,适配方案是OK的
from dimens_sw.
这个平板居然是横着用的。。。。
from dimens_sw.
@shunhuang 你说的对,我已经意识到这个问题了,刚提交了修改
from dimens_sw.
@ladingwu ,老师你好,现在是2020-4-30,我在使用1920*1200平板的时候还是出现了
dpi:320 width pixels : 1200
计算出来的 smallestWidth: 600.0dp
实际使用的 smallestWidth: 490dp
看到了项目在 Apr 4, 2019 已经提交了修改,但是此时此刻项目跑起来还是没有实际使用正确,请问这个要怎么解决呢
from dimens_sw.
@ladingwu ,老师你好,现在是2020-4-30,我在使用1920*1200平板的时候还是出现了
dpi:320 width pixels : 1200 计算出来的 smallestWidth: 600.0dp 实际使用的 smallestWidth: 490dp
看到了项目在 Apr 4, 2019 已经提交了修改,但是此时此刻项目跑起来还是没有实际使用正确,请问这个要怎么解决呢
看看开发者模式下,是否手动改过了最小宽度值?平板是原生系统么?是否刷过ROM?
from dimens_sw.
Related Issues (20)
- (此问题不是bug)请问,这个框架在屏幕旋转时,处理过相关逻辑了吗? HOT 1
- 能列出你项目中用的dpi目录吗 HOT 3
- 该方法对比分辨率适配的方法有什么异同? HOT 2
- TV适配有个问题 HOT 2
- 资源文件里都报错了,不影响项目运行,下面是错误日志, HOT 1
- 华为麦芒5手机计算出来的和实际使用的smallestWidth差这么多呢? HOT 2
- 乐视 leX620 HOT 2
- 老铁,我记得之前是一个java工程啊 HOT 1
- 不必现的报错 HOT 3
- DimenGenerator.main()没有生成文件 HOT 1
- 设计稿尺寸1920X1080,当遇到大于720的尺寸在Ui中该如何表示? HOT 3
- MakeUtils俩面的MAX_SIZE值 HOT 1
- 大佬,问个问题可以生成负的么 HOT 4
- android.view.InflateException: Binary XML file line #8: Binary XML file line #8: You must supply a layout_height attribute. HOT 1
- DimenGenerator.main() 如何运行?谢谢
- 生成dimens文件
- 能适配文字大小吗?
- 博主有联系方式吗?想谈合作~
- .
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dimens_sw.