Help identify the layout used here?
I'm working on a layout that comprises some of the same features seen in the screenshot below, but I'm running into a bit of confusion. Ca开发者_开发技巧n someone help me understand a few points for the screenshot below?
- What is the root layout used here?
- How do I get the button bar to remain at the bottom, while the center section scrolls when it is long enough?
- Similar to the Ok/Cancel buttons seen here, how do I make them each 50% width (minus some margin and padding)?
starting with last one i.e.
Buttons each with 50% width:
- Place both buttons in another linear layout
- Make linear layout's orientation="horizontal"
- make layout's width = "fill parent"
- make button's width = "0px"
- for each button, set layout_weight="1.0"
What is the root layout used here?
Use a linear layout with orientation="vertical"
plave a layout for button bar portion with height="wrap_content"
then a listView
thne the linear layout for button, described above
section scrolls when it is long enough?
Use a Custom ListView
Make height pf listView = "wrap_content"
Make layout_weight = "1.0" for ListView
i hope it will help if not completely then will give you an idea.
To inspect a certain layout yourself you can use the hierarchyview.
You can still use it as a standalone tool but you should maybe also know that it is integrated in the ADT plugin for Eclipse. That means that you could also inspect the layout directly in the IDE (if you use Eclipse of course).
精彩评论