填充不能使用Android

以下代码来自我为我的应用程序设计的布局.问题是,Button与PlainText框重叠,所以我在按钮代码添加了填充,如下所示,但预览仍显示Button与文本框重叠.有什么问题?我错过了什么吗?
<?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>

谢谢你的帮助!

解决方法

看来你想要分开两个视图.你应该在你的视图中使用margin而不是padding.
android:layout_marginLeft="10dp"

您可以根据需要在左,右,上,下给出保证金.

相关文章

这篇“android轻量级无侵入式管理数据库自动升级组件怎么实现...
今天小编给大家分享一下Android实现自定义圆形进度条的常用方...
这篇文章主要讲解了“Android如何解决字符对齐问题”,文中的...
这篇文章主要介绍“Android岛屿数量算法怎么使用”的相关知识...
本篇内容主要讲解“Android如何开发MQTT协议的模型及通信”,...
本文小编为大家详细介绍“Android数据压缩的方法是什么”,内...