Apr 1, 2011

How to get application context

To get the context, the method Context.getApplicationContext() or Activity.getApplication() can be used.

        
textContext1.setText("using getApplicationContext():\n" + getApplicationContext());
textContext2.setText("using getApplication():\n" + getApplication());


Context

1 comment:

  1. Can u please clearly explain what is conetxt and appcontext

    ReplyDelete

Infolinks In Text Ads