Commit 1438d382ab2e715206acd3ade7364d5e89118d4d

Authored by 赵康
1 parent cae2cea3d8
Exists in master

add project

Showing 46 changed files with 554 additions and 0 deletions Side-by-side Diff

... ... @@ -0,0 +1,4 @@
  1 +AdSDKRelease/bin
  2 +AdSDKRelease/gen
  3 +AdSDKSample/bin
  4 +AdSDKSample/gen
AdSDKRelease/.classpath
... ... @@ -0,0 +1,9 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<classpath>
  3 + <classpathentry kind="src" path="src"/>
  4 + <classpathentry kind="src" path="gen"/>
  5 + <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
  6 + <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
  7 + <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
  8 + <classpathentry kind="output" path="bin/classes"/>
  9 +</classpath>
AdSDKRelease/.project
... ... @@ -0,0 +1,33 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<projectDescription>
  3 + <name>AdSDKRelease</name>
  4 + <comment></comment>
  5 + <projects>
  6 + </projects>
  7 + <buildSpec>
  8 + <buildCommand>
  9 + <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
  10 + <arguments>
  11 + </arguments>
  12 + </buildCommand>
  13 + <buildCommand>
  14 + <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
  15 + <arguments>
  16 + </arguments>
  17 + </buildCommand>
  18 + <buildCommand>
  19 + <name>org.eclipse.jdt.core.javabuilder</name>
  20 + <arguments>
  21 + </arguments>
  22 + </buildCommand>
  23 + <buildCommand>
  24 + <name>com.android.ide.eclipse.adt.ApkBuilder</name>
  25 + <arguments>
  26 + </arguments>
  27 + </buildCommand>
  28 + </buildSpec>
  29 + <natures>
  30 + <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
  31 + <nature>org.eclipse.jdt.core.javanature</nature>
  32 + </natures>
  33 +</projectDescription>
AdSDKRelease/AndroidManifest.xml
... ... @@ -0,0 +1,16 @@
  1 +<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  2 + package="com.example.adsdkrelease"
  3 + android:versionCode="1"
  4 + android:versionName="1.0" >
  5 +
  6 + <uses-sdk
  7 + android:minSdkVersion="7"
  8 + android:targetSdkVersion="8" />
  9 +
  10 + <application
  11 + android:allowBackup="true"
  12 + android:icon="@drawable/ic_launcher"
  13 + android:label="@string/app_name" >
  14 + </application>
  15 +
  16 +</manifest>
0 17 \ No newline at end of file
AdSDKRelease/libs/AdSDK1.3.jar
No preview for this file type
AdSDKRelease/libs/android-support-v4.jar
No preview for this file type
AdSDKRelease/libs/picasso-2.2.0.jar
No preview for this file type
AdSDKRelease/proguard-project.txt
... ... @@ -0,0 +1,20 @@
  1 +# To enable ProGuard in your project, edit project.properties
  2 +# to define the proguard.config property as described in that file.
  3 +#
  4 +# Add project specific ProGuard rules here.
  5 +# By default, the flags in this file are appended to flags specified
  6 +# in ${sdk.dir}/tools/proguard/proguard-android.txt
  7 +# You can edit the include path and order by changing the ProGuard
  8 +# include property in project.properties.
  9 +#
  10 +# For more details, see
  11 +# http://developer.android.com/guide/developing/tools/proguard.html
  12 +
  13 +# Add any project specific keep options here:
  14 +
  15 +# If your project uses WebView with JS, uncomment the following
  16 +# and specify the fully qualified class name to the JavaScript interface
  17 +# class:
  18 +#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
  19 +# public *;
  20 +#}
AdSDKRelease/project.properties
... ... @@ -0,0 +1,15 @@
  1 +# This file is automatically generated by Android Tools.
  2 +# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
  3 +#
  4 +# This file must be checked in Version Control Systems.
  5 +#
  6 +# To customize properties used by the Ant build system edit
  7 +# "ant.properties", and override values to adapt the script to your
  8 +# project structure.
  9 +#
  10 +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
  11 +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
  12 +
  13 +# Project target.
  14 +target=android-10
  15 +android.library=true
