问题描述
相关的xml代码:
<LinearLayout
android:layout_width="409dp"
android:layout_height="579dp"
android:orientation="vertical"
app:layout_constraintTop_toBottomOf="@+id/title_top"
app:layout_constraintBottom_toTopOf="@id/title_bottom"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:gravity="center_horizontal"
tools:layout_editor_absoluteX="1dp">
<ImageView
android:id="@+id/imageView3"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintTop_toBottomOf="parent"
android:src="@drawable/elenas_shepherd"
app:layout_constraintLeft_toLeftOf="parent"
android:contentDescription="@string/splash_description"
/>
</LinearLayout>
(我只包括内部布局和ImageView;如果需要,我可以包括更多内容。)
图像“ elenas_shepherd”看起来像牧羊人。但是,Android Studio的布局工具会显示以下内容:
这看起来像是普通图像。该图像在设备上显示正常,但其父设备溢出。我也不明白,但是我可以肯定地说,如果我能先说服Android Studio显示图片,就可以解决溢出问题。