java - How to call the constructor of an activity's parent class -
this question off-shoot of difficult problem working on. 1 of suggestion phone call constructor of parent activity. know how might that? mean, have activity called dogactivity , have parentactivity such dogactivity extends parentactivity
. utilize oncreate communicate parent activities in super.oncreate(savedinstancestate)
instance. @ loss of how phone call constructor of parent activity. need pass info through constructor. how know android phone call same instance of parent when needs deal callbacks , lifecycle methods? please see original question reference if need to.
public class dogactivity extends parentactivity { public dogactivity() { super("something", new someobject()); // calling super's constructor } }
however on android rare you'd have occasion need phone call parents constructor. have doing wrong.
java android android-activity
No comments:
Post a Comment