Permalink
Browse files

Fuck Google's AdMod.

  • Loading branch information...
1 parent 1924bff commit f98afa99ddd2fc4150066a078e9dad409b543696 @RaD committed Apr 23, 2012
Showing with 2 additions and 55 deletions.
  1. +2 −6 AndroidManifest.xml
  2. +0 −2 res/values-ru/strings.xml
  3. +0 −2 res/values/strings.xml
  4. +0 −45 src/ru/securelayer/rad/ando/GettextActivity.java
View
@@ -2,16 +2,14 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="ru.securelayer.rad.ando"
- android:versionCode="2"
- android:versionName="1.1"
+ android:versionCode="3"
+ android:versionName="1.2"
android:installLocation="preferExternal">
<uses-sdk android:minSdkVersion="8"
android:targetSdkVersion="10"
android:maxSdkVersion="15" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <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="GettextActivity"
@@ -57,7 +55,5 @@
android:configChanges="orientation|keyboardHidden"
/>
<activity android:name="com.kaloer.filepicker.FilePickerActivity" />
- <activity android:name="com.google.ads.AdActivity"
- android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
</application>
</manifest>
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="admob_publisher_id">a14f65aaab8fb17</string>
-
<string name="app_name">Ando</string>
<string name="associate_name">Ando: Редактор ресурсов Gettext</string>
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="admob_publisher_id">a14f65aaab8fb17</string>
-
<string name="app_name">Ando</string>
<string name="associate_name">Ando: Gettext Resource Editor</string>
@@ -19,7 +19,6 @@
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
-import android.view.ViewTreeObserver.OnGlobalLayoutListener;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.EditText;
@@ -32,9 +31,6 @@
import android.gesture.GestureOverlayView.OnGesturePerformedListener;
import com.kaloer.filepicker.FilePickerActivity;
-import com.google.ads.AdView;
-import com.google.ads.AdSize;
-import com.google.ads.AdRequest;
import org.fedorahosted.tennera.jgettext.Catalog;
import org.fedorahosted.tennera.jgettext.Message;
import org.fedorahosted.tennera.jgettext.catalog.parse.ExtendedCatalogParser;
@@ -64,7 +60,6 @@
private TextView widgetMsgId = null;
private EditText widgetMsgStr = null;
- private AdView adView = null;
private String resourceFileName = null;
private Catalog catalog = null;
@@ -100,23 +95,6 @@ public void onCreate(Bundle inState) {
widgetMsgStr = (EditText) findViewById(R.id.wMsgStr);
widgetMsgStr.addTextChangedListener(this);
- final View activityRootView = findViewById(R.id.main_layout);
- activityRootView.getViewTreeObserver().addOnGlobalLayoutListener(
- new OnGlobalLayoutListener() {
-
- @Override
- public void onGlobalLayout() {
- Context ctx = getApplicationContext();
- int heightDiff = activityRootView.getRootView().getHeight() - activityRootView.getHeight();
- if (heightDiff > 100) {
- hideAdv();
- } else {
- showAdv();
- }
- }
- }
- );
-
this.messages = new ArrayList<Message>();
this.mLibrary = GestureLibraries.fromRawResource(this, R.raw.gestures);
@@ -130,23 +108,6 @@ public void onGlobalLayout() {
setTitle(title);
}
- protected void showAdv() {
- if (this.adView == null) {
- this.adView = new AdView(this, AdSize.BANNER, getString(R.string.admob_publisher_id));
- LinearLayout layout = (LinearLayout) findViewById(R.id.main_layout);
- layout.addView(adView);
- adView.loadAd(new AdRequest());
- }
- }
-
- protected void hideAdv() {
- if (this.adView != null) {
- this.adView.destroy();
- this.adView.setVisibility(View.GONE);
- this.adView = null;
- }
- }
-
@Override
protected void onSaveInstanceState(Bundle state) {
if (isCatalogReady) {
@@ -189,12 +150,6 @@ public boolean readInstanceState(Context c) {
return false;
}
- @Override
- public void onDestroy() {
- this.hideAdv();
- super.onDestroy();
- }
-
/**
* Saves current state of UI and variables.
*/

0 comments on commit f98afa9

Please sign in to comment.