Reputation: 2244
I want to make a appliaction for tablets. There will be a mainactivity and will include a map on it. And other fragments will be on it.
For example, I think, this figure is telling what I want.
The figure http://imageshack.us/scaled/landing/62/fragmentr.png
Map will always be there and the listview will on it on the left for example. Is it possible on android? And in which way I can do it?
Upvotes: 0
Views: 110
Reputation: 69663
Yes, this is possible. You can create an XML file which describes the arrangment of the UI elements on the screen and then write the code which initializes and manages these UI elements. Details and examples can be found in the official API guide:
http://developer.android.com/guide/topics/ui/declaring-layout.html
In this case you would create a vertical LinearLayout
with three elements:
TextView
(header), LinearLayout
(map and map list) with two elements:
MapView
for the map TextView
for the listLinearLayout
(menu) with various Button
elementsUpvotes: 1
Reputation: 6071
More of a pseudo-approach, but hopefully it'll send you down the right path.
You could use an ActionBar
as the header, a MapFragment
and a ListFragment
for the content itself. The menu is up to you, depending on what you want it to do. :)
Upvotes: 0