【发布时间】:2015-01-18 11:26:02
【问题描述】:
我是 Android 开发新手。我用一个简单的按钮创建了一个简单的项目。我认为 按钮在不同的屏幕尺寸上看起来是一样的,但是当我预览所有屏幕时,eclipse 显示了这个 http://imgur.com/kjEMhHx
这是xml代码
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.businessideas.MainActivity" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="116dp"
android:text="Button" />
</RelativeLayout>
能否请您帮帮我,告诉我如何设计该按钮在所有屏幕尺寸上看起来都一样? 谢谢
【问题讨论】:
标签: java android eclipse button