【发布时间】:2017-01-15 15:18:44
【问题描述】:
我想删除TextView 和Button 之间的空格
我尝试了很多选择,但现在没有人工作。
提前感谢,任何帮助将不胜感激。
the xml code and preview
这是代码
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.android.myapplication.MainActivity">
<TextView
android:layout_margin="0dp"
android:gravity="center"
android:textColor="#000000"
android:textSize="33sp"
android:text="hello"
android:background="#cc3"
android:layout_width = "match_parent"
android:layout_height = "0dp"
android:layout_weight = "3"/>
<Button
android:layout_margin="0dp"
android:layout_width = "match_parent"
android:layout_weight = "1"
android:layout_height = "0dp"
android:text="Click"/>
</LinearLayout>
【问题讨论】:
-
试试这里讨论的一些东西:stackoverflow.com/questions/17960599/…
标签: android view space android-layout-weight