我想補充一個背景圖片,黑色ImageView的同時恢復活動或軟鍵盤更改
下面是XML代碼
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:id="@+id/chatroompage"
android:background="#EEEEEE"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/background"
android:scaleType="centerCrop"/>
</RelativeLayout>
我用滑翔加載圖像。
Glide.with(this).load(imageuri).into(background);
在第一次加載時工作正常。但是當我使用鍵盤或恢復活動時,圖像變黑。
thanx的幫助。
從移除背景'RelativeLayout'另外使用佔位符圖像而被加載的圖像。 –
我需要RelativeLayout背景,使用圖像背景是可選的。如果設置有圖像背景,然後我添加代碼的圖像背景 – Kim
但我會嘗試這樣做, – Kim