Polsterung funktioniert nicht Android
Den folgenden code aus dem layout habe ich die Planung für meine app. Das problem ist, die Schaltfläche zu überlappen, ein Klartext-box, so dass ich zusätzlichen Polsterung in der button-code, wie unten gezeigt, aber die Vorschau wird noch angezeigt-Taste, um überschneidungen der textbox. Was ist das problem? Bin ich etwas fehlt?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="100"
android:padding="25dp" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="30"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10" >
<requestFocus />
</EditText>
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />
<EditText
android:id="@+id/editText2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />
<EditText
android:id="@+id/editText3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />
<EditText
android:id="@+id/editText4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />
<EditText
android:id="@+id/editText5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10" />
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />
<EditText
android:id="@+id/editText6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10" />
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:layout_weight="40">
<Button
android:id="@+id/button1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="20dp"
android:text="Button" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="30"
android:orientation="vertical">
<AnalogClock
android:id="@+id/analogClock1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</LinearLayout>
Vielen Dank für Ihre Hilfe!
InformationsquelleAutor Alfred James | 2012-08-05
Du musst angemeldet sein, um einen Kommentar abzugeben.
Es scheint, dass Sie sich trennen wollen zwei Ansichten. Sie verwenden sollten, margin statt padding in ur-Ansichten.
Können Sie geben, Rand Links,rechts, oben, unten, nach Ihrem Bedarf.
weil Polsterung ist innerhalb einer Sicht. Rand außerhalb der Ansicht. finden Sie unter diesem link..stackoverflow.com/a/4619943/519718
und Sie nicht angenommen, Polsterung geben Sie im Layout-tag.. geben Sie Sie an Blick in layout..
aber das tutorial habe ich bin folgenden, sagt, die wir geben können, Polsterung Gewicht im linearen layout. Wie in diesem Fall.
InformationsquelleAutor AAnkit
Können Sie auch Platz, aber es funktioniert nur auf 4.0 und höher.
InformationsquelleAutor TheBlueCat
Wäre es besser, wenn Sie getrennte lineare layout für jedes Element, und setzen Sie Polsterung.
InformationsquelleAutor Peter