Good afternoon I'm doing an app for studies, and I'm encountering a little problem is not a bug, but come on, this is my home screen:
As it is in the print below, I have a relative layout that has 1 note with its edittext and weight with its edittext.
When I click on the + one that is an Imagebutton it will enter the setonclicklistnner and visible arrow to another relative layout that is just below ...
Inthispartthatiscircledinredisanotherelementthatisinsidearelativelayoutthathasitsownid,inthatxitinvisiblearrowpronote2,gettingasitwasinimagetwo...
Nowafterexplaining,myquestionishowdoIgetthatblankpartwheretheotherrelativesomalayoutlies?asiftherewasnothingthere,andthattheresultandthesumareclosetonote1?
Mylayoutcodeisthis:
<?xmlversion="1.0" encoding="utf-8"?>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:text="Nome da Matéria:"
android:textSize="16dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text="Name"
android:ems="10"
android:id="@+id/editText2" />
</RelativeLayout>
<RelativeLayout
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:text="Nota 1:"
android:textSize="18dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textView2"
android:textAllCaps="false" />
<TextView
android:text="Peso"
android:layout_marginLeft="120dp"
android:textSize="18dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textView3" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:layout_width="100dp"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:text=""
android:ems="10"
android:id="@+id/editText3"
/>
<EditText
android:layout_width="100dp"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:text=""
android:ems="10"
android:id="@+id/editText"
android:fontFamily="sans-serif"
android:layout_marginLeft="120dp"
/>
<ImageButton
android:layout_width="wrap_content"
android:background="#fff"
android:layout_marginLeft="220dp"
android:src="@drawable/plus_one"
android:id="@+id/more1"
android:layout_height="wrap_content" />
</RelativeLayout>
<RelativeLayout
android:visibility="invisible"
android:id="@+id/lig1"
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:text="Nota 2:"
android:textSize="18dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAllCaps="false" />
<TextView
android:text="Peso"
android:layout_marginLeft="120dp"
android:textSize="18dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
<RelativeLayout
android:visibility="invisible"
android:id="@+id/lig1.1"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:layout_width="100dp"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:text=""
android:ems="10"
android:id="@+id/editText4"
/>
<EditText
android:layout_width="100dp"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:text=""
android:ems="10"
android:id="@+id/editText5"
android:fontFamily="sans-serif"
android:layout_marginLeft="120dp"
/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/closerlig1"
android:background="#fff"
android:layout_marginLeft="220dp"
android:src="@drawable/close_box_outline"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:text="TextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textView4"
android:textSize="20sp" />
<Button
android:text="Somar"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/resultado"
android:textAllCaps="false" />
</RelativeLayout>