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

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -