jasmin
jasmin

Reputation: 13

How create and show listview in onDraw method?

I am new in Android, so please help me. In onDraw method I draw a lot of things, which I would like to have as a background. And when I click in the corner, I would like to have listview (with SeekBars, buttons, etc) and everything which i drow before as a background. This background doesn't have to scroll when the listview is scrolling. How to create and set such listview?

My .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>

Upvotes: 1

Views: 512

Answers (1)

Shachilies
Shachilies

Reputation: 1616

Make your custom view as background of whole screen . You can do this by making the root view as your custom view .Then calculate the touch on corner and make your child view i.e. list view visible .

Upvotes: 1

Related Questions