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

  • SEARCH
  • Home
  • 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 7572425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:55:20+00:00 2026-05-30T15:55:20+00:00

Since java does not support multiple inheritance I have a problem getting this to

  • 0

Since java does not support multiple inheritance I have a problem getting this to work.

This is what I want to do :

public class CallForwardActivity extends ListActivity /* This is there I want to extend AsyncTask */ implements OnSharedPreferenceChangeListener
{

... // creating and initializing stuff

@Override
public void onCreate(Bundle savedInstanceState) 
{
    super.onCreate(savedInstanceState);

    userInfo = this.getSharedPreferences(USERINFO_FILE, 0);
    userInfo.registerOnSharedPreferenceChangeListener(this);
    userControl = new UserController(context);
    ListView lv = getListView();
    lv.setTextFilterEnabled(true);
    //setListAdapter(new ArrayAdapter<String>(this, R.layout.callforward_items, R.id.callforward_item_text, callforwardLabels));

    list = new ArrayList<HashMap<String,String>>();

    callForwardList = new SimpleAdapter( 
            this, 
            list,
            R.layout.callforward_items,
            new String[] { "line1","line2" },
            new int[] { R.id.callforward_item_text, R.id.callforward_number } );



    populateList();
    setListAdapter( callForwardList );

    lv.setOnItemClickListener(new OnItemClickListener() {

    public void onItemClick(AdapterView<?> parent, View view, int position, long id) 
    {
        CustomDialog(); // this will make the asynchronous task call if the user presses "OK" within the dialog box.
    }

  });

}

How do I go about making the call asynchronous without extending AsyncTask ?

  • 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-30T15:55:21+00:00Added an answer on May 30, 2026 at 3:55 pm

    Just create another class that extends AsyncTask and use it in your ListActivity. You can make it inner if you like. Hope this helps.

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

Sidebar

Related Questions

Since JavaScript is not derived from Java, why does it have Java in the
As I understand it, Java does not have true closures. You can pass a
So I'm not sure how stackoverflow friendly this question is since it doesn't have
I have to use a Java API for a project, but since I'm not
What is an alternative function for the goto keyword in Java? Since Java does
I have been programming in Java since 2004, mostly enterprise and web applications. But
It seems that nginx does not support chunked requests well. But I'm trying to
It's been a couple of years since I've done any Java work, my last
I made this small Java program using eclipse IDE. I have set the workspace
We have a need to generate Java source code. We do this by modeling

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.