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

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -