android - Descendents layouts not appearing -
i'm trying define more 1 linearlayout fit form , button bar @ bottom of activity it's not appearing, before changes forms scrollview
, removed because not use anymore, when removed layout not appearing anymore, has solutions did wrong ? or forget ?
here new code, when turn orientation landscape buttons disappear. how can fix ?
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:focusableintouchmode="true" android:orientation="vertical" > <scrollview android:layout_width="match_parent" android:layout_height="wrap_content" > <linearlayout android:layout_width="match_parent" android:layout_height="0dp" android:orientation="vertical" > <textview android:layout_width="match_parent" android:layout_height="match_parent" android:text="cliente: " android:textsize="18sp" /> <framelayout android:layout_width="match_parent" android:layout_height="wrap_content" > <br.com.stara.iris.mobile.tmp.delayautocompletetextview android:id="@+id/nota_cliente" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="2" android:imeoptions="flagnoextractui|actionsearch" android:inputtype="textcapsentences" /> <progressbar android:id="@+id/nota_cliente_loading_indicator" style="?android:attr/progressbarstylesmall" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical|end" android:layout_marginend="@dimen/margin_default" android:visibility="gone" /> </framelayout> <textview android:layout_width="match_parent" android:layout_height="match_parent" android:text="dados dispositivo: " android:textsize="18sp" /> <spinner android:id="@+id/dadosdispo" android:layout_width="match_parent" android:layout_height="wrap_content" /> <textview android:layout_width="match_parent" android:layout_height="match_parent" android:text="número de série: " android:textsize="18sp" /> <edittext android:id="@+id/nota_numeroserie" android:layout_width="match_parent" android:layout_height="match_parent" android:hint="digite o n° serie" android:maxlength="18" /> <textview android:layout_width="match_parent" android:layout_height="match_parent" android:text="descrição: " android:textsize="18sp" /> <edittext android:id="@+id/nota_descricao" android:layout_width="match_parent" android:layout_height="120dp" android:hint="digite descrição" /> </linearlayout> </scrollview> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center|bottom" android:orientation="horizontal" > <button android:id="@+id/btn_nota_itenslist" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="3dp" android:background="@drawable/button_selector" android:text="itens" /> <button android:id="@+id/btn_nota_ordenslist" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="3dp" android:background="@drawable/button_selector" android:text="ordens" /> <button android:id="@+id/btn_nota_limpar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="3dp" android:background="@drawable/button_selector" android:text="limpar" /> <button android:id="@+id/btn_nota_salvar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="3dp" android:background="@drawable/button_selector" android:text="salvar" /> </linearlayout> </linearlayout>
and here want, when turns landscape mode buttons don't disappear, , figure out in way don't know if right or not.
and tag android:gravity="center|bottom"
wish set these bar button in last line
of activity last widget bar lets these way, i'm not figuring out how?
and how can split equal size of buttons fit size of screen ?
only need change layout_height
0dp
of scrollview
apply weight 1 not linearlayout
(which inside scrollview) this
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:focusableintouchmode="true" android:orientation="vertical" > <scrollview android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" > <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <textview android:layout_width="match_parent" android:layout_height="match_parent" android:text="cliente: " android:textsize="18sp" /> <framelayout android:layout_width="match_parent" android:layout_height="wrap_content" > <br.com.stara.iris.mobile.tmp.delayautocompletetextview android:id="@+id/nota_cliente" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="2" android:imeoptions="flagnoextractui|actionsearch" android:inputtype="textcapsentences" /> <progressbar android:id="@+id/nota_cliente_loading_indicator" style="?android:attr/progressbarstylesmall" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical|end" android:layout_marginend="@dimen/margin_default" android:visibility="gone" /> </framelayout> <textview android:layout_width="match_parent" android:layout_height="match_parent" android:text="dados dispositivo: " android:textsize="18sp" /> <spinner android:id="@+id/dadosdispo" android:layout_width="match_parent" android:layout_height="wrap_content" /> <textview android:layout_width="match_parent" android:layout_height="match_parent" android:text="número de série: " android:textsize="18sp" /> <edittext android:id="@+id/nota_numeroserie" android:layout_width="match_parent" android:layout_height="match_parent" android:hint="digite o n° serie" android:maxlength="18" /> <textview android:layout_width="match_parent" android:layout_height="match_parent" android:text="descrição: " android:textsize="18sp" /> <edittext android:id="@+id/nota_descricao" android:layout_width="match_parent" android:layout_height="120dp" android:hint="digite descrição" /> </linearlayout> </scrollview> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center|bottom" android:orientation="horizontal" > <button android:id="@+id/btn_nota_itenslist" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:layout_margin="3dp" android:background="@drawable/button_selector" android:text="itens" /> <button android:id="@+id/btn_nota_ordenslist" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:layout_margin="3dp" android:background="@drawable/button_selector" android:text="ordens" /> <button android:id="@+id/btn_nota_limpar" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:layout_margin="3dp" android:background="@drawable/button_selector" android:text="limpar" /> <button android:id="@+id/btn_nota_salvar" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:layout_margin="3dp" android:background="@drawable/button_selector" android:text="salvar" /> </linearlayout> </linearlayout>
Comments
Post a Comment