Merci, ça me rassure .... c'est un problème en moins !!Ce message s'affiche sur les téléphone référencé comme de développement. Sinon c'est e la pub
Et sinon, pour reprendre une question que j'ai posée dans un autre poste et que je vais annuler vu que je te la repose ici,
vu que tu as l'expérience avec AdMob, peux-tu, stp, m'indiquer comment tu fais pour positionner là où tu veux ta bannière ? Dans mon cas, la bannière se met toujours tout en bas de l'ACTIVITY.
Pour info, j'ai mis "android:id="@+id/mainLayout"" dans le LinearLayout principal du Layout.
Merci.
Elle se place là où tu l'as mise dans le fichier XML normalement.
Peux tu nous poster l'intégralité de ton layout XML ?
Merci.
En fait, j'ai suivi ce tutorial ( http://code.google.com/intl/fr-FR/mo...damentals.html ) et dans mon layout, je n'ai donc que rajouté le : android:id="@+id/mainLayout"
Mais comment puis-je faire si je souhaite positionner ma bannière entre mes 2 TableLayout dans l'exemple ci dessous, par exemple ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:id="@+id/mainLayout" > <TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="1" android:shrinkColumns="1"> <TableRow android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/calculatorTitle" android:text="Calcul" android:layout_gravity="center_horizontal"/> </TableRow> <TableRow android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/aLabel" android:text=""/> <EditText android:id="@+id/a" android:inputType="numberDecimal" singleLine="true"/> </TableRow> <TableRow android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/bLabel" android:text=""/> <EditText android:id="@+id/b" android:inputType="numberDecimal" singleLine="true"/> </TableRow> </TableLayout> <TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="1" android:shrinkColumns="1"> <TableRow android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/aLabel" android:text="Question / Réponse : "/> <RadioGroup android:id="@+id/conditionCalcul" android:orientation="horizontal" android:padding="3dip" android:layout_gravity="center_horizontal"> <TextView android:id="@+id/oLabel" android:text="Oui"/> <RadioButton android:id="@+id/ouiButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Oui" android:paddingRight="2dip" /> <TextView android:id="@+id/nLabel" android:text="Non"/> <RadioButton android:id="@+id/nonButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Non" android:paddingRight="2dip" /> </RadioGroup> </TableRow> <TableRow android:layout_width="match_parent" android:layout_height="wrap_content"> <Button android:id="@+id/validateCalcul" android:text="Valider" android:layout_gravity="center_horizontal"/> </TableRow> </TableLayout> </LinearLayout>
Ok, c'est parce que tu rajoutes ta bannière depuis ton code Java.
Mais tu peux également directement l'intégrer dans ton layout xml comme présenté ici : http://code.google.com/intl/fr-FR/mo...anner_xml.html
Tu verras que pour le placement de ta bannière c'est plus simple.
C'est bon .... après 3h de bonne galère .... je viens enfin d'y arriver !!!
Et c'est tjs pareil .... une fois que je trouve la solution, je me dis, mais pourquoi ai je mis 3h pour ça ??!!
Juste une question :
d'après ce que j'ai compris ... il faut remplacer le TEST_DEVICE_ID par le code de mon émulateur .... mais je n'ai pas réussi à le trouver dans le LogCat.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 <com.google.ads.AdView android:id="@+id/adView" android:layout_width="wrap_content" android:layout_height="wrap_content" ads:adUnitId="XXXXXXX" ads:adSize="BANNER" ads:testDevices="TEST_EMULATOR, TEST_DEVICE_ID" ads:loadAdOnCreate="true"/>
Voyez vous ce dont je veux parler ?
Je déterre un thread un peu ancien mais vu que je me posais la même question et que j'ai trouvé une réponse qui me convenait ...
Voici un lien pour retrouver ton TEST_DEVICE_ID http://webhole.net/2011/12/02/androi...est-device-id/il faut remplacer le TEST_DEVICE_ID par le code de mon émulateur .... mais je n'ai pas réussi à le trouver dans le LogCat.
Voyez vous ce dont je veux parler ?
Ce topic va presque devenir un tuto![]()
Partager