AdSDKRelease/res/drawable-hdpi/btn_download_normal.png

2.12 KB

AdSDKRelease/res/drawable-hdpi/btn_download_pressed.png

2.09 KB

AdSDKRelease/res/drawable-hdpi/close.png

502 Bytes

AdSDKRelease/res/drawable-hdpi/ic_launcher.png

9.18 KB

AdSDKRelease/res/drawable-mdpi/btn_download_normal.png

2.12 KB

AdSDKRelease/res/drawable-mdpi/btn_download_pressed.png

2.09 KB

AdSDKRelease/res/drawable-mdpi/ic_launcher.png

5.11 KB

AdSDKRelease/res/drawable-nodpi/btn_orange_normal.9.png

661 Bytes

AdSDKRelease/res/drawable-nodpi/btn_orange_pressed.9.png

660 Bytes

AdSDKRelease/res/drawable-nodpi/btn_white.9.png

329 Bytes

AdSDKRelease/res/drawable-xhdpi/btn_download_normal.png

2.88 KB

AdSDKRelease/res/drawable-xhdpi/btn_download_pressed.png

2.84 KB

AdSDKRelease/res/drawable-xhdpi/ic_launcher.png

14 KB

AdSDKRelease/res/drawable/btn_download.xml
... ... @@ -0,0 +1,7 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<selector xmlns:android="http://schemas.android.com/apk/res/android">
  3 +
  4 + <item android:drawable="@drawable/btn_download_pressed" android:state_pressed="true"/>
  5 + <item android:drawable="@drawable/btn_download_normal"/>
  6 +
  7 +</selector>
0 8 \ No newline at end of file
AdSDKRelease/res/drawable/btn_orange.xml
... ... @@ -0,0 +1,6 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<selector xmlns:android="http://schemas.android.com/apk/res/android" >
  3 + <item android:state_pressed="true" android:drawable="@drawable/btn_orange_pressed"/>
  4 + <item android:drawable="@drawable/btn_orange_normal"/>
  5 +
  6 +</selector>
AdSDKRelease/res/drawable/update_dialog_bg.xml
... ... @@ -0,0 +1,8 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<shape xmlns:android="http://schemas.android.com/apk/res/android"
  3 + android:shape="rectangle" >
  4 +
  5 + <corners android:radius="5dp" />
  6 +
  7 + <solid android:color="@color/white" />
  8 + </shape>
0 9 \ No newline at end of file
AdSDKRelease/res/layout/activity_container.xml
... ... @@ -0,0 +1,4 @@
  1 +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2 + android:id="@+id/container"
  3 + android:layout_width="match_parent"
  4 + android:layout_height="match_parent" />
