I paste some piece of my code here:
public void onCreate(Bundle savedInstanceState) {
Log.e("Main Activity", "OnCreate");
super.onCreate(savedInstanceState);
setContentView(R.layout.main_frame);
//GlowEffect is the custom class's constructor:GlowEffect(context);
new GlowEffect2(getApplictionContext());
AlertDialog.Builder builder = new Builder(this);
...
...
I find that when I change the param in **Builder(this)**
to Builder(getApplicationContext());
The app will crash! While the GlowEffect2
constructor works well whatever the param is "this
" or "getApplicationContext()".
SOSo what the difference between the two params?
Thanks in advance!