[SDL] Extending SDLActivity (2.0.1/Android)

Gabriele Greco gabriele.greco at darts.it
Fri Oct 25 00:46:53 PDT 2013


That did the trick, override setContentView is the way to go, thanks!

I think @Override should be removed from many methods in SDLActivity.java
because they are really NOT overridable.

For instance all the methods of SDLSurface and SDLMain (that since they are
private are not extendable) and the methods that need access to mSurface of
SDLActivity (for instance onCreate).


On Thu, Oct 24, 2013 at 5:12 PM, Martin Gerhardy
<martin.gerhardy at gmail.com>wrote:

> I can only offer you take a look at what I'm using. This isn't all my
> code. Parts of it were posted earlier on this mailinglist.
>
> Keep in mind to fill all the needed variables in there (like adUnitId and
> base64PublicKey)
> There are also some in-game-payitems defined there, too.
>
> At least the requested layout stuff is in there. So you might find it
> useful.
>
> The important part is this one:
>
>     @Override
>     public void setContentView(View view) {
>         layout = new RelativeLayout(this);
>         view.setId(SDLViewID);
>         layout.addView(view);
>         super.setContentView(layout);
>     }
>
> Regards
> Martin
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>


-- 
Ing. Gabriele Greco, DARTS Engineering
Tel: +39-0100980150  Fax: +39-0100980184
s-mail: Piazza Della Vittoria 9/3 - 16121 GENOVA (ITALY)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20131025/5ec78bb6/attachment-0009.htm>


More information about the SDL mailing list