AdSDKRelease/res/layout/dialog_quit.xml
... ... @@ -0,0 +1,81 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + android:layout_width="293dp"
  4 + android:layout_height="fill_parent"
  5 + android:orientation="vertical" >
  6 +
  7 + <RelativeLayout
  8 + android:layout_width="fill_parent"
  9 + android:layout_height="40dp" >
  10 +
  11 + <TextView
  12 + android:id="@+id/title"
  13 + android:layout_width="wrap_content"
  14 + android:layout_height="wrap_content"
  15 + android:layout_centerVertical="true"
  16 + android:layout_marginLeft="5dp"
  17 + android:text="@string/quit_title"
  18 + android:textColor="@color/black"
  19 + android:textSize="16sp"
  20 + android:textStyle="bold" />
  21 +
  22 + <View
  23 + android:layout_width="fill_parent"
  24 + android:layout_height="0.5dp"
  25 + android:layout_alignParentBottom="true"
  26 + android:background="@color/line" />
  27 + </RelativeLayout>
  28 +
  29 + <ListView
  30 + android:id="@+id/list"
  31 + android:layout_width="fill_parent"
  32 + android:layout_height="150dp"
  33 + android:layout_marginBottom="10dp"
  34 + android:cacheColorHint="@color/transparent"
  35 + android:divider="@color/line"
  36 + android:dividerHeight="1dp"
  37 + android:listSelector="@color/transparent" />
  38 +
  39 + <TextView
  40 + android:id="@+id/msg"
  41 + android:layout_width="fill_parent"
  42 + android:layout_height="wrap_content"
  43 + android:layout_marginBottom="10dp"
  44 + android:gravity="center"
  45 + android:textColor="@color/black" />
  46 +
  47 + <LinearLayout
  48 + android:layout_width="fill_parent"
  49 + android:layout_height="wrap_content"
  50 + android:layout_marginBottom="15dp"
  51 + android:gravity="center"
  52 + android:orientation="horizontal" >
  53 +
  54 + <TextView
  55 + android:id="@+id/cancel"
  56 + android:layout_width="fill_parent"
  57 + android:layout_height="35dp"
  58 + android:layout_marginLeft="15dp"
  59 + android:layout_marginRight="10dp"
  60 + android:layout_weight="1"
  61 + android:background="@drawable/btn_orange"
  62 + android:gravity="center"
  63 + android:text="@string/no"
  64 + android:textColor="@color/white"
  65 + android:textSize="14sp" />
  66 +
  67 + <TextView
  68 + android:id="@+id/ok"
  69 + android:layout_width="fill_parent"
  70 + android:layout_height="35dp"
  71 + android:layout_marginLeft="10dip"
  72 + android:layout_marginRight="15dp"
  73 + android:layout_weight="1"
  74 + android:background="@drawable/btn_white"
  75 + android:gravity="center"
  76 + android:text="@string/quit"
  77 + android:textColor="@color/black"
  78 + android:textSize="14sp" />
  79 + </LinearLayout>
  80 +
  81 +</LinearLayout>
0 82 \ No newline at end of file
AdSDKRelease/res/layout/fragment_intertitial.xml
... ... @@ -0,0 +1,43 @@
  1 +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2 + xmlns:tools="http://schemas.android.com/tools"
  3 + android:layout_width="fill_parent"
  4 + android:layout_height="fill_parent"
  5 + android:orientation="vertical" >
  6 +
  7 + <RelativeLayout
  8 + android:layout_width="fill_parent"
  9 + android:layout_height="45dp"
  10 + android:background="@color/orange" >
  11 +
  12 + <TextView
  13 + android:layout_width="wrap_content"
  14 + android:layout_height="wrap_content"
  15 + android:layout_centerInParent="true"
  16 + android:text="@string/inter_title"
  17 + android:textSize="15sp"
  18 + android:textColor="@android:color/white" />
  19 +
  20 + <ImageView
  21 + android:id="@+id/close"
  22 + android:layout_width="wrap_content"
  23 + android:layout_height="wrap_content"
  24 + android:layout_alignParentRight="true"
  25 + android:layout_centerVertical="true"
  26 + android:src="@drawable/close"
  27 + android:layout_marginRight="10dp" />
  28 + </RelativeLayout>
  29 +
  30 + <ProgressBar
  31 + android:id="@+id/progress"
  32 + android:layout_width="fill_parent"
  33 + android:layout_height="4dp"
  34 + android:indeterminateOnly="false"
  35 + android:max="100"
  36 + android:progressDrawable="@android:drawable/progress_horizontal" />
  37 +
  38 + <WebView
  39 + android:id="@+id/web"
  40 + android:layout_width="fill_parent"
  41 + android:layout_height="fill_parent" />
  42 +
  43 +</LinearLayout>
