Checkbox and Textview alignment with white space

Liisast

New Member
I have a problem with my XML layout. As you see in the image below, the textview is next to the checkbox (which doesn't include any \[code\]android:text\[/code\] field . How can I remove the space I've underlined with blue?
0ll5e.png
Code:\[code\] <?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" > <Button android:id="@+id/bDisinstalla" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginTop="5dp" android:text="@string/disinstalla" android:textColor="#FF0000" android:textSize="26dp" /> <ScrollView android:id="@+id/scrollView1" android:layout_width="match_parent" android:layout_height="wrap_content" android:fadeScrollbars="true" > <TableLayout android:id="@+id/tableLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" > <CheckBox android:id="@+id/cbAbilitaServizio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/abilita_servizio" > </CheckBox> <CheckBox android:id="@+id/cbSpegniSchermo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/spegni_schermo" > </CheckBox> <CheckBox android:id="@+id/cbLandscape" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/landscape" > </CheckBox> <Button android:id="@+id/bCalibrazione" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:text="@string/calibrazione" />\[/code\]Problematic code:\[code\] <!-- BELOW THERE IS THE PROBLEMATICCODE --> <!-- BELOW THERE IS THE PROBLEMATICCODE --> <!-- BELOW THERE IS THE PROBLEMATICCODE --> <!-- BELOW THERE IS THE PROBLEMATICCODE --> <TableRow android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:background="@drawable/ripetisfondo" android:padding="1dp" > <CheckBox android:id="@+id/checkBox1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#000000" /> <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:shadowColor="#000000" android:shadowDx="1" android:shadowDy="1" android:shadowRadius="2" android:text="@string/titolo1" android:textColor="#FFFFFF" android:textSize="15dp" android:textStyle="bold" /> </TableRow> <!-- TITOLO TITOLO TITOLO TITOLO TITOLO TITOLO TITOLO -->\[/code\]Rest of the code:\[code\] <!-- TITOLO TITOLO TITOLO TITOLO TITOLO TITOLO TITOLO --> <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#33b5e5" android:padding="1dp" > </TableRow> <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#555555" android:padding="1dp" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:text="@string/impostazioni_5" android:textSize="15dp" android:textStyle="bold" /> </TableRow> <!-- TITOLO TITOLO TITOLO TITOLO TITOLO TITOLO TITOLO --> <SeekBar android:id="@+id/sbNumeroPassate" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" /> <LinearLayout> <TextView android:id="@+id/tvMilliseconds" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:text="@string/impostazioni_1a" /> <TextView android:id="@+id/tvCurrentWaves" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:text="@string/impostazioni_current" /> </LinearLayout> <LinearLayout> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:text="@string/impostazioni_2a" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:text="@string/impostazioni_4a" /> </LinearLayout> <!-- TITOLO TITOLO TITOLO TITOLO TITOLO TITOLO TITOLO --> <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#33b5e5" android:padding="1dp" > </TableRow> <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#555555" android:padding="1dp" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:text="@string/impostazioni_6" android:textSize="15dp" android:textStyle="bold" /> </TableRow> <!-- TITOLO TITOLO TITOLO TITOLO TITOLO TITOLO TITOLO --> <SeekBar android:id="@+id/sbMillisecTraPassate" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" /> <LinearLayout> <TextView android:id="@+id/tvMilliseconds" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:text="@string/impostazioni_1b" /> <TextView android:id="@+id/tvCurrentInterval" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:text="@string/impostazioni_current" /> </LinearLayout> <LinearLayout> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:text="@string/impostazioni_2b" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:text="@string/impostazioni_4b" /> </LinearLayout> <!-- TITOLO TITOLO TITOLO TITOLO TITOLO TITOLO TITOLO --> <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#33b5e5" android:padding="1dp" > </TableRow> <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#555555" android:padding="1dp" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:text="@string/impostazioni_7" android:textSize="15dp" android:textStyle="bold" /> </TableRow> <!-- TITOLO TITOLO TITOLO TITOLO TITOLO TITOLO TITOLO --> <LinearLayout> <TextView android:id="@+id/tvAccensioni" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:text="@string/statistica_1" /> <TextView android:id="@+id/tvSpegnimenti" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:text="@string/statistica_2" /> </LinearLayout> <LinearLayout> <TextView android:id="@+id/tvPotenzaUsata" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:text="@string/statistica_3" /> <TextView android:id="@+id/tvBottoneSalvato" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:text="@string/statistica_4" /> </LinearLayout> <Button android:id="@+id/bSalva" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginTop="10dp" android:text="@string/impostazioni_salva" /> </TableLayout> </ScrollView></LinearLayout> \[/code\]
 
Back
Top