Permalink
Browse files

Merge branch 'master' of github.com:swisscodemonkeys/appbrain-sdk

Conflicts:
	appbrain-sdk-android.jar
	applift-admob-mediation.jar
	applift-adwhirl.jar
	example/AndroidManifest.xml
	example/libs/appbrain-sdk-android.jar
  • Loading branch information...
2 parents 57224be + edfbe01 commit 802c93255f5bfc4410630c19ea0cca2c12929faf @mathijs81 mathijs81 committed Aug 29, 2012
Showing with 15 additions and 2 deletions.
  1. +15 −2 example/src/com/appbrain/example/BannerActivity.java
@@ -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());

0 comments on commit 802c932

Please sign in to comment.