summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-11-27 18:17:38 +0300
committerAndrew Dolgov <[email protected]>2011-11-27 18:17:38 +0300
commit420cdfb0839ffd73a50fa92bc6c0c33f85d268d2 (patch)
treee4ecd18039cfbd4fed034ce43bb0af6ddb1329d8
parentb2519b4e1810eee391576071e90e4b83af9122df (diff)
initial attempt at admob stuff
-rw-r--r--.classpath1
-rw-r--r--AndroidManifest.xml4
-rw-r--r--default.properties2
-rw-r--r--project.properties2
-rw-r--r--res/layout/article_fragment.xml16
5 files changed, 22 insertions, 3 deletions
diff --git a/.classpath b/.classpath
index 473deb32..46fa1840 100644
--- a/.classpath
+++ b/.classpath
@@ -6,5 +6,6 @@
<classpathentry kind="lib" path="lib/gson-1.7.1.jar"/>
<classpathentry kind="lib" path="lib/jsoup-1.6.1.jar"/>
<classpathentry kind="lib" path="libs/android-support-v4.jar"/>
+ <classpathentry kind="lib" path="C:/Users/fox/android-sdk-windows/extras/google/admob_ads_sdk/GoogleAdMobAdsSdk-4.3.1.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index c482c4cc..360878ed 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -7,6 +7,7 @@
<!-- <supports-screens android:smallScreens="false" android:normalScreens="false" /> -->
<uses-permission android:name="android.permission.INTERNET" />
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".LoginActivity"
@@ -23,6 +24,9 @@
<activity android:name=".PreferencesActivity"
android:label="@string/preferences">
</activity>
+
+ <activity android:name="com.google.ads.AdActivity"
+ android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
</application>
</manifest> \ No newline at end of file
diff --git a/default.properties b/default.properties
index 51ff180e..a1ad2e01 100644
--- a/default.properties
+++ b/default.properties
@@ -1,2 +1,2 @@
# Project target.
-target=android-10
+target=android-13
diff --git a/project.properties b/project.properties
index d79abae1..b904742f 100644
--- a/project.properties
+++ b/project.properties
@@ -8,4 +8,4 @@
# project structure.
# Project target.
-target=android-11
+target=android-13
diff --git a/res/layout/article_fragment.xml b/res/layout/article_fragment.xml
index dde2265d..a24db6c3 100644
--- a/res/layout/article_fragment.xml
+++ b/res/layout/article_fragment.xml
@@ -2,6 +2,8 @@
<LinearLayout android:id="@+id/article_fragment" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal">
<ImageView android:layout_weight="0" android:background="?articleDivider" android:layout_width="wrap_content" android:paddingLeft="4dip" android:layout_height="match_parent"></ImageView>
<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:id="@+id/linerLayout2"
android:layout_width="match_parent"
android:layout_weight="1"
@@ -19,6 +21,18 @@
</LinearLayout>
<ImageView android:background="?feedlistDivider" android:paddingTop="2dip" android:layout_weight="0" android:layout_height="wrap_content" android:layout_width="match_parent"></ImageView>
- <WebView android:layout_weight="0" android:layout_width="match_parent" android:padding="3dip" android:layout_height="match_parent" android:id="@+id/content"></WebView>
+ <WebView android:layout_weight="1" android:layout_width="match_parent" android:padding="3dip" android:layout_height="match_parent" android:id="@+id/content"></WebView>
+
+ <!-- Ad Placeholder -->
+ <com.google.ads.AdView
+ android:id="@+id/adView"
+ android:layout_weight="0"
+ android:gravity="center"
+ android:background="@android:color/transparent"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ ads:adUnitId="a14ed24fe8c671c"
+ ads:adSize="BANNER"
+ ads:loadAdOnCreate="true" />
</LinearLayout>
</LinearLayout>