0 44 \ No newline at end of file
AdSDKRelease/res/layout/quit_list_item.xml
... ... @@ -0,0 +1,61 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + android:layout_width="match_parent"
  4 + android:layout_height="wrap_content"
  5 + android:orientation="vertical" >
  6 +
  7 + <LinearLayout
  8 + android:layout_width="match_parent"
  9 + android:layout_height="wrap_content"
  10 + android:layout_marginBottom="4dp"
  11 + android:background="@color/white"
  12 + android:orientation="horizontal" >
  13 +
  14 + <ImageView
  15 + android:id="@+id/app_icon"
  16 + android:layout_width="48dp"
  17 + android:layout_height="48dp"
  18 + android:layout_margin="12dp"
  19 + android:scaleType="fitXY"
  20 + android:src="@drawable/ic_launcher" />
  21 +
  22 + <LinearLayout
  23 + android:layout_width="fill_parent"
  24 + android:layout_height="wrap_content"
  25 + android:layout_marginLeft="10dp"
  26 + android:layout_marginTop="12dp"
  27 + android:layout_weight="1"
  28 + android:orientation="vertical" >
  29 +
  30 + <TextView
  31 + android:id="@+id/app_name"
  32 + android:layout_width="wrap_content"
  33 + android:layout_height="wrap_content"
  34 + android:ellipsize="end"
  35 + android:singleLine="true"
  36 + android:text="Temple Run 2"
  37 + android:textColor="#424242"
  38 + android:textSize="13sp" />
  39 +
  40 + <TextView
  41 + android:id="@+id/app_desc"
  42 + android:layout_width="wrap_content"
  43 + android:layout_height="wrap_content"
  44 + android:ellipsize="end"
  45 + android:maxLines="2"
  46 + android:text="123456 play"
  47 + android:textColor="#8a8a8a"
  48 + android:textSize="10sp" />
  49 + </LinearLayout>
  50 +
  51 + <ImageView
  52 + android:id="@+id/btn_operations"
  53 + android:layout_width="wrap_content"
  54 + android:layout_height="fill_parent"
  55 + android:layout_gravity="center_vertical"
  56 + android:paddingLeft="8dp"
  57 + android:paddingRight="16dp"
  58 + android:src="@drawable/btn_download" />
  59 + </LinearLayout>
  60 +
  61 +</LinearLayout>
0 62 \ No newline at end of file
AdSDKRelease/res/values/colors.xml
... ... @@ -0,0 +1,8 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<resources>
  3 + <color name="orange">#ff6300</color>
  4 + <color name="white">#FFFFFF</color>
  5 + <color name="black">#000000</color>
  6 + <color name="line">#eeecea</color>
  7 + <color name="transparent">#00000000</color>
  8 +</resources>
AdSDKRelease/res/values/strings.xml
... ... @@ -0,0 +1,12 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<resources>
  3 +
  4 + <string name="app_name">AdSDK</string>
  5 + <string name="hello_world">Hello world!</string>
  6 + <string name="action_settings">Settings</string>
  7 + <string name="inter_title">Hot Free Apps</string>
  8 + <string name="quit_title">Feature Games</string>
  9 + <string name="quit">Yes</string>
  10 + <string name="no">No</string>
  11 +
  12 +</resources>
0 13 \ No newline at end of file
AdSDKRelease/res/values/styles.xml
... ... @@ -0,0 +1,12 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<resources>
  3 +
  4 + <style name="quit_dialog" parent="@android:style/Theme.Dialog">
  5 + <item name="android:windowFrame">@null</item>
  6 + <item name="android:windowBackground">@drawable/update_dialog_bg</item>
  7 + <item name="android:windowNoTitle">true</item>
  8 + <item name="android:windowIsFloating">true</item>
  9 + <item name="android:windowContentOverlay">@null</item>
  10 + </style>
  11 +
  12 +</resources>
0 13 \ No newline at end of file
AdSDKSample/.classpath
... ... @@ -0,0 +1,9 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<classpath>
  3 + <classpathentry kind="src" path="src"/>
  4 + <classpathentry kind="src" path="gen"/>
  5 + <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
  6 + <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
  7 + <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
  8 + <classpathentry kind="output" path="bin/classes"/>
  9 +</classpath>
