Permalink
Browse files

Fix banner API

  • Loading branch information...
mathijs81 committed Jul 21, 2012
1 parent 26a0a11 commit edfbe01d0c534b3015d8501064221785f85ae32c
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.appbrain.example"
- android:versionCode="10"
- android:versionName="2.0" >
+ android:versionCode="11"
+ android:versionName="2.01" >
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="15"/>
<uses-permission android:name="android.permission.INTERNET" />
Binary file not shown.
@@ -4,15 +4,16 @@
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
import android.widget.AdapterView.OnItemSelectedListener;
-import android.widget.LinearLayout.LayoutParams;
import android.widget.ArrayAdapter;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
+import android.widget.Toast;
+import android.widget.LinearLayout.LayoutParams;
import android.widget.Spinner;
import com.appbrain.AppBrainBanner;
+import com.appbrain.BannerListener;
public class BannerActivity extends Activity {
private static final String[] COLOR_NAMES = {
@@ -113,6 +114,18 @@ public void onNothingSelected(AdapterView<?> arg0) {
private void loadAd() {
container.removeAllViews();
AppBrainBanner banner = new AppBrainBanner(BannerActivity.this);
+ banner.setBannerListener(new BannerListener() {
+
+ @Override
+ public void onAdRequestDone(boolean arg0) {
+ // Ignore
+ }
+
+ @Override
+ public void onClick() {
+ Toast.makeText(BannerActivity.this, "Banner clicked!", Toast.LENGTH_SHORT).show();
+ } });
+
banner.setTitleIndex(title.getSelectedItemPosition());
banner.setButtonTextIndex(button.getSelectedItemPosition());
banner.setDesign(design.getSelectedItemPosition());
@@ -1,5 +1,5 @@
var NAVTREE_DATA =
-[ [ "com.appbrain", "com/appbrain/package-summary.html", [ [ "Interfaces", null, [ [ "AdService", "com/appbrain/AdService.html", null, "" ], [ "AppBrainBanner.Listener", "com/appbrain/AppBrainBanner.Listener.html", null, "" ], [ "RemoteSettings", "com/appbrain/RemoteSettings.html", null, "" ] ]
+[ [ "com.appbrain", "com/appbrain/package-summary.html", [ [ "Interfaces", null, [ [ "AdService", "com/appbrain/AdService.html", null, "" ], [ "BannerListener", "com/appbrain/BannerListener.html", null, "" ], [ "RemoteSettings", "com/appbrain/RemoteSettings.html", null, "" ] ]
, "" ], [ "Classes", null, [ [ "AppBrain", "com/appbrain/AppBrain.html", null, "" ], [ "AppBrainBanner", "com/appbrain/AppBrainBanner.html", null, "" ], [ "ReferrerReceiver", "com/appbrain/ReferrerReceiver.html", null, "" ] ]
, "" ] ]
, "" ] ]
@@ -173,6 +173,7 @@ <h1>Class Index - AppBrain AppLift Javadoc</h1>
<div class="jd-letterlist">
<a href="#letter_A">A</a>
+ <a href="#letter_B">B</a>
<a href="#letter_R">R</a>
</div>
@@ -200,8 +201,15 @@ <h2 id="letter_A">A</h2>
</tr>
- <tr class=" api apilevel-" >
- <td class="jd-linkcol"><a href="./com/appbrain/AppBrainBanner.Listener.html">AppBrainBanner.Listener</a></td>
+</table>
+
+
+<h2 id="letter_B">B</h2>
+<table class="jd-sumtable">
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-linkcol"><a href="./com/appbrain/BannerListener.html">BannerListener</a></td>
<td class="jd-descrcol" width="100%">This is a listener interface to be notified when someone clicked the AppBrain banner.&nbsp;</td>
</tr>
@@ -135,7 +135,7 @@
<li><h2>Interfaces</h2>
<ul>
<li class="selected api apilevel-"><a href="../../com/appbrain/AdService.html">AdService</a></li>
- <li class="api apilevel-"><a href="../../com/appbrain/AppBrainBanner.Listener.html">AppBrainBanner.Listener</a></li>
+ <li class="api apilevel-"><a href="../../com/appbrain/BannerListener.html">BannerListener</a></li>
<li class="api apilevel-"><a href="../../com/appbrain/RemoteSettings.html">RemoteSettings</a></li>
</ul>
</li>
@@ -135,7 +135,7 @@
<li><h2>Interfaces</h2>
<ul>
<li class="api apilevel-"><a href="../../com/appbrain/AdService.html">AdService</a></li>
- <li class="api apilevel-"><a href="../../com/appbrain/AppBrainBanner.Listener.html">AppBrainBanner.Listener</a></li>
+ <li class="api apilevel-"><a href="../../com/appbrain/BannerListener.html">BannerListener</a></li>
<li class="api apilevel-"><a href="../../com/appbrain/RemoteSettings.html">RemoteSettings</a></li>
</ul>
</li>
@@ -135,7 +135,7 @@
<li><h2>Interfaces</h2>
<ul>
<li class="api apilevel-"><a href="../../com/appbrain/AdService.html">AdService</a></li>
- <li class="api apilevel-"><a href="../../com/appbrain/AppBrainBanner.Listener.html">AppBrainBanner.Listener</a></li>
+ <li class="api apilevel-"><a href="../../com/appbrain/BannerListener.html">BannerListener</a></li>
<li class="api apilevel-"><a href="../../com/appbrain/RemoteSettings.html">RemoteSettings</a></li>
</ul>
</li>
@@ -263,15 +263,12 @@
Summary:
- <a href="#nestedclasses">Nested Classes</a>
-
-
- &#124; <a href="#inhconstants">Inherited Constants</a>
+ <a href="#inhconstants">Inherited Constants</a>
@@ -453,26 +450,6 @@ <h2>Summary</h2>
-<!-- ======== NESTED CLASS SUMMARY ======== -->
-<table id="nestedclasses" class="jd-sumtable"><tr><th colspan="12">Nested Classes</th></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
- interface</nobr></td>
- <td class="jd-linkcol"><a href="../../com/appbrain/AppBrainBanner.Listener.html">AppBrainBanner.Listener</a></td>
- <td class="jd-descrcol" width="100%">This is a listener interface to be notified when someone clicked the AppBrain banner.&nbsp;</td>
- </tr>
-
-
-
-
-
@@ -1175,7 +1152,7 @@ <h2>Summary</h2>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="../../com/appbrain/AppBrainBanner.html#setBannerListener(com.appbrain.AppBrainBanner.Listener)">setBannerListener</a></span>(<a href="../../com/appbrain/AppBrainBanner.Listener.html">AppBrainBanner.Listener</a> listener)</nobr>
+ <span class="sympad"><a href="../../com/appbrain/AppBrainBanner.html#setBannerListener(com.appbrain.BannerListener)">setBannerListener</a></span>(<a href="../../com/appbrain/BannerListener.html">BannerListener</a> listener)</nobr>
<div class="jd-descrdiv">Set a listener interface that gets notified about clicks on the banner unit.</div>
@@ -9067,7 +9044,7 @@ <h4 class="jd-details-title">
</div>
-<A NAME="setBannerListener(com.appbrain.AppBrainBanner.Listener)"></A>
+<A NAME="setBannerListener(com.appbrain.BannerListener)"></A>
<div class="jd-details api apilevel-">
<h4 class="jd-details-title">
@@ -9080,7 +9057,7 @@ <h4 class="jd-details-title">
void
</span>
<span class="sympad">setBannerListener</span>
- <span class="normal">(<a href="../../com/appbrain/AppBrainBanner.Listener.html">AppBrainBanner.Listener</a> listener)</span>
+ <span class="normal">(<a href="../../com/appbrain/BannerListener.html">BannerListener</a> listener)</span>
</h4>
<div class="api-level">
<div>
@@ -58,7 +58,7 @@
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.ico" />
<title>
- AppBrainBanner.Listener - AppBrain AppLift Javadoc
+ BannerListener - AppBrain AppLift Javadoc
| AppBrain AppLift SDK
@@ -135,7 +135,7 @@
<li><h2>Interfaces</h2>
<ul>
<li class="api apilevel-"><a href="../../com/appbrain/AdService.html">AdService</a></li>
- <li class="selected api apilevel-"><a href="../../com/appbrain/AppBrainBanner.Listener.html">AppBrainBanner.Listener</a></li>
+ <li class="selected api apilevel-"><a href="../../com/appbrain/BannerListener.html">BannerListener</a></li>
<li class="api apilevel-"><a href="../../com/appbrain/RemoteSettings.html">RemoteSettings</a></li>
</ul>
</li>
@@ -208,11 +208,11 @@
<div id="jd-header">
public
- static
+
interface
-<h1>AppBrainBanner.Listener</h1>
+<h1>BannerListener</h1>
@@ -231,7 +231,7 @@ <h1>AppBrainBanner.Listener</h1>
<tr>
- <td colspan="1" class="jd-inheritance-class-cell">com.appbrain.AppBrainBanner.Listener</td>
+ <td colspan="1" class="jd-inheritance-class-cell">com.appbrain.BannerListener</td>
</tr>
@@ -319,7 +319,7 @@ <h2>Summary</h2>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="../../com/appbrain/AppBrainBanner.Listener.html#onAdRequestDone(boolean)">onAdRequestDone</a></span>(boolean adAvailable)</nobr>
+ <span class="sympad"><a href="../../com/appbrain/BannerListener.html#onAdRequestDone(boolean)">onAdRequestDone</a></span>(boolean adAvailable)</nobr>
<div class="jd-descrdiv">Gets called after a call to requestAd().</div>
@@ -337,7 +337,7 @@ <h2>Summary</h2>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="../../com/appbrain/AppBrainBanner.Listener.html#onClick()">onClick</a></span>()</nobr>
+ <span class="sympad"><a href="../../com/appbrain/BannerListener.html#onClick()">onClick</a></span>()</nobr>
<div class="jd-descrdiv">Gets called when a banner receives a click from the user.</div>
@@ -135,7 +135,7 @@
<li><h2>Interfaces</h2>
<ul>
<li class="api apilevel-"><a href="../../com/appbrain/AdService.html">AdService</a></li>
- <li class="api apilevel-"><a href="../../com/appbrain/AppBrainBanner.Listener.html">AppBrainBanner.Listener</a></li>
+ <li class="api apilevel-"><a href="../../com/appbrain/BannerListener.html">BannerListener</a></li>
<li class="api apilevel-"><a href="../../com/appbrain/RemoteSettings.html">RemoteSettings</a></li>
</ul>
</li>
@@ -135,7 +135,7 @@
<li><h2>Interfaces</h2>
<ul>
<li class="api apilevel-"><a href="../../com/appbrain/AdService.html">AdService</a></li>
- <li class="api apilevel-"><a href="../../com/appbrain/AppBrainBanner.Listener.html">AppBrainBanner.Listener</a></li>
+ <li class="api apilevel-"><a href="../../com/appbrain/BannerListener.html">BannerListener</a></li>
<li class="selected api apilevel-"><a href="../../com/appbrain/RemoteSettings.html">RemoteSettings</a></li>
</ul>
</li>
@@ -135,7 +135,7 @@
<li><h2>Interfaces</h2>
<ul>
<li class="api apilevel-"><a href="../../com/appbrain/AdService.html">AdService</a></li>
- <li class="api apilevel-"><a href="../../com/appbrain/AppBrainBanner.Listener.html">AppBrainBanner.Listener</a></li>
+ <li class="api apilevel-"><a href="../../com/appbrain/BannerListener.html">BannerListener</a></li>
<li class="api apilevel-"><a href="../../com/appbrain/RemoteSettings.html">RemoteSettings</a></li>
</ul>
</li>
@@ -135,7 +135,7 @@
<li><h2>Interfaces</h2>
<ul>
<li class="api apilevel-"><a href="../../com/appbrain/AdService.html">AdService</a></li>
- <li class="api apilevel-"><a href="../../com/appbrain/AppBrainBanner.Listener.html">AppBrainBanner.Listener</a></li>
+ <li class="api apilevel-"><a href="../../com/appbrain/BannerListener.html">BannerListener</a></li>
<li class="api apilevel-"><a href="../../com/appbrain/RemoteSettings.html">RemoteSettings</a></li>
</ul>
</li>
@@ -219,7 +219,7 @@ <h2>Interfaces</h2>
<td class="jd-descrcol" width="100%">The AdService provides methods to show the AppBrain offerwall and interstitial&nbsp;</td>
</tr>
<tr class=" api apilevel-" >
- <td class="jd-linkcol"><a href="../../com/appbrain/AppBrainBanner.Listener.html">AppBrainBanner.Listener</a></td>
+ <td class="jd-linkcol"><a href="../../com/appbrain/BannerListener.html">BannerListener</a></td>
<td class="jd-descrcol" width="100%">This is a listener interface to be notified when someone clicked the AppBrain banner.&nbsp;</td>
</tr>
<tr class="alt-color api apilevel-" >
@@ -204,7 +204,7 @@
deprecated="not deprecated"
visibility="public"
>
-<parameter name="listener" type="com.appbrain.AppBrainBanner.Listener">
+<parameter name="listener" type="com.appbrain.BannerListener">
</parameter>
</method>
<method name="setButtonTextIndex"
@@ -260,9 +260,9 @@
</parameter>
</method>
</class>
-<interface name="AppBrainBanner.Listener"
+<interface name="BannerListener"
abstract="true"
- static="true"
+ static="false"
final="false"
deprecated="not deprecated"
visibility="public"
@@ -3,7 +3,7 @@ var DATA = [
{ id:1, label:"com.appbrain.AdService", link:"com/appbrain/AdService.html", type:"class" },
{ id:2, label:"com.appbrain.AppBrain", link:"com/appbrain/AppBrain.html", type:"class" },
{ id:3, label:"com.appbrain.AppBrainBanner", link:"com/appbrain/AppBrainBanner.html", type:"class" },
- { id:4, label:"com.appbrain.AppBrainBanner.Listener", link:"com/appbrain/AppBrainBanner.Listener.html", type:"class" },
+ { id:4, label:"com.appbrain.BannerListener", link:"com/appbrain/BannerListener.html", type:"class" },
{ id:5, label:"com.appbrain.ReferrerReceiver", link:"com/appbrain/ReferrerReceiver.html", type:"class" },
{ id:6, label:"com.appbrain.RemoteSettings", link:"com/appbrain/RemoteSettings.html", type:"class" }

0 comments on commit edfbe01

Please sign in to comment.