Tecnologia do Blogger.
RSS

Re: [androidbrasil-dev] [Dúvida] Lista com LinearLayout + Adapter Custom

Sim.

Em quinta-feira, 25 de julho de 2013 14h14min28s UTC-3, Rudson Lima escreveu:

Isso é uma imagem android:background="@drawable/backgroundmobile"?


Em 25 de julho de 2013 12:55, brian-desouza <brian-...@hotmail.com> escreveu:
Olá a todos!
Meu problema é o seguinte, montei um xml para exibir um lista de documentos cadastrados e esse xml é inflado por um adapter customizado. Se eu não setar o background do xml a lista é exibida em tamanho normal (cada linha ocupando apenas o espaço necessário para "abrigar" os 2 textview lado a lado). Porém se eu setar o background, cada linha da minha lista acaba ocupando o tamanho da tela.
Segue abaixo meu XML:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   
android:layout_width="fill_parent"
   
android:layout_height="fill_parent"
   
android:orientation="vertical"
   
android:background="@drawable/backgroundmobile">

 
    <LinearLayout
       
android:layout_width="fill_parent"
       
android:layout_height="wrap_content"
       
android:orientation="horizontal" >


        <TextView
           
android:id="@+id/lbl1"
           
android:layout_width="0dp"
           
android:layout_height="wrap_content"
           
android:layout_marginLeft="10dp"
           
android:layout_weight="1"
           
android:text="@string/tv_doc"
           
android:textAppearance="?android:attr/textAppearanceMedium"
           
android:textColor="@android:color/white" />


        <TextView
           
android:id="@+id/lbl2"
           
android:layout_width="wrap_content"
           
android:layout_height="wrap_content"
           
android:layout_marginLeft="10dp"
           
android:layout_weight="3"
           
android:text="@string/tv_pn"
           
android:textAppearance="?android:attr/textAppearanceMedium"
           
android:textColor="@android:color/white" />

    </LinearLayout>

    <LinearLayout
       
android:layout_width="fill_parent"
       
android:layout_height="wrap_content"
       
android:layout_marginTop="20dp"
       
android:orientation="horizontal" >


        <TextView
           
android:id="@+id/tvId"
           
android:layout_width="wrap_content"
           
android:layout_height="wrap_content"
           
android:layout_marginLeft="10dp"
           
android:layout_weight="1"
           
android:textColor="@android:color/white" />


        <TextView
           
android:id="@+id/tvPn"
           
android:layout_width="wrap_content"
           
android:layout_height="wrap_content"
           
android:layout_marginLeft="10dp"
           
android:layout_weight="3"
           
android:textColor="@android:color/white" />

    </LinearLayout>
       

   

</LinearLayout>


--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Atenciosamente,
Rudson Lima

+ Desenvolvedor Delphi - NpInfo
+ Desenvolvedor Android - NpInfo

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comentários:

Postar um comentário