Normal Controls over MapView

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Normal Controls over MapView

Postby Kamal » Wed Jun 03, 2009 11:13 am

Hi All,

I have a main class:

public class MapsActivity extends MapActivity{

private class RotateView extends ViewGroup implements SensorListener {

.........
.........

}

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mRotateView = new RotateView(this);
mMapView = new MapView(this, "012_Xi3bU6Nqt47mEkypTux5nnQ_gSB1qFcASnQ");


mRotateView.addView(mMapView);

mRotateView.addView(txt);
setContentView(mRotateView);
........

}

This will display the map view on complete screen.

I want to display Map on half of the screen(360px * 300 px) and want to add edittext, button and map Zoom controls over the layout.

Is it possible to do that ???

If so, can you help me how to add this using codes ?

Regards,
Kamal
Kamal
Junior Developer
Junior Developer
 
Posts: 23
Joined: Wed May 27, 2009 11:15 am

Top

Postby iifuzz » Wed Jun 03, 2009 7:32 pm

Pretty sure that has to do with how you created your main.xml file.

Check out this website
droiddraw_-_live_gui_designer_no_more_manual_xml-coding-t217.html
iifuzz
Junior Developer
Junior Developer
 
Posts: 22
Joined: Thu May 21, 2009 6:00 pm

Normal Controls over MapView

Postby Kamal » Thu Jun 04, 2009 5:39 am

Hi iifuzz,

Thanx for your reply....

I been through DroidDraw... As i have understood, this will create xml codes for main.xml file. Copy these codes and paste it on main.xml and we will see the UI as we wanted......

Well, me question is, I am not using setContentView(R.layout.main) whereas I am using ;

mRotateView = new RotateView(this);
mMapView = new MapView(this, "012_Xi3bU6Nqt47mEkypTux5nnQ_gSB1qFcASnQ");

mRotateView.addView(mMapView);

mRotateView.addView(txt);
setContentView(mRotateView);

So, how the generated main.xml can help me....?

So I have a mRotateView and wish to add controls on mRotateView.
Kamal
Junior Developer
Junior Developer
 
Posts: 23
Joined: Wed May 27, 2009 11:15 am

Postby Kamal » Thu Jun 04, 2009 6:05 am

mRotateView.addView(txt); has been added by mistake...
Kamal
Junior Developer
Junior Developer
 
Posts: 23
Joined: Wed May 27, 2009 11:15 am

Postby iifuzz » Thu Jun 04, 2009 12:28 pm

im not that good yet, im not sure :(
iifuzz
Junior Developer
Junior Developer
 
Posts: 22
Joined: Thu May 21, 2009 6:00 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: Google [Bot] and 5 guests