У меня проблема выравнивания в моем приложении. Я хочу создать три раздела. Верхняя сторона - это меню, нижняя сторона - это меню и раздел карты в середине экрана. Но, как вы можете видеть на картинке, я не мог выровнять второе меню в нижней части экранаСтрока таблицы Android выровнена внизу
Вот мой макет XML
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
tools:context="com.ufukugur.app.MainActivity"
android:background="#000">
<!-- menu on the top -->
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:id="@+id/ustMenu">
<TableRow
android:layout_marginLeft="0dp"
android:layout_marginTop="0dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:weightSum="7" >
<RelativeLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" >
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:clickable="false"
android:gravity="left"
android:id="@+id/imgLogo"/>
</RelativeLayout>
<RelativeLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" >
<ImageView
android:layout_width="match_parent"
android:layout_height="36dp"
android:clickable="true"
android:onClick="menuHarita"
android:gravity="center_horizontal"
android:src="@drawable/menunokta"
android:id="@+id/imgMenuNokta"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/imgMenuNokta"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Sembol"
android:layout_alignParentBottom="true"
android:gravity="center_horizontal"
android:textColor="#fff" />
</RelativeLayout>
<RelativeLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" >
<ImageView
android:layout_width="match_parent"
android:layout_height="36dp"
android:clickable="true"
android:onClick="menuHarita"
android:gravity="center_horizontal"
android:src="@drawable/menucizgi"
android:id="@+id/imgMenuCizgi"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/imgMenuCizgi"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Rota"
android:gravity="center_horizontal"
android:textColor="#fff" />
</RelativeLayout>
<RelativeLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" >
<ImageView
android:layout_width="match_parent"
android:layout_height="36dp"
android:clickable="true"
android:onClick="menuHarita"
android:gravity="center_horizontal"
android:src="@drawable/menubolge"
android:id="@+id/imgMenuBolge"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/imgMenuBolge"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Bölge"
android:gravity="center_horizontal"
android:textColor="#fff" />
</RelativeLayout>
<RelativeLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" >
<ImageView
android:layout_width="match_parent"
android:layout_height="36dp"
android:clickable="true"
android:onClick="menuHarita"
android:gravity="center_horizontal"
android:src="@drawable/menunotam"
android:id="@+id/imgMenuNotam"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/imgMenuNotam"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Notam"
android:gravity="center_horizontal"
android:textColor="#fff" />
</RelativeLayout>
<RelativeLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" >
<ImageView
android:layout_width="match_parent"
android:layout_height="36dp"
android:clickable="true"
android:onClick="menuHarita"
android:gravity="center_horizontal"
android:src="@drawable/menufir"
android:id="@+id/imgMenuFir"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/imgMenuFir"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="FIR"
android:gravity="center_horizontal"
android:textColor="#fff" />
</RelativeLayout>
<RelativeLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" >
<ImageView
android:layout_width="match_parent"
android:layout_height="36dp"
android:clickable="true"
android:onClick="menuHarita"
android:gravity="center_horizontal"
android:src="@drawable/menutrafik"
android:id="@+id/imgMenuTrafik"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/imgMenuTrafik"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Trafik"
android:gravity="center_horizontal"
android:textColor="#fff" />
</RelativeLayout>
</TableRow>
</RelativeLayout>
<!-- map and other things middle of the screen -->
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="60dp"
android:layout_marginBottom="60dp"
android:name="com.google.android.gms.maps.MapFragment"
android:layout_alignParentBottom="true" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="GPS bağlantısı sağlanıyor..."
android:id="@+id/textKonum"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:textColor="#ff0"
android:background="@color/black_overlay"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text=""
android:id="@+id/textYakin"
android:layout_alignParentBottom="true"
android:gravity="center_horizontal"
android:background="@color/black_overlay"/>
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="50dp"
android:clickable="true"
android:onClick="notamClicked"
android:src="@drawable/unlems"
android:id="@+id/imgNotam"/>
<ImageView
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginLeft="10dp"
android:layout_marginBottom="40dp"
android:clickable="false"
android:id="@+id/imageGSM"/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/hats_basla"
android:clickable="true"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_marginRight="5dp"
android:layout_marginTop="70dp"
android:id="@+id/imbKayit" />
<!-- bottom menu -->
<TableRow
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:weightSum="6" >
<RelativeLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" >
<ImageView
android:layout_width="match_parent"
android:layout_height="36dp"
android:clickable="true"
android:onClick="menuHarita"
android:gravity="center_horizontal"
android:src="@drawable/menuharita"
android:id="@+id/imgMenuHarita"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/imgMenuHarita"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Harita"
android:layout_alignParentBottom="true"
android:gravity="center_horizontal"
android:textColor="#fff" />
</RelativeLayout>
<RelativeLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" >
<ImageView
android:layout_width="match_parent"
android:layout_height="36dp"
android:clickable="true"
android:onClick="menuHarita"
android:gravity="center_horizontal"
android:src="@drawable/menuguncel"
android:id="@+id/imgMenuGuncel"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/imgMenuGuncel"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Güncelle"
android:gravity="center_horizontal"
android:textColor="#fff" />
</RelativeLayout>
<RelativeLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" >
<ImageView
android:layout_width="match_parent"
android:layout_height="36dp"
android:clickable="true"
android:onClick="menuHarita"
android:gravity="center_horizontal"
android:src="@drawable/menubilgi"
android:id="@+id/imgMenuBilgi"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/imgMenuBilgi"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="HATS"
android:gravity="center_horizontal"
android:textColor="#fff" />
</RelativeLayout>
<RelativeLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" >
<ImageView
android:layout_width="match_parent"
android:layout_height="36dp"
android:clickable="true"
android:onClick="menuHarita"
android:gravity="center_horizontal"
android:src="@drawable/menuayarlar"
android:id="@+id/imgMenuAyarlar"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/imgMenuAyarlar"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Ayarlar"
android:gravity="center_horizontal"
android:textColor="#fff" />
</RelativeLayout>
<RelativeLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" >
<ImageView
android:layout_width="match_parent"
android:layout_height="36dp"
android:clickable="true"
android:onClick="menuHarita"
android:gravity="center_horizontal"
android:src="@drawable/menuara"
android:id="@+id/imgMenuAra"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/imgMenuAra"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Ara"
android:gravity="center_horizontal"
android:textColor="#fff" />
</RelativeLayout>
<RelativeLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" >
<ImageView
android:layout_width="match_parent"
android:layout_height="36dp"
android:clickable="true"
android:onClick="menuHarita"
android:gravity="center_horizontal"
android:src="@drawable/menuradar"
android:id="@+id/imgMenuRadar"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/imgMenuRadar"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Meteo"
android:gravity="center_horizontal"
android:textColor="#fff" />
</RelativeLayout>
</TableRow>
</RelativeLayout>
Вставьте fragmnet и все другие вещи, которые должны быть посередине в строке таблицы. – Lal