ZhouWeikuan / cocos2d

cocos2d for android, based on cocos2d-android-0.82, and now ported from cocos2d-iphone 0.99.4. The googlecode address is here: http://code.google.com/p/cocos2d-android-1/ . There are several demos to watch.
610 stars 291 forks source link

How to Add Android Widgets (E.g Gallery) to a CCLayer #62

Closed victordibia closed 12 years ago

victordibia commented 12 years ago

Hi, what would be the best way to add an android widget to a CCLayer. I have tried using CCDirector.sharedDirector().attachInView(mygaller), have tried passing a reference to the original activity and calling .addView on it, but still it doesnt work. Rather my game just hangs there and does load the next layer (and no error is shown on the debug screen). I believe there should be a work around to this, or a proper design principle which I am unfamiliar with. I would greatly appreciate some assistance.

victordibia commented 12 years ago

After some extra search (and also looking through some Cocos2dIphone forums) I realized two things.