0

您好,我是 android 编程(和 stackoverflow)的初学者!

我有一个具有 RelativeLayout 的活动(我将其称为 rl1 以便更容易理解)布局类型。在 rl1 内部,我有一个带有字符串和图像的自定义列表视图,我在 rl1 内添加了另一个 RelativeLayout(我将其称为 rl2)。rl2 位于列表视图之上。我想在 rl1 内的新 RelativeLayout (rl2) 上画一些东西。发生这种情况是因为我希望能够绘制线条和形状,同时在我的列表视图中编辑字符串和图像,并且要做非常基本的操作,请查看我的自定义列表视图(它就像屏幕的 1/3为列表视图绘制内容和屏幕的 2/3;我不想将此操作分成两个单独的活动,我想使用相同的活动/屏幕)。
我怎样才能做到这一点?我没有走好路?任何想法或网络教程都可以扔给我xD

干杯

4

2 回答 2

0

请尝试使用以下代码。

        <RelativeLayout
            android:layout_width="fill_parent"
            android:layout_height="0dip"
            android:layout_weight="1" >

            <com.multicom.pulltorefreshlistview.PullToRefreshView
                android:id="@+id/listView"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:cacheColorHint="@android:color/transparent"
                android:clipChildren="false"
                android:divider="@android:color/transparent"
                android:dividerHeight="0dp"
                android:footerDividersEnabled="false"
                android:headerDividersEnabled="false"
                android:listSelector="@android:color/transparent"
                android:longClickable="false" >
            </com.multicom.pulltorefreshlistview.PullToRefreshView>

         </RelativeLayout>

        </RelativeLayout>


</LinearLayout>
于 2013-05-15T06:45:51.810 回答
0

解决了我的问题!答案在这里:

http://javandroidevelop.blogspot.pt/2012/09/all-about-surfaceview-android-lessons.html

很棒的教程!无论如何感谢尼莱什帕特尔。

于 2013-05-20T22:14:14.803 回答