/[projects]/android/admob/javadoc/com/admob/android/ads/AdView.html
ViewVC logotype

Contents of /android/admob/javadoc/com/admob/android/ads/AdView.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 337 - (show annotations) (download) (as text)
Wed Sep 23 12:54:05 2009 UTC (14 years, 8 months ago) by torben
File MIME type: text/html
File size: 47007 byte(s)
import admob library
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <!--NewPage-->
3 <HTML>
4 <HEAD>
5 <!-- Generated by javadoc (build 1.6.0_13) on Tue Jul 28 18:25:37 PDT 2009 -->
6 <TITLE>
7 AdView
8 </TITLE>
9
10 <META NAME="date" CONTENT="2009-07-28">
11
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
14 <SCRIPT type="text/javascript">
15 function windowTitle()
16 {
17 if (location.href.indexOf('is-external=true') == -1) {
18 parent.document.title="AdView";
19 }
20 }
21 </SCRIPT>
22 <NOSCRIPT>
23 </NOSCRIPT>
24
25 </HEAD>
26
27 <BODY BGCOLOR="white" onload="windowTitle();">
28 <HR>
29
30
31 <!-- ========= START OF TOP NAVBAR ======= -->
32 <A NAME="navbar_top"><!-- --></A>
33 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35 <TR>
36 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37 <A NAME="navbar_top_firstrow"><!-- --></A>
38 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39 <TR ALIGN="center" VALIGN="top">
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../com/admob/android/ads/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
41 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AdView.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
47 </TR>
48 </TABLE>
49 </TD>
50 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
51 </EM>
52 </TD>
53 </TR>
54
55 <TR>
56 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57 &nbsp;<A HREF="../../../../com/admob/android/ads/AdManager.Gender.html" title="enum in com.admob.android.ads"><B>PREV CLASS</B></A>&nbsp;
58 &nbsp;<A HREF="../../../../com/admob/android/ads/AdView.AdListener.html" title="interface in com.admob.android.ads"><B>NEXT CLASS</B></A></FONT></TD>
59 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
60 <A HREF="../../../../index.html?com/admob/android/ads/AdView.html" target="_top"><B>FRAMES</B></A> &nbsp;
61 &nbsp;<A HREF="AdView.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
62 &nbsp;<SCRIPT type="text/javascript">
63 <!--
64 if(window==top) {
65 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
66 }
67 //-->
68 </SCRIPT>
69 <NOSCRIPT>
70 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
71 </NOSCRIPT>
72
73
74 </FONT></TD>
75 </TR>
76 <TR>
77 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
78 SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
79 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
80 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
81 </TR>
82 </TABLE>
83 <A NAME="skip-navbar_top"></A>
84 <!-- ========= END OF TOP NAVBAR ========= -->
85
86 <HR>
87 <!-- ======== START OF CLASS DATA ======== -->
88 <H2>
89 <FONT SIZE="-1">
90 com.admob.android.ads</FONT>
91 <BR>
92 Class AdView</H2>
93 <PRE>
94 java.lang.Object
95 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by ">android.view.View
96 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by ">android.view.ViewGroup
97 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by ">android.widget.RelativeLayout
98 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.admob.android.ads.AdView</B>
99 </PRE>
100 <DL>
101 <DT><B>All Implemented Interfaces:</B> <DD>android.graphics.drawable.Drawable.Callback, android.view.KeyEvent.Callback, android.view.ViewManager, android.view.ViewParent</DD>
102 </DL>
103 <HR>
104 <DL>
105 <DT><PRE>public class <B>AdView</B><DT>extends android.widget.RelativeLayout</DL>
106 </PRE>
107
108 <P>
109 A view containing an advertisement. Advertisements are best allowed to be the width of the entire
110 screen. They are always 48 pixels tall. This creates a consistent and visually appealing ad.
111 <p>
112 Your application can tailor an ad's background and font colors. For example good-looking ads will
113 have the same font color as the background of the rest of the screen. It is not possible to
114 change the appearance of an ad being clicked; it will be orange to match the Android experience.
115 <p>
116 To improve the relevance of this advertisement you can supply hints. The <code>setKeywords</code>
117 method describes your application and the screen the ad is on. For example if this page is a recipe
118 for chocolate cake you might set keywords to "cookbook recipe chocolate cake". And if this ad
119 sits next to search results, which are more specific, you can use the <code>setSearchResults</code>
120 method. There are additional methods that improve relevancy across the application in
121 <code>AdManager</code>.
122 <p>
123 To have the view show a new ad call <code>requestFreshAd</code>. Normally this is not good practice
124 because the mobile screens are short lived. However if the screen is long running, such as a sports
125 scoreboard that might be shown for hours, it is appropriate to update the ad every minute or so.
126 <p>
127 If a user clicks on this view (with the keyboard or by touch screen) it minimizes this application
128 and brings up the browser to the ad's landing page. The user has to navigate back to this application
129 once they are done.
130 <P>
131
132 <P>
133 <HR>
134
135 <P>
136 <!-- ======== NESTED CLASS SUMMARY ======== -->
137
138 <A NAME="nested_class_summary"><!-- --></A>
139 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
140 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
141 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
142 <B>Nested Class Summary</B></FONT></TH>
143 </TR>
144 <TR BGCOLOR="white" CLASS="TableRowColor">
145 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
146 <CODE>static&nbsp;interface</CODE></FONT></TD>
147 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.AdListener.html" title="interface in com.admob.android.ads">AdView.AdListener</A></B></CODE>
148
149 <BR>
150 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Implement this interface to receive notifications of ad activity.</TD>
151 </TR>
152 </TABLE>
153 &nbsp;<A NAME="nested_classes_inherited_from_class_android.widget.RelativeLayout"><!-- --></A>
154 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
155 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
156 <TH ALIGN="left"><B>Nested classes/interfaces inherited from class android.widget.RelativeLayout</B></TH>
157 </TR>
158 <TR BGCOLOR="white" CLASS="TableRowColor">
159 <TD><CODE>android.widget.RelativeLayout.LayoutParams</CODE></TD>
160 </TR>
161 </TABLE>
162 &nbsp;
163 <A NAME="nested_classes_inherited_from_class_android.view.ViewGroup"><!-- --></A>
164 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
165 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
166 <TH ALIGN="left"><B>Nested classes/interfaces inherited from class android.view.ViewGroup</B></TH>
167 </TR>
168 <TR BGCOLOR="white" CLASS="TableRowColor">
169 <TD><CODE>android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListener</CODE></TD>
170 </TR>
171 </TABLE>
172 &nbsp;
173 <A NAME="nested_classes_inherited_from_class_android.view.View"><!-- --></A>
174 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
175 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
176 <TH ALIGN="left"><B>Nested classes/interfaces inherited from class android.view.View</B></TH>
177 </TR>
178 <TR BGCOLOR="white" CLASS="TableRowColor">
179 <TD><CODE>android.view.View.BaseSavedState, android.view.View.MeasureSpec, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnFocusChangeListener, android.view.View.OnKeyListener, android.view.View.OnLongClickListener, android.view.View.OnTouchListener</CODE></TD>
180 </TR>
181 </TABLE>
182 &nbsp;
183 <!-- =========== FIELD SUMMARY =========== -->
184
185 <A NAME="field_summary"><!-- --></A>
186 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
187 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
188 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
189 <B>Field Summary</B></FONT></TH>
190 </TR>
191 <TR BGCOLOR="white" CLASS="TableRowColor">
192 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
193 <CODE>static&nbsp;int</CODE></FONT></TD>
194 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#HEIGHT">HEIGHT</A></B></CODE>
195
196 <BR>
197 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The height of all ads.</TD>
198 </TR>
199 </TABLE>
200 &nbsp;<A NAME="fields_inherited_from_class_android.widget.RelativeLayout"><!-- --></A>
201 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
202 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
203 <TH ALIGN="left"><B>Fields inherited from class android.widget.RelativeLayout</B></TH>
204 </TR>
205 <TR BGCOLOR="white" CLASS="TableRowColor">
206 <TD><CODE>ABOVE, ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_LEFT, ALIGN_PARENT_BOTTOM, ALIGN_PARENT_LEFT, ALIGN_PARENT_RIGHT, ALIGN_PARENT_TOP, ALIGN_RIGHT, ALIGN_TOP, BELOW, CENTER_HORIZONTAL, CENTER_IN_PARENT, CENTER_VERTICAL, LEFT_OF, RIGHT_OF, TRUE</CODE></TD>
207 </TR>
208 </TABLE>
209 &nbsp;<A NAME="fields_inherited_from_class_android.view.ViewGroup"><!-- --></A>
210 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
211 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
212 <TH ALIGN="left"><B>Fields inherited from class android.view.ViewGroup</B></TH>
213 </TR>
214 <TR BGCOLOR="white" CLASS="TableRowColor">
215 <TD><CODE>CLIP_TO_PADDING_MASK, FLAG_USE_CHILD_DRAWING_ORDER, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE</CODE></TD>
216 </TR>
217 </TABLE>
218 &nbsp;<A NAME="fields_inherited_from_class_android.view.View"><!-- --></A>
219 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
220 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
221 <TH ALIGN="left"><B>Fields inherited from class android.view.View</B></TH>
222 </TR>
223 <TR BGCOLOR="white" CLASS="TableRowColor">
224 <TD><CODE>DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, INVISIBLE, KEEP_SCREEN_ON, NO_ID, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET</CODE></TD>
225 </TR>
226 </TABLE>
227 &nbsp;
228 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
229
230 <A NAME="constructor_summary"><!-- --></A>
231 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
232 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
233 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
234 <B>Constructor Summary</B></FONT></TH>
235 </TR>
236 <TR BGCOLOR="white" CLASS="TableRowColor">
237 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#AdView(android.content.Context)">AdView</A></B>(android.content.Context&nbsp;context)</CODE>
238
239 <BR>
240 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an advertisement view manually (not from a layout XML file).</TD>
241 </TR>
242 <TR BGCOLOR="white" CLASS="TableRowColor">
243 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#AdView(android.content.Context, android.util.AttributeSet)">AdView</A></B>(android.content.Context&nbsp;context,
244 android.util.AttributeSet&nbsp;attrs)</CODE>
245
246 <BR>
247 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an advertisment view from a layout XML file.</TD>
248 </TR>
249 <TR BGCOLOR="white" CLASS="TableRowColor">
250 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#AdView(android.content.Context, android.util.AttributeSet, int)">AdView</A></B>(android.content.Context&nbsp;context,
251 android.util.AttributeSet&nbsp;attrs,
252 int&nbsp;defStyle)</CODE>
253
254 <BR>
255 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an advertisment view from a layout XML file.</TD>
256 </TR>
257 </TABLE>
258 &nbsp;
259 <!-- ========== METHOD SUMMARY =========== -->
260
261 <A NAME="method_summary"><!-- --></A>
262 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
263 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
264 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
265 <B>Method Summary</B></FONT></TH>
266 </TR>
267 <TR BGCOLOR="white" CLASS="TableRowColor">
268 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
269 <CODE>&nbsp;int</CODE></FONT></TD>
270 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#getBackgroundColor()">getBackgroundColor</A></B>()</CODE>
271
272 <BR>
273 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
274 </TR>
275 <TR BGCOLOR="white" CLASS="TableRowColor">
276 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
277 <CODE>&nbsp;java.lang.String</CODE></FONT></TD>
278 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#getKeywords()">getKeywords</A></B>()</CODE>
279
280 <BR>
281 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
282 </TR>
283 <TR BGCOLOR="white" CLASS="TableRowColor">
284 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
285 <CODE>&nbsp;int</CODE></FONT></TD>
286 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#getRequestInterval()">getRequestInterval</A></B>()</CODE>
287
288 <BR>
289 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
290 </TR>
291 <TR BGCOLOR="white" CLASS="TableRowColor">
292 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
293 <CODE>&nbsp;java.lang.String</CODE></FONT></TD>
294 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#getSearchQuery()">getSearchQuery</A></B>()</CODE>
295
296 <BR>
297 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
298 </TR>
299 <TR BGCOLOR="white" CLASS="TableRowColor">
300 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
301 <CODE>&nbsp;int</CODE></FONT></TD>
302 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#getTextColor()">getTextColor</A></B>()</CODE>
303
304 <BR>
305 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
306 </TR>
307 <TR BGCOLOR="white" CLASS="TableRowColor">
308 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
309 <CODE>&nbsp;int</CODE></FONT></TD>
310 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#getVisibility()">getVisibility</A></B>()</CODE>
311
312 <BR>
313 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the enabled state of this view.</TD>
314 </TR>
315 <TR BGCOLOR="white" CLASS="TableRowColor">
316 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
317 <CODE>&nbsp;boolean</CODE></FONT></TD>
318 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#hasAd()">hasAd</A></B>()</CODE>
319
320 <BR>
321 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Says whether this view is showing an ad or not.</TD>
322 </TR>
323 <TR BGCOLOR="white" CLASS="TableRowColor">
324 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
325 <CODE>&nbsp;boolean</CODE></FONT></TD>
326 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#isGoneWithoutAd()">isGoneWithoutAd</A></B>()</CODE>
327
328 <BR>
329 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns if <code>getVisibility</code> is <code>GONE</code> when there is no ad.</TD>
330 </TR>
331 <TR BGCOLOR="white" CLASS="TableRowColor">
332 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
333 <CODE>protected &nbsp;void</CODE></FONT></TD>
334 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#onAttachedToWindow()">onAttachedToWindow</A></B>()</CODE>
335
336 <BR>
337 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
338 </TR>
339 <TR BGCOLOR="white" CLASS="TableRowColor">
340 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
341 <CODE>protected &nbsp;void</CODE></FONT></TD>
342 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#onDetachedFromWindow()">onDetachedFromWindow</A></B>()</CODE>
343
344 <BR>
345 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
346 </TR>
347 <TR BGCOLOR="white" CLASS="TableRowColor">
348 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
349 <CODE>protected &nbsp;void</CODE></FONT></TD>
350 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#onMeasure(int, int)">onMeasure</A></B>(int&nbsp;widthMeasureSpec,
351 int&nbsp;heightMeasureSpec)</CODE>
352
353 <BR>
354 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
355 </TR>
356 <TR BGCOLOR="white" CLASS="TableRowColor">
357 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
358 <CODE>&nbsp;void</CODE></FONT></TD>
359 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#onWindowFocusChanged(boolean)">onWindowFocusChanged</A></B>(boolean&nbsp;hasWindowFocus)</CODE>
360
361 <BR>
362 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when the window containing this ad gains or loses focus.</TD>
363 </TR>
364 <TR BGCOLOR="white" CLASS="TableRowColor">
365 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
366 <CODE>&nbsp;void</CODE></FONT></TD>
367 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#requestFreshAd()">requestFreshAd</A></B>()</CODE>
368
369 <BR>
370 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Updates this view with a new ad.</TD>
371 </TR>
372 <TR BGCOLOR="white" CLASS="TableRowColor">
373 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
374 <CODE>&nbsp;void</CODE></FONT></TD>
375 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#setBackgroundColor(int)">setBackgroundColor</A></B>(int&nbsp;color)</CODE>
376
377 <BR>
378 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the ad's background color.</TD>
379 </TR>
380 <TR BGCOLOR="white" CLASS="TableRowColor">
381 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
382 <CODE>&nbsp;void</CODE></FONT></TD>
383 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#setGoneWithoutAd(boolean)">setGoneWithoutAd</A></B>(boolean&nbsp;hide)</CODE>
384
385 <BR>
386 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the visibility of this view when there is no ad.</TD>
387 </TR>
388 <TR BGCOLOR="white" CLASS="TableRowColor">
389 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
390 <CODE>&nbsp;void</CODE></FONT></TD>
391 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#setKeywords(java.lang.String)">setKeywords</A></B>(java.lang.String&nbsp;keywords)</CODE>
392
393 <BR>
394 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Keywords are hints for the ad server that describe your application and the
395 screen this ad appears on.</TD>
396 </TR>
397 <TR BGCOLOR="white" CLASS="TableRowColor">
398 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
399 <CODE>&nbsp;void</CODE></FONT></TD>
400 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#setListener(com.admob.android.ads.AdView.AdListener)">setListener</A></B>(<A HREF="../../../../com/admob/android/ads/AdView.AdListener.html" title="interface in com.admob.android.ads">AdView.AdListener</A>&nbsp;listener)</CODE>
401
402 <BR>
403 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Makes the <code>listener</code> receive notifications of when a new ad has arrived
404 from AdMob and this view is about to display it.</TD>
405 </TR>
406 <TR BGCOLOR="white" CLASS="TableRowColor">
407 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
408 <CODE>&nbsp;void</CODE></FONT></TD>
409 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#setRequestInterval(int)">setRequestInterval</A></B>(int&nbsp;requestInterval)</CODE>
410
411 <BR>
412 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Makes this view display a new ad every <code>requestInterval</code> seconds.</TD>
413 </TR>
414 <TR BGCOLOR="white" CLASS="TableRowColor">
415 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
416 <CODE>&nbsp;void</CODE></FONT></TD>
417 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#setSearchQuery(java.lang.String)">setSearchQuery</A></B>(java.lang.String&nbsp;searchQuery)</CODE>
418
419 <BR>
420 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If this ad appears alonside search results provide the search query here.</TD>
421 </TR>
422 <TR BGCOLOR="white" CLASS="TableRowColor">
423 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
424 <CODE>&nbsp;void</CODE></FONT></TD>
425 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#setTextColor(int)">setTextColor</A></B>(int&nbsp;color)</CODE>
426
427 <BR>
428 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the ad's text color.</TD>
429 </TR>
430 <TR BGCOLOR="white" CLASS="TableRowColor">
431 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
432 <CODE>&nbsp;void</CODE></FONT></TD>
433 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdView.html#setVisibility(int)">setVisibility</A></B>(int&nbsp;visibility)</CODE>
434
435 <BR>
436 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the enabled state of this view.</TD>
437 </TR>
438 </TABLE>
439 &nbsp;<A NAME="methods_inherited_from_class_android.widget.RelativeLayout"><!-- --></A>
440 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
441 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
442 <TH ALIGN="left"><B>Methods inherited from class android.widget.RelativeLayout</B></TH>
443 </TR>
444 <TR BGCOLOR="white" CLASS="TableRowColor">
445 <TD><CODE>checkLayoutParams, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, getBaseline, onLayout, setGravity, setHorizontalGravity, setIgnoreGravity, setVerticalGravity</CODE></TD>
446 </TR>
447 </TABLE>
448 &nbsp;<A NAME="methods_inherited_from_class_android.view.ViewGroup"><!-- --></A>
449 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
450 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
451 <TH ALIGN="left"><B>Methods inherited from class android.view.ViewGroup</B></TH>
452 </TR>
453 <TR BGCOLOR="white" CLASS="TableRowColor">
454 <TD><CODE>addFocusables, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, canAnimate, childDrawableStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchDraw, dispatchFreezeSelfOnly, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetPressed, dispatchSetSelected, dispatchThawSelfOnly, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, findFocus, fitSystemWindows, focusableViewAvailable, focusSearch, gatherTransparentRegion, getChildAt, getChildCount, getChildDrawingOrder, getChildMeasureSpec, getChildStaticTransformation, getChildVisibleRect, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getPersistentDrawingCache, hasFocus, hasFocusable, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawnWithCacheEnabled, measureChild, measureChildren, measureChildWithMargins, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onAnimationEnd, onAnimationStart, onCreateDrawableState, onInterceptTouchEvent, onRequestFocusInDescendants, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setOnHierarchyChangeListener, setPadding, setPersistentDrawingCache, setStaticTransformationsEnabled, showContextMenuForChild, startLayoutAnimation, updateViewLayout</CODE></TD>
455 </TR>
456 </TABLE>
457 &nbsp;<A NAME="methods_inherited_from_class_android.view.View"><!-- --></A>
458 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
459 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
460 <TH ALIGN="left"><B>Methods inherited from class android.view.View</B></TH>
461 </TR>
462 <TR BGCOLOR="white" CLASS="TableRowColor">
463 <TD><CODE>bringToFront, buildDrawingCache, cancelLongPress, checkInputConnectionProxy, clearAnimation, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createContextMenu, destroyDrawingCache, draw, finalize, findViewById, findViewWithTag, focusSearch, forceLayout, getAnimation, getApplicationWindowToken, getBackground, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getContext, getContextMenuInfo, getDefaultSize, getDrawableState, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getKeepScreenOn, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMeasuredHeight, getMeasuredWidth, getNextFocusDownId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getResources, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getTag, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getVerticalFadingEdgeLength, getVerticalScrollbarWidth, getViewTreeObserver, getWidth, getWindowAttachCount, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, hasWindowFocus, inflate, initializeFadingEdge, initializeScrollbars, invalidate, invalidate, invalidate, invalidateDrawable, isClickable, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isInEditMode, isInTouchMode, isLayoutRequested, isLongClickable, isPaddingOffsetRequired, isPressed, isSaveEnabled, isSelected, isShown, isSoundEffectsEnabled, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onCheckIsTextEditor, onCreateContextMenu, onCreateInputConnection, onDraw, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onKeyDown, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onRestoreInstanceState, onSaveInstanceState, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onWindowVisibilityChanged, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, refreshDrawableState, removeCallbacks, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, setAnimation, setBackgroundDrawable, setBackgroundResource, setClickable, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setId, setKeepScreenOn, setLayoutParams, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnClickListener, setOnCreateContextMenuListener, setOnFocusChangeListener, setOnKeyListener, setOnLongClickListener, setOnTouchListener, setPressed, setSaveEnabled, setScrollBarStyle, setScrollContainer, setSelected, setSoundEffectsEnabled, setTag, setTouchDelegate, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setWillNotCacheDrawing, setWillNotDraw, showContextMenu, startAnimation, unscheduleDrawable, unscheduleDrawable, verifyDrawable, willNotCacheDrawing, willNotDraw</CODE></TD>
464 </TR>
465 </TABLE>
466 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
467 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
468 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
469 <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
470 </TR>
471 <TR BGCOLOR="white" CLASS="TableRowColor">
472 <TD><CODE>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
473 </TR>
474 </TABLE>
475 &nbsp;<A NAME="methods_inherited_from_class_android.view.ViewParent"><!-- --></A>
476 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
477 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
478 <TH ALIGN="left"><B>Methods inherited from interface android.view.ViewParent</B></TH>
479 </TR>
480 <TR BGCOLOR="white" CLASS="TableRowColor">
481 <TD><CODE>createContextMenu, getParent, isLayoutRequested, requestLayout</CODE></TD>
482 </TR>
483 </TABLE>
484 &nbsp;
485 <P>
486
487 <!-- ============ FIELD DETAIL =========== -->
488
489 <A NAME="field_detail"><!-- --></A>
490 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
491 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
492 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
493 <B>Field Detail</B></FONT></TH>
494 </TR>
495 </TABLE>
496
497 <A NAME="HEIGHT"><!-- --></A><H3>
498 HEIGHT</H3>
499 <PRE>
500 public static final int <B>HEIGHT</B></PRE>
501 <DL>
502 <DD>The height of all ads.
503 <P>
504 <DL>
505 <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.admob.android.ads.AdView.HEIGHT">Constant Field Values</A></DL>
506 </DL>
507
508 <!-- ========= CONSTRUCTOR DETAIL ======== -->
509
510 <A NAME="constructor_detail"><!-- --></A>
511 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
512 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
513 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
514 <B>Constructor Detail</B></FONT></TH>
515 </TR>
516 </TABLE>
517
518 <A NAME="AdView(android.content.Context)"><!-- --></A><H3>
519 AdView</H3>
520 <PRE>
521 public <B>AdView</B>(android.content.Context&nbsp;context)</PRE>
522 <DL>
523 <DD>Constructs an advertisement view manually (not from a layout XML file).
524 <P>
525 <DL>
526 <DT><B>Parameters:</B><DD><CODE>context</CODE> - is the application's context.<DT><B>See Also:</B><DD><CODE>View.View(Context)</CODE></DL>
527 </DL>
528 <HR>
529
530 <A NAME="AdView(android.content.Context, android.util.AttributeSet)"><!-- --></A><H3>
531 AdView</H3>
532 <PRE>
533 public <B>AdView</B>(android.content.Context&nbsp;context,
534 android.util.AttributeSet&nbsp;attrs)</PRE>
535 <DL>
536 <DD>Constructs an advertisment view from a layout XML file.
537 <P>
538 <DL>
539 <DT><B>Parameters:</B><DD><CODE>context</CODE> - is the application's context.<DD><CODE>attrs</CODE> - are attributes set in the XML layout for this view.<DT><B>See Also:</B><DD><CODE>View.View(android.content.Context, android.util.AttributeSet)</CODE></DL>
540 </DL>
541 <HR>
542
543 <A NAME="AdView(android.content.Context, android.util.AttributeSet, int)"><!-- --></A><H3>
544 AdView</H3>
545 <PRE>
546 public <B>AdView</B>(android.content.Context&nbsp;context,
547 android.util.AttributeSet&nbsp;attrs,
548 int&nbsp;defStyle)</PRE>
549 <DL>
550 <DD>Constructs an advertisment view from a layout XML file.
551 <P>
552 <DL>
553 <DT><B>Parameters:</B><DD><CODE>context</CODE> - is the application's context.<DD><CODE>attrs</CODE> - are attributes set in the XML layout for this view.<DD><CODE>defStyle</CODE> - is the theme ID to apply to this view.<DT><B>See Also:</B><DD><CODE>View.View(Context, AttributeSet, int)</CODE></DL>
554 </DL>
555
556 <!-- ============ METHOD DETAIL ========== -->
557
558 <A NAME="method_detail"><!-- --></A>
559 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
560 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
561 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
562 <B>Method Detail</B></FONT></TH>
563 </TR>
564 </TABLE>
565
566 <A NAME="requestFreshAd()"><!-- --></A><H3>
567 requestFreshAd</H3>
568 <PRE>
569 public void <B>requestFreshAd</B>()</PRE>
570 <DL>
571 <DD>Updates this view with a new ad.
572 <P>
573 <DD><DL>
574 </DL>
575 </DD>
576 </DL>
577 <HR>
578
579 <A NAME="getRequestInterval()"><!-- --></A><H3>
580 getRequestInterval</H3>
581 <PRE>
582 public int <B>getRequestInterval</B>()</PRE>
583 <DL>
584 <DD><DL>
585
586 <DT><B>Returns:</B><DD>The number of seconds between displaying new ads. The default is 0 which
587 means new ads will not be displayed unless <code>requestFreshAd</code> is called.</DL>
588 </DD>
589 </DL>
590 <HR>
591
592 <A NAME="setRequestInterval(int)"><!-- --></A><H3>
593 setRequestInterval</H3>
594 <PRE>
595 public void <B>setRequestInterval</B>(int&nbsp;requestInterval)</PRE>
596 <DL>
597 <DD>Makes this view display a new ad every <code>requestInterval</code> seconds. This
598 is a convenience method for ads on screens that are displayed for a long period of
599 time.
600 <p>
601 <b>This is usually not a good idea.</b> More ads != More money. A user is unlikely
602 to stop what they are doing. It is best to create a fluid experience by placing ads
603 at natural break points in your application. For example ads in games perform
604 best -- by far -- on game over screens or between levels.
605 <P>
606 <DD><DL>
607 <DT><B>Parameters:</B><DD><CODE>requestInterval</CODE> - is how many seconds to wait before replacing this ad with a
608 new one. If you use this method 60 seconds is a good value. Set this to 0 to turn
609 this feature off (the default).</DL>
610 </DD>
611 </DL>
612 <HR>
613
614 <A NAME="onWindowFocusChanged(boolean)"><!-- --></A><H3>
615 onWindowFocusChanged</H3>
616 <PRE>
617 public void <B>onWindowFocusChanged</B>(boolean&nbsp;hasWindowFocus)</PRE>
618 <DL>
619 <DD>Called when the window containing this ad gains or loses focus. The ad uses this event
620 to clean up resources.
621 <P>
622 <DD><DL>
623 <DT><B>Overrides:</B><DD><CODE>onWindowFocusChanged</CODE> in class <CODE>android.view.View</CODE></DL>
624 </DD>
625 <DD><DL>
626 <DT><B>See Also:</B><DD><CODE>View.onWindowFocusChanged(boolean)</CODE></DL>
627 </DD>
628 </DL>
629 <HR>
630
631 <A NAME="setTextColor(int)"><!-- --></A><H3>
632 setTextColor</H3>
633 <PRE>
634 public void <B>setTextColor</B>(int&nbsp;color)</PRE>
635 <DL>
636 <DD>Sets the ad's text color.
637 <p>
638 This can also be set in the XML layout by using the <code>textColor</code> attribute.
639 <P>
640 <DD><DL>
641 <DT><B>Parameters:</B><DD><CODE>color</CODE> - ARGB value for the ad text.<DT><B>See Also:</B><DD><CODE>R.color</CODE></DL>
642 </DD>
643 </DL>
644 <HR>
645
646 <A NAME="getTextColor()"><!-- --></A><H3>
647 getTextColor</H3>
648 <PRE>
649 public int <B>getTextColor</B>()</PRE>
650 <DL>
651 <DD><DL>
652
653 <DT><B>Returns:</B><DD>The text ARGB color value for the ad text.<DT><B>See Also:</B><DD><CODE>R.color</CODE></DL>
654 </DD>
655 </DL>
656 <HR>
657
658 <A NAME="setBackgroundColor(int)"><!-- --></A><H3>
659 setBackgroundColor</H3>
660 <PRE>
661 public void <B>setBackgroundColor</B>(int&nbsp;color)</PRE>
662 <DL>
663 <DD>Sets the ad's background color. A "shine" is applied over it which appears as
664 to reflect light from above the ad.
665 <p>
666 This can also be set in the XML layout by using the <code>backgroundColor</code> attribute.
667 <P>
668 <DD><DL>
669 <DT><B>Overrides:</B><DD><CODE>setBackgroundColor</CODE> in class <CODE>android.view.View</CODE></DL>
670 </DD>
671 <DD><DL>
672 <DT><B>Parameters:</B><DD><CODE>color</CODE> - ARGB value for the ad.<DT><B>See Also:</B><DD><CODE>R.color</CODE></DL>
673 </DD>
674 </DL>
675 <HR>
676
677 <A NAME="getBackgroundColor()"><!-- --></A><H3>
678 getBackgroundColor</H3>
679 <PRE>
680 public int <B>getBackgroundColor</B>()</PRE>
681 <DL>
682 <DD><DL>
683
684 <DT><B>Returns:</B><DD>The background ARGB color value for the ad.<DT><B>See Also:</B><DD><CODE>R.color</CODE></DL>
685 </DD>
686 </DL>
687 <HR>
688
689 <A NAME="getKeywords()"><!-- --></A><H3>
690 getKeywords</H3>
691 <PRE>
692 public java.lang.String <B>getKeywords</B>()</PRE>
693 <DL>
694 <DD><DL>
695
696 <DT><B>Returns:</B><DD>The optional set of keywords that describe this application and where the ad
697 appears or <code>null</code>.</DL>
698 </DD>
699 </DL>
700 <HR>
701
702 <A NAME="setKeywords(java.lang.String)"><!-- --></A><H3>
703 setKeywords</H3>
704 <PRE>
705 public void <B>setKeywords</B>(java.lang.String&nbsp;keywords)</PRE>
706 <DL>
707 <DD>Keywords are hints for the ad server that describe your application and the
708 screen this ad appears on. For example if the ad was at the bottom of a game
709 of checkers you might set this to "checkers game".
710 <p>
711 This can also be set in the XML layout by using the <code>keywords</code> attribute.
712 <P>
713 <DD><DL>
714 <DT><B>Parameters:</B><DD><CODE>keywords</CODE> - is an optional set of words that describe your application and where the ad appears.
715 Keywords can be removed by setting this to <code>null</code>.</DL>
716 </DD>
717 </DL>
718 <HR>
719
720 <A NAME="getSearchQuery()"><!-- --></A><H3>
721 getSearchQuery</H3>
722 <PRE>
723 public java.lang.String <B>getSearchQuery</B>()</PRE>
724 <DL>
725 <DD><DL>
726
727 <DT><B>Returns:</B><DD>The optional search query this ad appears within or <code>null</code>.</DL>
728 </DD>
729 </DL>
730 <HR>
731
732 <A NAME="setSearchQuery(java.lang.String)"><!-- --></A><H3>
733 setSearchQuery</H3>
734 <PRE>
735 public void <B>setSearchQuery</B>(java.lang.String&nbsp;searchQuery)</PRE>
736 <DL>
737 <DD>If this ad appears alonside search results provide the search query here. Search queries
738 differ from keywords in that they are more specific.
739 <P>
740 <DD><DL>
741 <DT><B>Parameters:</B><DD><CODE>searchQuery</CODE> - is an optional search query if this ad appears within search results.</DL>
742 </DD>
743 </DL>
744 <HR>
745
746 <A NAME="setGoneWithoutAd(boolean)"><!-- --></A><H3>
747 setGoneWithoutAd</H3>
748 <PRE>
749 public void <B>setGoneWithoutAd</B>(boolean&nbsp;hide)</PRE>
750 <DL>
751 <DD>Sets the visibility of this view when there is no ad. Reasons there might not be an
752 ad include it has just been added, the server does not return an ad, or the user is not
753 in cell range. In these cases you may want to set this to <code>true</code> which
754 would make its visibililty <code>GONE</code>. Then once an ad is received it will
755 change to <code>setVisibility</code>.
756 <p>
757 If you want this view to always take up space, but want the color scheme to be different
758 with and without an ad, implement <code>AdListener</code>. Start with the color you
759 want when there is no ad then change it when a new ad comes in.
760 <P>
761 <DD><DL>
762 <DT><B>Parameters:</B><DD><CODE>hide</CODE> - when <code>true</code> will stop this view from taking up any screen space
763 until there is an ad. When <code>false</code> (the default) it will appear as an
764 empty rectangle.</DL>
765 </DD>
766 </DL>
767 <HR>
768
769 <A NAME="isGoneWithoutAd()"><!-- --></A><H3>
770 isGoneWithoutAd</H3>
771 <PRE>
772 public boolean <B>isGoneWithoutAd</B>()</PRE>
773 <DL>
774 <DD>Returns if <code>getVisibility</code> is <code>GONE</code> when there is no ad. When
775 an ad is obtained from the servers this means nothing.
776 <P>
777 <DD><DL>
778
779 <DT><B>Returns:</B><DD><code>true</code> if this view is <code>GONE</code> until there is an ad or
780 <code>false</code> if <code>setVisibility</code> will be respected.</DL>
781 </DD>
782 </DL>
783 <HR>
784
785 <A NAME="setVisibility(int)"><!-- --></A><H3>
786 setVisibility</H3>
787 <PRE>
788 public void <B>setVisibility</B>(int&nbsp;visibility)</PRE>
789 <DL>
790 <DD>Set the enabled state of this view.
791 <P>
792 <DD><DL>
793 <DT><B>Overrides:</B><DD><CODE>setVisibility</CODE> in class <CODE>android.view.View</CODE></DL>
794 </DD>
795 <DD><DL>
796 <DT><B>Parameters:</B><DD><CODE>visibility</CODE> - is one of <code>VISIBLE</code>, <code>INVISIBLE</code>, or <code>GONE</code>.</DL>
797 </DD>
798 </DL>
799 <HR>
800
801 <A NAME="getVisibility()"><!-- --></A><H3>
802 getVisibility</H3>
803 <PRE>
804 public int <B>getVisibility</B>()</PRE>
805 <DL>
806 <DD>Gets the enabled state of this view. This is not necessarily what was set in
807 <code>setVisibility</code>. If there is no ad and if <code>isGoneWithoutAd</code> returns
808 <code>true</code> this will be <code>GONE</code>.
809 <P>
810 <DD><DL>
811 <DT><B>Overrides:</B><DD><CODE>getVisibility</CODE> in class <CODE>android.view.View</CODE></DL>
812 </DD>
813 <DD><DL>
814
815 <DT><B>Returns:</B><DD>The visibility is one of <code>VISIBLE</code>, <code>INVISIBLE</code>, or <code>GONE</code>.<DT><B>See Also:</B><DD><A HREF="../../../../com/admob/android/ads/AdView.html#isGoneWithoutAd()"><CODE>isGoneWithoutAd()</CODE></A></DL>
816 </DD>
817 </DL>
818 <HR>
819
820 <A NAME="setListener(com.admob.android.ads.AdView.AdListener)"><!-- --></A><H3>
821 setListener</H3>
822 <PRE>
823 public void <B>setListener</B>(<A HREF="../../../../com/admob/android/ads/AdView.AdListener.html" title="interface in com.admob.android.ads">AdView.AdListener</A>&nbsp;listener)</PRE>
824 <DL>
825 <DD>Makes the <code>listener</code> receive notifications of when a new ad has arrived
826 from AdMob and this view is about to display it. The listener is a good place to
827 change the colors of an ad or hide the view when there is no ad.
828 <P>
829 <DD><DL>
830 <DT><B>Parameters:</B><DD><CODE>listener</CODE> - is the object to receive event notifications or <code>null</code>
831 to stop getting notifications.</DL>
832 </DD>
833 </DL>
834 <HR>
835
836 <A NAME="hasAd()"><!-- --></A><H3>
837 hasAd</H3>
838 <PRE>
839 public boolean <B>hasAd</B>()</PRE>
840 <DL>
841 <DD>Says whether this view is showing an ad or not. Ads will not exist until they are
842 downloaded from the servers which takes a fraction of a second. It is also possible
843 there are no ads to display or there is a connection problem (like the user does not
844 have a signal).
845 <P>
846 <DD><DL>
847
848 <DT><B>Returns:</B><DD><code>true</code> if this view is showing an ad or <code>false</code> if it
849 is empty.</DL>
850 </DD>
851 </DL>
852 <HR>
853
854 <A NAME="onMeasure(int, int)"><!-- --></A><H3>
855 onMeasure</H3>
856 <PRE>
857 protected void <B>onMeasure</B>(int&nbsp;widthMeasureSpec,
858 int&nbsp;heightMeasureSpec)</PRE>
859 <DL>
860 <DD><DL>
861 <DT><B>Overrides:</B><DD><CODE>onMeasure</CODE> in class <CODE>android.widget.RelativeLayout</CODE></DL>
862 </DD>
863 <DD><DL>
864 </DL>
865 </DD>
866 </DL>
867 <HR>
868
869 <A NAME="onAttachedToWindow()"><!-- --></A><H3>
870 onAttachedToWindow</H3>
871 <PRE>
872 protected void <B>onAttachedToWindow</B>()</PRE>
873 <DL>
874 <DD><DL>
875 <DT><B>Overrides:</B><DD><CODE>onAttachedToWindow</CODE> in class <CODE>android.view.View</CODE></DL>
876 </DD>
877 <DD><DL>
878 </DL>
879 </DD>
880 </DL>
881 <HR>
882
883 <A NAME="onDetachedFromWindow()"><!-- --></A><H3>
884 onDetachedFromWindow</H3>
885 <PRE>
886 protected void <B>onDetachedFromWindow</B>()</PRE>
887 <DL>
888 <DD><DL>
889 <DT><B>Overrides:</B><DD><CODE>onDetachedFromWindow</CODE> in class <CODE>android.view.View</CODE></DL>
890 </DD>
891 <DD><DL>
892 </DL>
893 </DD>
894 </DL>
895 <!-- ========= END OF CLASS DATA ========= -->
896 <HR>
897
898
899 <!-- ======= START OF BOTTOM NAVBAR ====== -->
900 <A NAME="navbar_bottom"><!-- --></A>
901 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
902 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
903 <TR>
904 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
905 <A NAME="navbar_bottom_firstrow"><!-- --></A>
906 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
907 <TR ALIGN="center" VALIGN="top">
908 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../com/admob/android/ads/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
909 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
910 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AdView.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
911 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
912 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
913 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
914 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
915 </TR>
916 </TABLE>
917 </TD>
918 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
919 </EM>
920 </TD>
921 </TR>
922
923 <TR>
924 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
925 &nbsp;<A HREF="../../../../com/admob/android/ads/AdManager.Gender.html" title="enum in com.admob.android.ads"><B>PREV CLASS</B></A>&nbsp;
926 &nbsp;<A HREF="../../../../com/admob/android/ads/AdView.AdListener.html" title="interface in com.admob.android.ads"><B>NEXT CLASS</B></A></FONT></TD>
927 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
928 <A HREF="../../../../index.html?com/admob/android/ads/AdView.html" target="_top"><B>FRAMES</B></A> &nbsp;
929 &nbsp;<A HREF="AdView.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
930 &nbsp;<SCRIPT type="text/javascript">
931 <!--
932 if(window==top) {
933 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
934 }
935 //-->
936 </SCRIPT>
937 <NOSCRIPT>
938 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
939 </NOSCRIPT>
940
941
942 </FONT></TD>
943 </TR>
944 <TR>
945 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
946 SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
947 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
948 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
949 </TR>
950 </TABLE>
951 <A NAME="skip-navbar_bottom"></A>
952 <!-- ======== END OF BOTTOM NAVBAR ======= -->
953
954 <HR>
955
956 </BODY>
957 </HTML>

  ViewVC Help
Powered by ViewVC 1.1.20