Android studio 2.0模拟器与真实设备边距

时间:2016-05-02 12:03:11

标签: android android-layout android-studio

我使用Galaxy A5作为Android应用的主要测试设备。另外,我定义了相同的设备规格。 avd经理中的avd(相同的屏幕尺寸,分辨率,平台版本号等)。但是,活动布局的某些边距在设备和模拟器上不相同。我该如何解决这个问题?

未正确绘制边距的示例(marginTop =" -20dp",marginBottom =" -22dp"):

 <ImageView
        android:id="@+id/logo"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_marginTop="@dimen/logo_margin_top"
        android:layout_marginBottom="@dimen/logo_margin_bottom"/>

0 个答案:

没有答案
相关问题