Two activities & layouts visible simultaneously

Kapslok

Member
Licensed User
Longtime User
Hello,

I got an idea of playing with two activities: the first one shows ads and the second one is the actual application.

Is it possible to show two activities simultaneously on the screen? Say, ad mob-activity at top and the application at the bottom. Or what would be the easiest way to achieve this?

Best wishes!
 
Hi Kapslok
I'm pretty new to this too so my answer could be slightly off. Android can only display one active activity at a time. One way you could achieve your goal would be to have a activity with 2 panels. One showing the Ad mob, other for the app. This would keep them seperate, but both would be active at the same time.
 
Upvote 0
You can use one single activity view, and in it have x number of views(controls) and a Panel for admob, remember that admob has some specifications for the sizing...You can check out my Pairs4Android avaiable in the market, in wich I use admob...
 
Upvote 0
thanks barx and cableguy!

I suspect you're right, only one activity can be on the display once. Some weeks ago I got the admob working right, but unfortunately it took the keyboard focus. Result was that once I pushed a key in order to play the game, I triggered the admob. This would be good for my admob business, but would drive users crazy... ;)

Then Erel gave some advice of setting the focus correctly and that >>nearly<< worked. http://www.b4x.com/forum/basic4android-updates-questions/9323-admob-takes-keys-focus.html Idea was to have two views. The first one is the adview and the second is the game. Problem was not quite solved. I got impression that the setting the focus of input is a wee bit tricky.

It would be ok, if only the tap on the adview would trigger the admob. This I haven't achieved yet... Well, back to drawing board, thanks for replies!

Kapslok
 
Upvote 0
Back
Top