android - How to know if a Views parent or instantiater is a Fragment or Activity? -


i have custom view class behave differently if parent of view either fragment, dialogfragment or activity.

there getparent() method have used following without success:

  if(getparent() instanceof dialogfragment){         log.d(tag, "parent dialogfragment");     }  

is @ possible know type parent view class' context or else?


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -