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 8259373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:50:51+00:00 2026-06-08T02:50:51+00:00

On Android 2.2 mContext=context (or anything else I put there) is never called. It

  • 0

On Android 2.2 mContext=context (or anything else I put there) is never called. It does work on 2.3+.
Is it a known issue? Is there a workaround?

public class ExpListCursorAdapter extends SimpleCursorTreeAdapter {
    Context mContext;

    public ExpListCursorAdapter(Context context, Cursor cursor,
            int groupLayout, String[] groupFrom, int[] groupTo,
            int childLayout, String[] childFrom, int[] childTo) {
         super(context, cursor, groupLayout, groupFrom, groupTo, childLayout, childFrom,
            childTo);
        mContext=context;
}

    @Override
    protected Cursor getChildrenCursor(Cursor groupCursor) {
        int id=groupCursor.getInt(DatabasePazienti.ROWID);
        DatabaseTests mDbTests=new DatabaseTests(mContext);
        mDbTests.open();

        Cursor cursor=mDbTests.fetchPatientTests(id);
        return cursor;
    }
  • 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-06-08T02:50:53+00:00Added an answer on June 8, 2026 at 2:50 am

    The implementation of SimpleCursorTreeAdapter in the API 2.2 is different from API 2.3.
    As you can see in here:

    API 2.2

    http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/widget/SimpleCursorTreeAdapter.java

    API 2.3

    http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.3_r1/android/widget/SimpleCursorTreeAdapter.java

    When you use API 2.2 it says mContext = context is never called due to the sequence of the methods that are called in the constructor.

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

Sidebar

Related Questions

there is class, that draws on canvas some field package com.cerbertek; import android.content.Context; import
I am very new to Android. I am trying to build inflate a context
AlertDialog.Builder builder; AlertDialog alertDialog; Context mContext = getApplicationContext(); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(LAYOUT_INFLATER_SERVICE); View
I have this code package com.cerbertek; import java.util.ArrayList; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory;
So I'm just trying to create a generic mapView in android and put a
In my android app I often instantiate the following objects. mWidget = new ComponentName(mContext,
android noob... I have two tables, with a one to many relationship between country_tbl
Android kills my service in the package com.net.myspeechservice under some certain scenarios, for example
Android programming. I have a json returning the date from a database as a
Android defines screen sizes as Normal Large XLarge etc. It automatically picks between static

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.