Я ударил по концепции макета веса, которому нужно поместить текст ниже для каждого изображения, и я попробовал много методов в концепции веса, но textView собирается где-то. Я прикрепил свой xml здесь, и если у кого-нибудь есть предложение, дайте мне идею решить эту проблему .THANKS заранееКак разместить текстовое изображение ниже каждого изображения?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/topBar"
style="@style/IconBar"
android:layout_width="match_parent"
android:layout_height="90dp"
android:baselineAligned="true"
android:orientation="horizontal"
android:weightSum="4" >
<ImageButton
android:id="@+id/home"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="0.8"
android:background="@android:color/transparent"
android:src="@drawable/glow"
android:visibility="gone"/>
<RelativeLayout
android:id="@+id/relative"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/imageLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_weight="0.8"
android:src="@drawable/glow"/>
<TextView
android:id="@+id/textLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/imageLabel"
android:layout_centerInParent="true"
android:singleLine="true"
android:text="Israel News"
android:textSize="18sp"
android:textStyle="bold"/>
</RelativeLayout>
<ImageButton
android:id="@+id/email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="0.8"
android:background="@android:color/transparent"
android:src="@drawable/glow" />
<ImageButton
android:id="@+id/place"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="0.8"
android:background="@android:color/transparent"
android:src="@drawable/glow" />
<ImageButton
android:id="@+id/account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="0.8"
android:background="@android:color/transparent"
android:src="@drawable/glow" />
<ImageButton
android:id="@+id/accounts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="0.8"
android:background="@android:color/transparent"
android:src="@drawable/glow" />
</LinearLayout>
Где TextViews? – akash93
@ akash93Обновлен мой код – HsRaja
«layout_weight» должен быть привязан к прямому потомку «LinearLayout», в этом случае «RelativeLayout» – akash93