Browse Source

added demo flavor; hide ad on demo

tags/v1.0.0^0
Robin Thoni 7 years ago
parent
commit
89bc90b9a3

+ 8
- 3
app/build.gradle View File

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

+ 42
- 0
app/src/demo/google-services.json View File

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 View File

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 View File

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

+ 1
- 1
app/src/main/res/layout/content_main.xml View File

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

+ 2
- 0
app/src/main/res/values/dimens.xml View File

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

Loading…
Cancel
Save