Not sure if this is in the appropriate topic, if not let me know where would be better, thankyou.
Fairly new to object oriented programming and even newer to Java. I've never seen code inlined like this before. I need help understanding what exactly is happening here. Is this segment of code overloading the constructor of the OnClickListener object?
OnClickListener l = new OnClickListener() { public void onClick(View v) { if (mPhoneIsSilent) { mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL); mPhoneIsSilent = false; } else { mAudioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT); mPhoneIsSilent = true; } toggleUi(); } };