0
我有问题,即我的TableRows之间有大的空间。我怎样才能删除它们?我用0dp
设置了保证金和填充,但没有变化。与TableRows之间的大空间
android:layout_marginTop="57dp"
android:paddingTop="10dp"
复选框,你做:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_margin="0dp"
android:padding="0dp"
>
<TableLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_ohne"
>
<TableRow
android:layout_weight="1"
>
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="Herzlichen Glückwunsch! Dein Highscore beträgt: " />
</TableRow>
<TableRow
android:layout_weight="1"
android:paddingTop="10dp">
<TextView
android:id="@+id/tvPunkte"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="" />
</TableRow>
<TableRow
android:layout_weight="1"
>
<EditText
android:id="@+id/etName"
android:ems="10"
android:layout_width="wrap_content"
android:hint="Dein Name"
android:inputType="text|textCapSentences" >
<requestFocus /> </EditText>
</TableRow>
<TableRow
android:layout_weight="1"
>
<EditText
android:id="@+id/etEmail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Deine E - Mail Adresse"
android:inputType="textEmailAddress" >
</EditText>
</TableRow>
<TableRow
android:layout_weight="1"
>
<EditText
android:id="@+id/etWohnort"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Dein Wohnort"
android:inputType="text|textCapSentences" />
</TableRow>
<TableRow
android:layout_weight="1"
>
<CheckBox
android:id="@+id/cbNewsletter"
android:layout_marginTop="57dp"
android:layout_width="wrap_content"
android:text="Für Wüstenfest Newsletter eintragen"
android:textStyle="bold" />
</TableRow>
<TableRow
android:layout_weight="1"
>
<Button
android:id="@+id/btHighscore"
android:layout_width="wrap_content"
android:background="@drawable/highscoresenden"
android:paddingTop="10dp" />
</TableRow>
<TableRow
android:layout_weight="1"
>
<TextView
android:id="@+id/tvVerlosung"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Um an der Verlosung teilzunehmen, musst du Name, E-Mail Adresse und Wohnort richtig ausfüllen:" />
</TableRow>
</TableLayout>
</ScrollView>
不幸的是,我仍然有这样的空间,就像你在我添加的截图中看到的那样! – user896692
然后停止给予不必要的重量。 –
除非我建议您使用线性布局而不是TableLayout。它会很容易使用。 –