Android unit of widgets for different size screens
I am developing an android application for tablet pc's. But i am however confuse with the size of the screen. I created emulator with the size of 850 * 500. And developed some xmls according to this screen, its looking abs fine with this resolution, but when i tried to display same page in smaller screen say 500 * 350, its hiding the down parts of the screen. Lower widgets got invisible. Currently i am using dp for the unit of widgets. Please guide me what unit should i use so that it shows all widgets correctly at the exact开发者_JS百科 position.
You are right about to use dp for defining layouts for multiple screen resolutions.
But one more thing: sp is the measurement for the Font-size.
And one more thing that RelativeLayout is more preferrable to use than other layouts like LinearLayouts, TableLayouts. So there may be a chance that if you use RelativeLayout and define your views relatively so that your problem may be solved as you have mentioned that the small screen is hiding your down part.
精彩评论