开发者

Which is the best layout in android we can use to design the UI? [closed]

开发者 https://www.devze.com 2023-03-16 11:50 出处:网络
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing th
Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 8 years ago.

开发者_JAVA百科 Improve this question

I am using Absolute layout for my UI design in android.

My doubt is which layout is best for UI design in android and Is it the design is change in any other device. That means i am using HTC Desire to test my application if i installed my app in any other app means the design is change or look like same

Thanks in Advance


AbsoluteLayout is definitely worst-practice for android.

Get to love the RelativeLayout. It will make your life much easier, when designing for multiple resolutions/densities. If you have an old SDK, update your eclipse plugin. It has graphical snap-lines for RelativeLayouts similar to designing a form in Visual Studio, so you can see what is anchored where. It's really quite good.


Do not use AbsoluteLayout! The Android Doc says:

This class is deprecated. Use FrameLayout, RelativeLayout or a custom layout instead.

Those layouts will adapt to different screen sizes, whereas AbsoluteLayout will not.


I always go for LinearLayout over all other layout.Working with RelativeLayout is very hard as all the components are placed relatively to each other so if you want to move a component slightly you will have to sweat it out!!


Depends on your design. It's a nice question. Layouts are a very important concept of desiging. I usually prefer linearLayout and relative layout.

Use frameLayout if you want to display a textView on an ImageView and don't worry about different handsets. It will adapt accordingly. Study Nine-patch image.

0

精彩评论

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