android - How can I access a view of an activity from another activity -
I need to hide TabHost's tabs from child activity I tried Also tried: but it throws a nullpointer never access directly You need to communicate in a standard way to other For more information about communication between actions, see and. getParent () and this Also did not work
TabHost th = (TabHost) ((TabsActivity) getBaseContext ()) .findViewById (android.R.id.tabhost) ; Th.setVisibility (View.INVISIBLE);
Current
Activity to other
activities owned by , because they can be recycled during this time (because there may be other
activity That has been destroyed in the meantime.)
activity For example, your child
activity results to parent
activity , which it can then explain (you value to
intent ). Another solution is using a static variable, but it is not very good and if you are not careful enough then its risk.
Comments
Post a Comment