[SDL] Extending SDLActivity (2.0.1/Android)

Jonathan Dearborn grimfang4 at gmail.com
Fri Oct 25 06:35:34 PDT 2013


That depends on your interpretation of @Override.  It's meant to tell the
compiler that a method overrides another one so more static checking can be
done.  It's not the same as "virtual" in C++, but rather more like the
converse.  It doesn't enable overrides; it indicates that one has been used.

Jonny D


On Fri, Oct 25, 2013 at 3:46 AM, Gabriele Greco <gabriele.greco at darts.it>wrote:

> 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)
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20131025/c07e89c1/attachment-0009.htm>


More information about the SDL mailing list