Thursday, February 13, 2014

Help, while more than one activity inherited problems


            
I have two basic Activity:
1, BaseActivity (do some basic business logic and UI adjustments)
2, BaseBaiduMapActivity (Show map when used in the absence of the map Activity Lane less than he needs to inherit Baidu's MapActivity)

Now a page to inherit these two classes, how do?
BaseBaiduMapActivity not inherit from BaseActivity, because he has inherited MapActivity, but if you let BaseActivity inherit MapActivity, it will lead to some useless map page also loaded maps related stuff.
Reply:
There BaiduActivity code it, understand the call to load the map application it? Try these interfaces overloaded.
Reply:
cited landlord baiyuxiong reply:
I have two basic Activity:
1, BaseActivity (do some basic business logic and UI adjustments)
2, BaseBaiduMapActivity (Show map when used in the absence of the map Activity Lane less than he needs to inherit Baidu's MapActivity)

Now a page to inherit these two classes, how do?
BaseBaiduMapActivity not inherit from BaseActivity, because he has inherited MapActivity, but if you let BaseActivity inherit MapActivity, it will lead to some useless map page also loaded maps related stuff.



Multiple inheritance? Are you sure your routine is not a problem?

Reply:
I looked at Baidu to Tuan Zhuo package, the latest version of api seemingly no MapActivity this base class, it should be easier to use, you may use the version is too old, upgrade api about it.

No comments:

Post a Comment