0

Pretty new in Java and Android.

My situation: I have an app where users are looking some images. Also have and an admob at the bottom.

what I need is if the user click on the admob and returns back to the app to hide the admob.view (onDismissScreen).

At the moment I have

public class MainActivity extends Activity implements OnClickListener {

Which is listening for clicks on the images. As I see I need also :

public class BannerSample extends Activity implements AdListener {

To be able to use onDismissScreen.

How can I combine these together. Or some other solution if available?

Pretty new in android and don`t have practice so please for some example :)

Thanks all!

4

1 回答 1

1

只需使用以下内容:

public class BannerSample extends Activity implements AdListener, OnClickListener {

并在 BannerSample 中实现必要的方法。

实现接口时,可以用逗号分隔多个接口。但是请注意,您只能从一个类扩展。

于 2013-06-14T07:14:42.497 回答