Просмотр исходного кода

added demo flavor; hide ad on demo

tags/v1.0.0^0
Robin Thoni 8 лет назад
Родитель
Сommit
89bc90b9a3

+ 8
- 3
app/build.gradle Просмотреть файл

@@ -2,9 +2,10 @@ apply plugin: 'com.android.application'
2 2
 apply plugin: 'android-apt'
3 3
 
4 4
 android {
5
+    signingConfigs {
6
+    }
5 7
     compileSdkVersion 23
6 8
     buildToolsVersion "23.0.3"
7
-
8 9
     dexOptions {
9 10
         javaMaxHeapSize "2048M"
10 11
     }
@@ -22,7 +23,6 @@ android {
22 23
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
23 24
         }
24 25
     }
25
-
26 26
     productFlavors {
27 27
         main {
28 28
         }
@@ -31,6 +31,11 @@ android {
31 31
             versionName "1.0-dev"
32 32
             minSdkVersion 21
33 33
         }
34
+        demo {
35
+            applicationId "com.rthoni.stssaguenay.demo"
36
+            versionName "1.0-demo"
37
+            minSdkVersion 21
38
+        }
34 39
         devlocal {
35 40
             applicationId "com.rthoni.stssaguenay.devlocal"
36 41
             versionName "1.0-devlocal"
@@ -40,7 +45,7 @@ android {
40 45
 }
41 46
 
42 47
 dependencies {
43
-    compile fileTree(dir: 'libs', include: ['*.jar'])
48
+    compile fileTree(include: ['*.jar'], dir: 'libs')
44 49
     testCompile 'junit:junit:4.12'
45 50
     compile 'com.android.support:appcompat-v7:23.4.0'
46 51
     compile 'com.android.support:support-annotations:23.4.0'

+ 42
- 0
app/src/demo/google-services.json Просмотреть файл

@@ -0,0 +1,42 @@
1
+{
2
+  "project_info": {
3
+    "project_number": "171393394108",
4
+    "firebase_url": "https://admob-app-id-3084832113.firebaseio.com",
5
+    "project_id": "admob-app-id-3084832113",
6
+    "storage_bucket": "admob-app-id-3084832113.appspot.com"
7
+  },
8
+  "client": [
9
+    {
10
+      "client_info": {
11
+        "mobilesdk_app_id": "1:171393394108:android:6fd8956541c81e90",
12
+        "android_client_info": {
13
+          "package_name": "com.rthoni.stssaguenay.demo"
14
+        }
15
+      },
16
+      "oauth_client": [
17
+        {
18
+          "client_id": "171393394108-eovbvhuab49spjk18c382f1ueqij1lvv.apps.googleusercontent.com",
19
+          "client_type": 3
20
+        }
21
+      ],
22
+      "api_key": [
23
+        {
24
+          "current_key": "AIzaSyDfBkaeX5670C6Y-AYZgl5wRNV-pr8mldw"
25
+        }
26
+      ],
27
+      "services": {
28
+        "analytics_service": {
29
+          "status": 1
30
+        },
31
+        "appinvite_service": {
32
+          "status": 1,
33
+          "other_platform_oauth_client": []
34
+        },
35
+        "ads_service": {
36
+          "status": 2
37
+        }
38
+      }
39
+    }
40
+  ],
41
+  "configuration_version": "1"
42
+}

+ 4
- 0
app/src/demo/res/values/dimens.xml Просмотреть файл

@@ -0,0 +1,4 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<resources>
3
+    <dimen name="ad_height">0dp</dimen>
4
+</resources>

+ 1
- 1
app/src/main/res/layout/activity_stop_picker.xml Просмотреть файл

@@ -18,7 +18,7 @@
18 18
     <com.google.android.gms.ads.AdView
19 19
         android:id="@+id/adView"
20 20
         android:layout_width="wrap_content"
21
-        android:layout_height="wrap_content"
21
+        android:layout_height="@dimen/ad_height"
22 22
         android:layout_centerHorizontal="true"
23 23
         android:layout_alignParentBottom="true"
24 24
         ads:adSize="BANNER"

+ 1
- 1
app/src/main/res/layout/content_main.xml Просмотреть файл

@@ -81,7 +81,7 @@
81 81
     <com.google.android.gms.ads.AdView
82 82
         android:id="@+id/adView"
83 83
         android:layout_width="wrap_content"
84
-        android:layout_height="wrap_content"
84
+        android:layout_height="@dimen/ad_height"
85 85
         android:layout_centerHorizontal="true"
86 86
         android:layout_alignParentBottom="true"
87 87
         ads:adSize="BANNER"

+ 2
- 0
app/src/main/res/values/dimens.xml Просмотреть файл

@@ -6,4 +6,6 @@
6 6
     <dimen name="nav_header_vertical_spacing">16dp</dimen>
7 7
     <dimen name="nav_header_height">160dp</dimen>
8 8
     <dimen name="fab_margin">16dp</dimen>
9
+
10
+    <dimen name="ad_height">-2dp</dimen>
9 11
 </resources>

Загрузка…
Отмена
Сохранить