java - “LinearLayout or its RelativeLayout parent is useless” warning -
i need use layout_below property of relativelayout , weightsum property of linearlayout.
the code works disappointing warning.
i'm doing wrong?
tyvm!
code attached:
<relativelayout android:id="@+id/filtro" android:layout_width="fill_parent" android:layout_height="42dp" android:background="@color/grisoscuro" android:layout_below="@+id/header_separator_filtro" > <linearlayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:weightsum="1.0"> <button android:id="@+id/btfiltrocategoriasnoticias" android:layout_height="wrap_content" android:layout_weight=".5" android:layout_width="0dp" android:textcolor="@color/blanco" android:gravity="center" android:textsize="16sp" android:background="@color/grisoscuro" android:text="@string/bt_noticias_categorias" style="?android:attr/borderlessbuttonstyle" /> <button android:id="@+id/btbusqueda" android:layout_height="wrap_content" android:layout_weight=".5" android:layout_width="0dp" android:textsize="12sp" android:background="@color/grisoscuro" style="?android:attr/borderlessbuttonstyle" /> </linearlayout> </relativelayout>
layout_below
property doesn't have belong relativelayout
, can modify code , rid of relativelayout
this:
<linearlayout android:id="@+id/filtro" android:layout_width="fill_parent" android:layout_height="42dp" android:background="@color/grisoscuro" android:layout_below="@+id/header_separator_filtro" android:weightsum="1.0"> <button android:id="@+id/btfiltrocategoriasnoticias" android:layout_height="wrap_content" android:layout_weight=".5" android:layout_width="0dp" android:textcolor="@color/blanco" android:gravity="center" android:textsize="16sp" android:background="@color/grisoscuro" android:text="@string/bt_noticias_categorias" style="?android:attr/borderlessbuttonstyle" /> <button android:id="@+id/btbusqueda" android:layout_height="wrap_content" android:layout_weight=".5" android:layout_width="0dp" android:textsize="12sp" android:background="@color/grisoscuro" style="?android:attr/borderlessbuttonstyle" /> </linearlayout>
Comments
Post a Comment