Java/Android use one obj pointer to reference 2 class -
say need global obj pointer, this:
/** ui:fragment頁面提供 */ public static fragmentpageradapter pager=null;
at first, pointed class
public class homepageradapter extends fragmentpageradapter{...}
but sometime, point class following
public class mylistpageradapter extends fragmentpageradapter{...}
is possible ?
it possible. parent class reference can hold reference child class. i.e both of following statements valid:
fragmentpageradapter pager=null; pager=new homepageradapter(); pager=new mylistpageradapter();
Comments
Post a Comment