ANDROID, what layout elements should I use?
I need to make an android layout like this one.
- tile background all over the screen.
- top menu which, overlays the background ( note the shadow ).
- some sort of a table with text options, maybe pictures开发者_Python百科, which can be scrolled up and down.
- bottom menu, which appears by sliding up after a menu button is hit.
What kind of layout elements do you think I should use for that?
Thanks!
I think you should first learn about the Android Layout and XML layout design, then you can easily prepare this layout as well.
Relative Layout
will be the better layout as compare to other layouts like Linear Layout and Table Layout.
To display middle part that is showing textual description may contains ListView
(ListView because as you have mentioned Text Options should scroll up and down), but it depends on your requirement.
The RelativeLayout
is the most flexible, and I think you can make all this with a minimal hierarchy view depth.
My approach would be to use a RelativeLayout. The Top Menu bar could be a custom class which extends a LinearLayout and this can be used in the RelativeLayout (in fact in any screen you have to provide UI consistency). Similarly, the bottom menu would be a custom control containing the appropriate animations. The rest of the screen would be contained in a ScrollView, possibly containing a TableLayout. I have something very similar using a MapView in the main screen and it works fine.
精彩评论