Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7021461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:27:11+00:00 2026-05-27T23:27:11+00:00

I have an already established activity that must extend another activity so I’d much

  • 0

I have an already established activity that must extend another activity so I’d much rather use commonsware drag and drop TouchListView class with my existing activity rather than extend ListActivity. However, I can’t find an example of how to do this. In my activity’s xml I have included:

<com.test.dragdrop.TouchListView
            xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:tlv="http://schemas.android.com/apk/res/com.test.activities" 
            android:id="@android:id/list"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:drawSelectorOnTop="false"
            tlv:normal_height="64dip"
            tlv:expanded_height="128dip"
            tlv:grabber="@+id/icon"
            tlv:remove_mode="slideRight"
                    android:layout_centerHorizontal="true" 
                    android:layout_centerVertical="true" 
                    android:layout_below="@id/menu_bar_top_include"
                    android:layout_above="@id/footerbar_lists"
                    android:cacheColorHint="#0000" 
                    android:paddingTop="2dip"/>

Now, I’m not sure how translate this to creating it dynamically in my actvities code . I assume I have to place the code in onCreate() and create a RelativeLayout wrapper and put the TouchListView class inside of it, but again I’m not sure when it comes to a custom view class… any one do this before?

Note: I also tried to simply use :

TouchListView tlv = (TouchListView) findViewById(R.id.list);

but I get compiler errors:
— for some reason the compiler cannot find “R.id.list” — Is this because its inside a custom view? Is there some other way this needs to be specified?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:27:12+00:00Added an answer on May 27, 2026 at 11:27 pm

    There is nothing different about using TouchListView in a regular Activity than using ListView in a regular Activity. All you do is call findViewById() to get the ListView and call setAdapter() on the ListView to associate your desired ListAdapter with it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have already posted something similar here but I would like to ask the
I have already tried PreRenderComplete and unload is too late
I have already googled for this I have a Table with following structure in
I have already created a webpart to show the data from list, but I
I have already posted a question about this, but the situation has changed sufficiently
I have already search for some time over the net on how to create
I have already a site with a single homepage index.php which accepts 2 parameters
I have already implemented some AJAX pagination in my Rails app by using the
I have already have this code to force these URLs to HTTPS: RewriteCond %{HTTPS}
I have already built a site from scratch. It has banning, PM, comments, etc.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.