如何把了滚动的修复图像背景?图像、背景

2023-09-06 05:57:14 作者:秋風落葉情

我想滚动视图滚动,而不是在图像中背景

I should want the scrollview scroll, but not the image in its background.

推荐答案

一个例子是:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
 xmlns:android="http://schemas.android.com/apk/res/android"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 android:background="@drawable/background_image"
 android:orientation="vertical">

 <ListView
  android:id="@+id/category_list"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:cacheColorHint="@android:color/transparent"/>

 <TextView
  android:id="@android:id/empty"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"/>

</LinearLayout>

在这里的LinearLayout保持底色的图像。这份名单将高于此与透明背景显示。有关此主题的更多信息看看的ListView背景