开发者

In Android app,I changed all px to dp and sp. Now it is not opening. What is wrong?

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?

Thank you.

This image is the error message:

In Android app,I changed all px to dp and sp. Now it is not opening. What is wrong?

This image is using the debugger.

In Android app,I changed all px to dp and sp. Now it is not opening. What is wrong?


Read about DDMS and logcat to obtain a stacktrace and to see what the problem is: http://developer.android.com/guide/developing/debugging/debugging-projects.html

This is what you are looking for:

In Android app,I changed all px to dp and sp. Now it is not opening. What is wrong?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