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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:09:22+00:00 2026-05-29T04:09:22+00:00

While I’m developing Android-Apps I like to have a look at internal SDK implementations.

  • 0

While I’m developing Android-Apps I like to have a look at internal SDK implementations. It’s a huge Framework and sometimes it helps a lot if you know, how internal Methods are implemented.

Now the last source-check I have done is really confusing to me. I looked at Context class to read some implementations. Unfortunately most of them are abstract, that’s why Android invents the ContextWrapper, (a simple Adapter Pattern).

The problem is, that I couldn’t find some Methods I’m interested in. Lets take getResources as Example. I have a ContextObject and call getResources on it. This Context is an instance of Activity (which is not implementing getResources() by itself).

Same for ContextThemeWrapper which is the direct parent-class of Activity. The ContextWrapper then invokes getResources() on its Context member. But who is implementing it then?

EDIT: added Snippet from ContextWrapper

public class ContextWrapper{
    Context mContext

    public ContextWrapper(Context ctx){
        mContext = ctx
    }

    public Resourced getResources(){
        return mContext.getResources()
    }

    //... all other Methods are implementing the same AdapterPattern
}

so the question can also be “which Context is passed to ContextWrapper, which is implementing required methods”

  • 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-29T04:09:23+00:00Added an answer on May 29, 2026 at 4:09 am

    I finally found it out myself with the helpful tip from nicholas.hausschild, to just to run the debugger.

    Unfortunatly this seems to be the only way, to find that out, because it’s implemented in a Class called ContextImpl, which is package-readable (though not documented). You have to install Eclipse source-code plugin (which seems to be a little buggy to install, if you had downloaded and linked the Android-SDK to eclipse already) to see the sources.

    For anyone who is interested in these sources: clickme

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

Sidebar

Related Questions

While i click the submit button the form will look like below with error
While editing and fixing up code I have thought that sometimes it would be
While I do a program, sometimes I've got this doubt. I have been using
while reading cocoa fundamental guide i have gone through: (void)addObserver:(id)notificationObserver selector:(SEL)notificationSelector name:(NSString *)notificationName object:(id)notificationSender
While I'm using %g as format specifier in printf() , sometimes it rounds up
While debugging my NServiceBus enabled application, I have certain messages that are reported in
While scouring the net for an answer to my problem I have seen multiple
While using boost::threads I have come across this interruption problem. When I do a
While working with ASP.NET MVC, I have noticed that exception messages issued by the
While I use Linux, I have not yet customized my bash shell, which I

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.