【发布时间】:2015-11-09 04:37:01
【问题描述】:
我正在使用我的 s4 Samsung 设备制作图像,我试图将其作为我的应用程序的初始图像,但我面临的问题是图像显示为宽空白框架。如何删除它?
XML 文件:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@+id/fl_draw"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/splash_background"
android:rotation="90"
android:adjustViewBounds="true" />
</FrameLayout>
</RelativeLayout>
我之前在 LinearLayout 中将图像显示为下面的代码,但它显示为 horozintal:
之前的代码:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background= "@drawable/splash_background"
>
</LinearLayout>
尝试哈桑解决方案前的截图:
在尝试了哈桑解决方案 android:scaleType="centerCrop"
【问题讨论】:
-
可以添加截图吗?
标签: android