在Android应用程序,我改变了所有像素到DP和SP。现在,它是不开放。哪里不对? [英] In Android app,I changed all px to dp and sp. Now it is not opening. What is wrong?

查看:196
本文介绍了在Android应用程序,我改变了所有像素到DP和SP。现在,它是不开放。哪里不对?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用过很多PX对象。我在应用DP改变了一切,并textsizes到SP。现在,我的应用程序将不会打开。当我使用调试器和走一步看一步它打开,然后显示出来。我不是从当它工作,只是之前PX更改任何code。顺便说一句,我使用tabHost他们应该是在底部5个选项卡。它拆分成约30。它只是很奇怪的东西怎么回事。你知道什么是错误的,如何解决它?

I had many objects using px. I changed everything in my app to dp and textsizes to sp. Now my app won't open. When I use the debugger and go step by step it does open and then displays this. I did not change any code from before when it was working, just the px. By the way, I am using tabHost and their should be 5 tabs on the bottom. It splits it into about 30. It is just very strange stuff going on. Do you know what is wrong and how to fix it?

感谢您。

这形象是错误消息:

此图像是使用调试器。

推荐答案

恢复所有的SP和DP回像素,并确保它再次工作。然后开始做小的增量改变它的UI元素引起的问题隔离开来。当你发现哪一个做到了,翻检code,看看如果你基于UI元素的大小作任何假设和计算。

Revert all sp and dp back to px, and make sure it works again. then start doing small incremental changes to isolate which UI element is causing the problem. When you find which one did it, look through your code to see if you're making any assumptions and calculations based on the size of that UI element.

这篇关于在Android应用程序,我改变了所有像素到DP和SP。现在,它是不开放。哪里不对?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