AdSDKSample/.project
... ... @@ -0,0 +1,33 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<projectDescription>
  3 + <name>AdSDKSample</name>
  4 + <comment></comment>
  5 + <projects>
  6 + </projects>
  7 + <buildSpec>
  8 + <buildCommand>
  9 + <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
  10 + <arguments>
  11 + </arguments>
  12 + </buildCommand>
  13 + <buildCommand>
  14 + <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
  15 + <arguments>
  16 + </arguments>
  17 + </buildCommand>
  18 + <buildCommand>
  19 + <name>org.eclipse.jdt.core.javabuilder</name>
  20 + <arguments>
  21 + </arguments>
  22 + </buildCommand>
  23 + <buildCommand>
  24 + <name>com.android.ide.eclipse.adt.ApkBuilder</name>
  25 + <arguments>
  26 + </arguments>
  27 + </buildCommand>
  28 + </buildSpec>
  29 + <natures>
  30 + <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
  31 + <nature>org.eclipse.jdt.core.javanature</nature>
  32 + </natures>
  33 +</projectDescription>
AdSDKSample/AndroidManifest.xml
... ... @@ -0,0 +1,32 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  3 + package="com.mobithink.ad.sample"
  4 + android:versionCode="1"
  5 + android:versionName="1.0" >
  6 +
  7 + <uses-sdk
  8 + android:minSdkVersion="8"
  9 + android:targetSdkVersion="9" />
  10 +
  11 + <uses-permission android:name="android.permission.INTERNET"/>
  12 + <application
  13 + android:allowBackup="true"
  14 + android:icon="@drawable/ic_launcher"
  15 + android:label="@string/app_name" >
  16 + <activity
  17 + android:name="com.mobithink.ad.sample.MainActivity"
  18 + android:label="@string/app_name"
  19 + android:screenOrientation="landscape" >
  20 + <intent-filter>
  21 + <action android:name="android.intent.action.MAIN" />
  22 +
  23 + <category android:name="android.intent.category.LAUNCHER" />
  24 + </intent-filter>
  25 + </activity>
  26 + <activity
  27 + android:name="com.mobithink.ad.sdk.AdActivity"
  28 + android:theme="@android:style/Theme.Black.NoTitleBar" >
  29 + </activity>
  30 + </application>
  31 +
  32 +</manifest>
0 33 \ No newline at end of file
AdSDKSample/lint.xml
... ... @@ -0,0 +1,3 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<lint>
  3 +</lint>
0 4 \ No newline at end of file
AdSDKSample/proguard-project.txt
... ... @@ -0,0 +1,20 @@
  1 +# To enable ProGuard in your project, edit project.properties
  2 +# to define the proguard.config property as described in that file.
  3 +#
  4 +# Add project specific ProGuard rules here.
  5 +# By default, the flags in this file are appended to flags specified
  6 +# in ${sdk.dir}/tools/proguard/proguard-android.txt
  7 +# You can edit the include path and order by changing the ProGuard
  8 +# include property in project.properties.
  9 +#
  10 +# For more details, see
  11 +# http://developer.android.com/guide/developing/tools/proguard.html
  12 +
  13 +# Add any project specific keep options here:
  14 +
  15 +# If your project uses WebView with JS, uncomment the following
  16 +# and specify the fully qualified class name to the JavaScript interface
  17 +# class:
  18 +#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
  19 +# public *;
  20 +#}
AdSDKSample/project.properties
... ... @@ -0,0 +1,15 @@
  1 +# This file is automatically generated by Android Tools.
  2 +# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
  3 +#
  4 +# This file must be checked in Version Control Systems.
  5 +#
  6 +# To customize properties used by the Ant build system edit
  7 +# "ant.properties", and override values to adapt the script to your
  8 +# project structure.
  9 +#
  10 +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
  11 +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
  12 +
  13 +# Project target.
  14 +target=android-10
  15 +android.library.reference.1=../AdSDKRelease
AdSDKSample/res/drawable-hdpi/ic_launcher.png

9.18 KB

AdSDKSample/res/drawable-mdpi/ic_launcher.png

5.11 KB

AdSDKSample/res/drawable-xhdpi/ic_launcher.png

14 KB

