1
I’m facing a problem in layout, in this layout I have a Listview and after I have 3 more Buttons only when the list is too big it uses all screen size and I can’t see the Buttons, someone can help me?
How is the layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<EditText
android:layout_width="match_parent"
android:inputType="textPersonName"
android:ems="10"
android:id="@+id/edtPesquisa"
android:drawableLeft="@drawable/ic_lupa"
android:layout_marginTop="15dp"
android:hint="Pesquisa rápida"
tools:ignore="HardcodedText,RtlHardcoded,UnusedAttribute"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:elevation="1dp"
android:layout_height="40dp" />
<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/listDebitosPendentes"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Small"
tools:ignore="NestedScrolling"
android:footerDividersEnabled="false"/>
<Button
android:text="Enviar boleto por e-mail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/enviaBoletoEmail"
tools:ignore="HardcodedText" />
<Button
android:text="@string/enviar_linha_digit_vel_por_sms"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/enviaLinhaDigitavel" />
<Button
android:text="@string/mostrar_linha_digit_vel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/mostraLinhaDigitável" />
</LinearLayout>
It worked here, thank you very much.
– rodrigo.oliveira
Just one question, could I add this weight by java code?
– rodrigo.oliveira
I believe you have as yes, to do a search like this, vc can search more or less like this "layout_weight android programmatically" in google.
– Rodrigo Paixão