2013-11-29 3 views
2

мне нужно, чтобы получить результат ниже:Android вид на вид

enter image description here

мне нужно LinearLayout появляться на MapView

mapview.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="vertical" > 

    <org.osmdroid.views.MapView 
     android:id="@+id/mapview" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:layout_weight="0.1" 
     android:clickable="true" /> 

    <LinearLayout 

     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:layout_weight="0.9" 
     android:orientation="horizontal" > 

     <Button 
      android:id="@+id/btnAcceptMyLocation" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:layout_weight="0.5" 
      android:text="Onayla" /> 

     <Button 
      android:id="@+id/btnCancelMyLocation" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:layout_weight="0.5" 
      android:text="İptal" /> 
    </LinearLayout> 

</LinearLayout> 
+0

u необходимо над правым фрагментом карты? или вам нужен еще один макет под фрагментом MAP? –

+0

Опубликуйте свой макет xml отдельно и объясните свои потребности. –

ответ

2

Поместите свой LinearLayout и MapView в RelativeLayout. Совместите LinearLayout с родительским дном.

Установите MapView, чтобы заполнить родительскую ширину и высоту, установите ширину LinearLayout для заполнения родительского элемента и высоту примерно на 50dp (при условии, что ваша фотография). Затем воспользуйтесь этой опцией в вашем LinearLayout:

android:layout_above="@+id/mapView" 
+0

большое спасибо – ismail

Смежные вопросы