AdSDKSample/res/layout/activity_main.xml
... ... @@ -0,0 +1,23 @@
  1 +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2 + android:layout_width="match_parent"
  3 + android:layout_height="match_parent" >
  4 +
  5 + <Button
  6 + android:id="@+id/btn_show"
  7 + android:layout_width="wrap_content"
  8 + android:layout_height="wrap_content"
  9 + android:text="@string/show_btn" />
  10 +
  11 + <Button
  12 + android:id="@+id/btn_intertitial"
  13 + android:layout_width="wrap_content"
  14 + android:layout_height="wrap_content"
  15 + android:text="@string/show_inter" />
  16 +
  17 + <Button
  18 + android:id="@+id/btn_quit"
  19 + android:layout_width="wrap_content"
  20 + android:layout_height="wrap_content"
  21 + android:text="@string/show_quit_dialog" />
  22 +
  23 +</LinearLayout>
0 24 \ No newline at end of file
AdSDKSample/res/values-w820dp/dimens.xml
... ... @@ -0,0 +1,10 @@
  1 +<resources>
  2 +
  3 + <!--
  4 + Example customization of dimensions originally defined in res/values/dimens.xml
  5 + (such as screen margins) for screens with more than 820dp of available width. This
  6 + would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
  7 + -->
  8 + <dimen name="activity_horizontal_margin">64dp</dimen>
  9 +
  10 +</resources>
AdSDKSample/res/values/dimens.xml
... ... @@ -0,0 +1,7 @@
  1 +<resources>
  2 +
  3 + <!-- Default screen margins, per the Android Design guidelines. -->
  4 + <dimen name="activity_horizontal_margin">16dp</dimen>
  5 + <dimen name="activity_vertical_margin">16dp</dimen>
  6 +
  7 +</resources>
AdSDKSample/res/values/strings.xml
... ... @@ -0,0 +1,10 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<resources>
  3 +
  4 + <string name="app_name">SDKSample</string>
  5 + <string name="hello_world">Hello world!</string>
  6 + <string name="action_settings">Settings</string>
  7 + <string name="show_btn">show advertise</string>
  8 + <string name="show_inter">show intertitial</string>
  9 + <string name="show_quit_dialog">show quit ads</string>
  10 +</resources>
AdSDKSample/src/com/mobithink/ad/sample/MainActivity.java
... ... @@ -0,0 +1,53 @@
  1 +package com.mobithink.ad.sample;
  2 +
  3 +import java.util.HashMap;
  4 +import java.util.Map;
  5 +
  6 +import android.app.Activity;
  7 +import android.os.Bundle;
  8 +import android.util.Log;
  9 +import android.view.View;
  10 +import android.widget.Button;
  11 +
  12 +import com.mobithink.ad.sdk.MTAgent;
  13 +
  14 +public class MainActivity extends Activity implements View.OnClickListener {
  15 +
  16 + private static final String TAG = "MainActivity";
  17 + @Override
  18 + protected void onCreate(Bundle savedInstanceState) {
  19 + super.onCreate(savedInstanceState);
  20 + setContentView(R.layout.activity_main);
  21 + Map<String, String> params = new HashMap<String, String>();
  22 + params.put("pid", "140");
  23 + params.put("aid", "16");
  24 + MTAgent.init(params);
  25 + Button show = (Button) findViewById(R.id.btn_show);
  26 + show.setOnClickListener(this);
  27 + Button intertitial = (Button) findViewById(R.id.btn_intertitial);
  28 + intertitial.setOnClickListener(this);
  29 + findViewById(R.id.btn_quit).setOnClickListener(this);
  30 + }
  31 +
  32 + @Override
  33 + public void onClick(View v) {
  34 + switch (v.getId()) {
  35 + case R.id.btn_show:
  36 + MTAgent.showAd(this);
  37 + break;
  38 + case R.id.btn_intertitial:
  39 + MTAgent.showFullScreenAd(this);
  40 + break;
  41 + case R.id.btn_quit:
  42 + MTAgent.showQuitDialog(this, new MTAgent.QuitCallback() {
  43 +
  44 + @Override
  45 + public void onQuit(boolean arg0) {
  46 + Log.i(TAG, "quit?"+arg0);
  47 + }
  48 + });
  49 + break;
  50 + }
  51 + }
  52 +
  53 +}