Comments (3)
@liguangze 也不是没关系,应该说不是由分辨率决定的。而是由设备最小宽度决定,而设备最小宽度是由分辨率和密度决定的。设备是根据最小宽度寻找不同的文件。
from screenadaptation.
@wildma 感谢,现在已经明白了,感谢开源
from screenadaptation.
现在我是按着教程走的,生成了N多的values,,但是在480*800上还是没有适配好呢
这是啥原因的
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="国五92#汽油"
android:textColor="@color/home_text_33"
android:textSize="@dimen/sp_14"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_28"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="5402吨"
android:textColor="@color/main_red"
android:textSize="@dimen/sp_21"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="元/吨"
android:textColor="@color/home_text_99"
android:textSize="@dimen/sp_12"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_25"
android:text="已售2563吨"
android:textColor="@color/home_text_99"
android:textSize="@dimen/sp_12"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10"
android:gravity="center_vertical"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="北京一石科技"
android:textColor="@color/home_text_99"
android:textSize="@dimen/sp_12"/>
<TextView
android:id="@+id/tv_memeber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:background="@drawable/bg_red_line_corner"
android:text="会员价"
android:textColor="@color/main_red"
android:textSize="@dimen/sp_12"
android:visibility="gone"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_red">
<TextView
android:id="@+id/tv_now_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_3"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginTop="3dp"
android:text="立即报价"
android:textColor="@color/white"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
这是部分代码,求大神指教下
from screenadaptation.
Related Issues (20)
- 插件不能下载了好像,是否提供下另一个地址 HOT 1
- 不同横屏设备的适配 HOT 1
- 请问这个插件是停止维护了吗? HOT 1
- Android studio 4.0生成的文件夹里没有文件 HOT 5
- 手机横屏过来的时候还是读到竖屏时宽度对应的尺寸 HOT 1
- AS4.1不兼容了,能适配一下吗,大佬 HOT 8
- 其他尺寸适配 HOT 1
- 在三星系列手机上无法匹配最小宽度411.4285dp,直接使用了默认的360dp,导致布局错误。比如三星note8 HOT 3
- 最小宽度是什么啊 HOT 1
- 作者有没有考虑做成一个远程依赖 HOT 1
- 荣耀平板v6,sp14适配字体偏大(真实设备),红米k30看起来正常 HOT 2
- 请教一下,如果有些view的宽高 需要在代码中动态设置dp,该怎么办? HOT 1
- 项目组件化后 如何处理 dimens.xml 文件? HOT 2
- 新的最小宽度尺寸 :451.7647 HOT 1
- 您好,首先感谢您的开源,你的库对我们这些开发者帮助非常的大,不过我有些不太理解的地方,想请教下dp转px的问题,这个问题不是您的库的问题 HOT 2
- 适配手机和平板横屏 HOT 2
- 直接开发tv 版本的 设计图是 1080 base_dp 我也是写1080吧 HOT 1
- 请问下,我这种情况是怎样填写base_dp HOT 2
- IDEA 插件库的作者是您吗?Dolphin 版本上文件格式存在异常 HOT 2
- 请教多种设备适配问题 HOT 1
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 screenadaptation.