TextView below Image not showing up in Android -
i trying put text below image not showing in android layout.
here screenshot:
i dont' see text below image.
and code: inside relative layout
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/layout_footer" android:layout_width="match_parent" android:gravity="center" android:layout_height="?android:attr/actionbarsize" android:background="@color/panelcolor" > <imageview android:id="@+id/searchicon" android:layout_width="wrap_content" android:layout_height="match_parent" android:paddingright="60dp" android:src="@drawable/search_white" /> <textview android:id="@+id/searchtext" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingright="60dp" android:textcolor="@color/whitetext" android:layout_below="@+id/searchicon" android:text="search" /> <imageview android:id="@+id/homeicon" android:layout_width="wrap_content" android:layout_height="match_parent" android:paddingright="60dp" android:layout_torightof="@+id/searchicon" android:src="@drawable/ic_home" /> <textview android:id="@+id/hometext" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingright="60dp" android:textcolor="@color/whitetext" android:layout_below="@+id/homeicon" android:text="home" /> <imageview android:id="@+id/wishicon" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_torightof="@+id/homeicon" android:src="@drawable/ic_favorite" /> <textview android:id="@+id/wishtext" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingright="60dp" android:textcolor="@color/whitetext" android:layout_below="@+id/wishicon" android:text="wish list" /> <imageview android:id="@+id/viewicon" android:layout_width="wrap_content" android:layout_height="match_parent" android:paddingleft="60dp" android:layout_torightof="@+id/wishicon" android:src="@drawable/ic_eye" /> <textview android:id="@+id/viewtext" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingright="60dp" android:textcolor="@color/whitetext" android:layout_below="@+id/wishicon" android:text="viewed" /> </relativelayout>
not sure wrong?
the problem have put android:layout_height="match_parent"
image views , android:layout_height="wrap_content"
text views. either use wrap_content
image view or use use linearlayout android:weight
property. using linearlayout solve problem of alignment if occurs!
Comments
Post a Comment