Currently I am showing Google Map in Android phone using Java on the whole screen which is working fine for me.
public class MainActivity extends MapActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
protected boolean isRouteDisplayed() {
return false;
}
}
Below is my XML file-
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.google.android.maps.MapView
android:id="@+id/mapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="0vAX8Xe9xjo5gkFNEEIH7KdHkNZNJWNnsjUPKkQ"
/>
</RelativeLayout>
Problem Statement:-
I need to show the Google Map on the Top Half of the Android Screen instead of showing on the full screen. And on the Bottom Half of the Screen I need to show TextBox. Is it possible to do this?
Any thoughts will be appreciated.
Yeah its possible and can easily be implemented with
LinearLayout. By assigning weight toMapViewandTextView.In this case