1

我是Android新手,所以请帮助我。在 onDraw 方法中,我画了很多东西,我想把它们作为背景。当我点击角落时,我想要列表视图(带有 SeekBars、按钮等)以及我之前作为背景绘制的所有内容。当列表视图滚动时,此背景不必滚动。如何创建和设置这样的列表视图?

我的.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal" >

<com.project.MyView
    android:id="@+id/main_view"
    android:layout_width="wrap_content"
    android:layout_height="fill_parent" />

</LinearLayout>
4

1 回答 1

1

将您的自定义视图作为整个屏幕的背景。您可以通过将根视图作为您的自定义视图来做到这一点。然后计算触摸角并使您的子视图(即列表视图可见)。

于 2012-05-08T09:40:29.357 回答