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 -

nginx - phpPgAdmin - log in works but I have to login again after clicking on any links -