blob: 6b09049966a963a8c0ca8438e0493dbe82fdf9f3 [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
2 * Copyright (C) 2006 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.view;
18
19import android.content.pm.ActivityInfo;
20import android.graphics.PixelFormat;
21import android.os.IBinder;
22import android.os.Parcel;
23import android.os.Parcelable;
24import android.text.TextUtils;
25import android.util.Log;
26
27
28/**
29 * The interface that apps use to talk to the window manager.
30 * <p>
31 * Use <code>Context.getSystemService(Context.WINDOW_SERVICE)</code> to get one of these.
32 *
33 * @see android.content.Context#getSystemService
34 * @see android.content.Context#WINDOW_SERVICE
35 */
36public interface WindowManager extends ViewManager {
37 /**
38 * Exception that is thrown when trying to add view whose
39 * {@link WindowManager.LayoutParams} {@link WindowManager.LayoutParams#token}
40 * is invalid.
41 */
42 public static class BadTokenException extends RuntimeException {
43 public BadTokenException() {
44 }
45
46 public BadTokenException(String name) {
47 super(name);
48 }
49 }
50
51 /**
52 * Use this method to get the default Display object.
53 *
54 * @return default Display object
55 */
56 public Display getDefaultDisplay();
57
58 /**
59 * Special variation of {@link #removeView} that immediately invokes
60 * the given view hierarchy's {@link View#onDetachedFromWindow()
61 * View.onDetachedFromWindow()} methods before returning. This is not
62 * for normal applications; using it correctly requires great care.
63 *
64 * @param view The view to be removed.
65 */
66 public void removeViewImmediate(View view);
67
Dianne Hackborn7eec10e2010-11-12 18:03:47 -080068 /**
69 * Return true if this window manager is configured to request hardware
70 * accelerated windows. This does <em>not</em> guarantee that they will
71 * actually be accelerated, since that depends on the device supporting them.
72 * @hide
73 */
74 public boolean isHardwareAccelerated();
75
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080076 public static class LayoutParams extends ViewGroup.LayoutParams
77 implements Parcelable {
78 /**
79 * X position for this window. With the default gravity it is ignored.
Fabrice Di Meglio9e3b0022011-06-06 16:30:29 -070080 * When using {@link Gravity#LEFT} or {@link Gravity#START} or {@link Gravity#RIGHT} or
81 * {@link Gravity#END} it provides an offset from the given edge.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080082 */
Romain Guy529b60a2010-08-03 18:05:47 -070083 @ViewDebug.ExportedProperty
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080084 public int x;
85
86 /**
87 * Y position for this window. With the default gravity it is ignored.
88 * When using {@link Gravity#TOP} or {@link Gravity#BOTTOM} it provides
89 * an offset from the given edge.
90 */
Romain Guy529b60a2010-08-03 18:05:47 -070091 @ViewDebug.ExportedProperty
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080092 public int y;
93
94 /**
95 * Indicates how much of the extra space will be allocated horizontally
96 * to the view associated with these LayoutParams. Specify 0 if the view
97 * should not be stretched. Otherwise the extra pixels will be pro-rated
98 * among all views whose weight is greater than 0.
99 */
Romain Guy529b60a2010-08-03 18:05:47 -0700100 @ViewDebug.ExportedProperty
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800101 public float horizontalWeight;
102
103 /**
104 * Indicates how much of the extra space will be allocated vertically
105 * to the view associated with these LayoutParams. Specify 0 if the view
106 * should not be stretched. Otherwise the extra pixels will be pro-rated
107 * among all views whose weight is greater than 0.
108 */
Romain Guy529b60a2010-08-03 18:05:47 -0700109 @ViewDebug.ExportedProperty
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800110 public float verticalWeight;
Romain Guy529b60a2010-08-03 18:05:47 -0700111
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800112 /**
113 * The general type of window. There are three main classes of
114 * window types:
115 * <ul>
116 * <li> <strong>Application windows</strong> (ranging from
117 * {@link #FIRST_APPLICATION_WINDOW} to
118 * {@link #LAST_APPLICATION_WINDOW}) are normal top-level application
119 * windows. For these types of windows, the {@link #token} must be
120 * set to the token of the activity they are a part of (this will
121 * normally be done for you if {@link #token} is null).
122 * <li> <strong>Sub-windows</strong> (ranging from
123 * {@link #FIRST_SUB_WINDOW} to
124 * {@link #LAST_SUB_WINDOW}) are associated with another top-level
125 * window. For these types of windows, the {@link #token} must be
126 * the token of the window it is attached to.
127 * <li> <strong>System windows</strong> (ranging from
128 * {@link #FIRST_SYSTEM_WINDOW} to
129 * {@link #LAST_SYSTEM_WINDOW}) are special types of windows for
130 * use by the system for specific purposes. They should not normally
131 * be used by applications, and a special permission is required
132 * to use them.
133 * </ul>
134 *
135 * @see #TYPE_BASE_APPLICATION
136 * @see #TYPE_APPLICATION
137 * @see #TYPE_APPLICATION_STARTING
138 * @see #TYPE_APPLICATION_PANEL
139 * @see #TYPE_APPLICATION_MEDIA
140 * @see #TYPE_APPLICATION_SUB_PANEL
141 * @see #TYPE_APPLICATION_ATTACHED_DIALOG
142 * @see #TYPE_STATUS_BAR
143 * @see #TYPE_SEARCH_BAR
144 * @see #TYPE_PHONE
145 * @see #TYPE_SYSTEM_ALERT
146 * @see #TYPE_KEYGUARD
147 * @see #TYPE_TOAST
148 * @see #TYPE_SYSTEM_OVERLAY
149 * @see #TYPE_PRIORITY_PHONE
150 * @see #TYPE_STATUS_BAR_PANEL
151 * @see #TYPE_SYSTEM_DIALOG
152 * @see #TYPE_KEYGUARD_DIALOG
153 * @see #TYPE_SYSTEM_ERROR
154 * @see #TYPE_INPUT_METHOD
155 * @see #TYPE_INPUT_METHOD_DIALOG
156 */
Joe Onorato8f2bd432010-03-25 11:45:28 -0700157 @ViewDebug.ExportedProperty(mapping = {
158 @ViewDebug.IntToString(from = TYPE_BASE_APPLICATION, to = "TYPE_BASE_APPLICATION"),
159 @ViewDebug.IntToString(from = TYPE_APPLICATION, to = "TYPE_APPLICATION"),
160 @ViewDebug.IntToString(from = TYPE_APPLICATION_STARTING, to = "TYPE_APPLICATION_STARTING"),
161 @ViewDebug.IntToString(from = TYPE_APPLICATION_PANEL, to = "TYPE_APPLICATION_PANEL"),
162 @ViewDebug.IntToString(from = TYPE_APPLICATION_MEDIA, to = "TYPE_APPLICATION_MEDIA"),
163 @ViewDebug.IntToString(from = TYPE_APPLICATION_SUB_PANEL, to = "TYPE_APPLICATION_SUB_PANEL"),
164 @ViewDebug.IntToString(from = TYPE_APPLICATION_ATTACHED_DIALOG, to = "TYPE_APPLICATION_ATTACHED_DIALOG"),
165 @ViewDebug.IntToString(from = TYPE_STATUS_BAR, to = "TYPE_STATUS_BAR"),
166 @ViewDebug.IntToString(from = TYPE_SEARCH_BAR, to = "TYPE_SEARCH_BAR"),
167 @ViewDebug.IntToString(from = TYPE_PHONE, to = "TYPE_PHONE"),
168 @ViewDebug.IntToString(from = TYPE_SYSTEM_ALERT, to = "TYPE_SYSTEM_ALERT"),
169 @ViewDebug.IntToString(from = TYPE_KEYGUARD, to = "TYPE_KEYGUARD"),
170 @ViewDebug.IntToString(from = TYPE_TOAST, to = "TYPE_TOAST"),
171 @ViewDebug.IntToString(from = TYPE_SYSTEM_OVERLAY, to = "TYPE_SYSTEM_OVERLAY"),
172 @ViewDebug.IntToString(from = TYPE_PRIORITY_PHONE, to = "TYPE_PRIORITY_PHONE"),
173 @ViewDebug.IntToString(from = TYPE_STATUS_BAR_PANEL, to = "TYPE_STATUS_BAR_PANEL"),
Joe Onorato29fc2c92010-11-24 10:26:50 -0800174 @ViewDebug.IntToString(from = TYPE_STATUS_BAR_SUB_PANEL, to = "TYPE_STATUS_BAR_SUB_PANEL"),
Joe Onorato8f2bd432010-03-25 11:45:28 -0700175 @ViewDebug.IntToString(from = TYPE_SYSTEM_DIALOG, to = "TYPE_SYSTEM_DIALOG"),
176 @ViewDebug.IntToString(from = TYPE_KEYGUARD_DIALOG, to = "TYPE_KEYGUARD_DIALOG"),
177 @ViewDebug.IntToString(from = TYPE_SYSTEM_ERROR, to = "TYPE_SYSTEM_ERROR"),
178 @ViewDebug.IntToString(from = TYPE_INPUT_METHOD, to = "TYPE_INPUT_METHOD"),
Jeff Brown3b2b3542010-10-15 00:54:27 -0700179 @ViewDebug.IntToString(from = TYPE_INPUT_METHOD_DIALOG, to = "TYPE_INPUT_METHOD_DIALOG"),
180 @ViewDebug.IntToString(from = TYPE_SECURE_SYSTEM_OVERLAY, to = "TYPE_SECURE_SYSTEM_OVERLAY")
Joe Onorato8f2bd432010-03-25 11:45:28 -0700181 })
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800182 public int type;
183
184 /**
185 * Start of window types that represent normal application windows.
186 */
187 public static final int FIRST_APPLICATION_WINDOW = 1;
188
189 /**
190 * Window type: an application window that serves as the "base" window
191 * of the overall application; all other application windows will
192 * appear on top of it.
193 */
194 public static final int TYPE_BASE_APPLICATION = 1;
195
196 /**
197 * Window type: a normal application window. The {@link #token} must be
198 * an Activity token identifying who the window belongs to.
199 */
200 public static final int TYPE_APPLICATION = 2;
201
202 /**
203 * Window type: special application window that is displayed while the
204 * application is starting. Not for use by applications themselves;
205 * this is used by the system to display something until the
206 * application can show its own windows.
207 */
208 public static final int TYPE_APPLICATION_STARTING = 3;
209
210 /**
211 * End of types of application windows.
212 */
213 public static final int LAST_APPLICATION_WINDOW = 99;
214
215 /**
216 * Start of types of sub-windows. The {@link #token} of these windows
217 * must be set to the window they are attached to. These types of
218 * windows are kept next to their attached window in Z-order, and their
219 * coordinate space is relative to their attached window.
220 */
221 public static final int FIRST_SUB_WINDOW = 1000;
222
223 /**
224 * Window type: a panel on top of an application window. These windows
225 * appear on top of their attached window.
226 */
227 public static final int TYPE_APPLICATION_PANEL = FIRST_SUB_WINDOW;
228
229 /**
230 * Window type: window for showing media (e.g. video). These windows
231 * are displayed behind their attached window.
232 */
233 public static final int TYPE_APPLICATION_MEDIA = FIRST_SUB_WINDOW+1;
234
235 /**
236 * Window type: a sub-panel on top of an application window. These
237 * windows are displayed on top their attached window and any
238 * {@link #TYPE_APPLICATION_PANEL} panels.
239 */
240 public static final int TYPE_APPLICATION_SUB_PANEL = FIRST_SUB_WINDOW+2;
241
242 /** Window type: like {@link #TYPE_APPLICATION_PANEL}, but layout
243 * of the window happens as that of a top-level window, <em>not</em>
244 * as a child of its container.
245 */
246 public static final int TYPE_APPLICATION_ATTACHED_DIALOG = FIRST_SUB_WINDOW+3;
247
248 /**
Dianne Hackbornc4d5d022009-05-21 17:32:42 -0700249 * Window type: window for showing overlays on top of media windows.
250 * These windows are displayed between TYPE_APPLICATION_MEDIA and the
251 * application window. They should be translucent to be useful. This
252 * is a big ugly hack so:
253 * @hide
254 */
255 public static final int TYPE_APPLICATION_MEDIA_OVERLAY = FIRST_SUB_WINDOW+4;
256
257 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800258 * End of types of sub-windows.
259 */
260 public static final int LAST_SUB_WINDOW = 1999;
261
262 /**
263 * Start of system-specific window types. These are not normally
264 * created by applications.
265 */
266 public static final int FIRST_SYSTEM_WINDOW = 2000;
267
268 /**
269 * Window type: the status bar. There can be only one status bar
270 * window; it is placed at the top of the screen, and all other
271 * windows are shifted down so they are below it.
272 */
273 public static final int TYPE_STATUS_BAR = FIRST_SYSTEM_WINDOW;
274
275 /**
276 * Window type: the search bar. There can be only one search bar
277 * window; it is placed at the top of the screen.
278 */
279 public static final int TYPE_SEARCH_BAR = FIRST_SYSTEM_WINDOW+1;
280
281 /**
282 * Window type: phone. These are non-application windows providing
283 * user interaction with the phone (in particular incoming calls).
284 * These windows are normally placed above all applications, but behind
285 * the status bar.
286 */
287 public static final int TYPE_PHONE = FIRST_SYSTEM_WINDOW+2;
288
289 /**
290 * Window type: system window, such as low power alert. These windows
291 * are always on top of application windows.
292 */
293 public static final int TYPE_SYSTEM_ALERT = FIRST_SYSTEM_WINDOW+3;
294
295 /**
296 * Window type: keyguard window.
297 */
298 public static final int TYPE_KEYGUARD = FIRST_SYSTEM_WINDOW+4;
299
300 /**
301 * Window type: transient notifications.
302 */
303 public static final int TYPE_TOAST = FIRST_SYSTEM_WINDOW+5;
304
305 /**
306 * Window type: system overlay windows, which need to be displayed
307 * on top of everything else. These windows must not take input
308 * focus, or they will interfere with the keyguard.
309 */
310 public static final int TYPE_SYSTEM_OVERLAY = FIRST_SYSTEM_WINDOW+6;
311
312 /**
313 * Window type: priority phone UI, which needs to be displayed even if
314 * the keyguard is active. These windows must not take input
315 * focus, or they will interfere with the keyguard.
316 */
317 public static final int TYPE_PRIORITY_PHONE = FIRST_SYSTEM_WINDOW+7;
318
319 /**
320 * Window type: panel that slides out from the status bar
321 */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800322 public static final int TYPE_SYSTEM_DIALOG = FIRST_SYSTEM_WINDOW+8;
323
324 /**
325 * Window type: dialogs that the keyguard shows
326 */
327 public static final int TYPE_KEYGUARD_DIALOG = FIRST_SYSTEM_WINDOW+9;
328
329 /**
330 * Window type: internal system error windows, appear on top of
331 * everything they can.
332 */
333 public static final int TYPE_SYSTEM_ERROR = FIRST_SYSTEM_WINDOW+10;
334
335 /**
336 * Window type: internal input methods windows, which appear above
337 * the normal UI. Application windows may be resized or panned to keep
338 * the input focus visible while this window is displayed.
339 */
340 public static final int TYPE_INPUT_METHOD = FIRST_SYSTEM_WINDOW+11;
341
342 /**
343 * Window type: internal input methods dialog windows, which appear above
344 * the current input method window.
345 */
346 public static final int TYPE_INPUT_METHOD_DIALOG= FIRST_SYSTEM_WINDOW+12;
347
348 /**
Dianne Hackborn4c62fc02009-08-08 20:40:27 -0700349 * Window type: wallpaper window, placed behind any window that wants
350 * to sit on top of the wallpaper.
351 */
352 public static final int TYPE_WALLPAPER = FIRST_SYSTEM_WINDOW+13;
353
354 /**
Joe Onorato29fc2c92010-11-24 10:26:50 -0800355 * Window type: panel that slides out from over the status bar
Dianne Hackbornbadc47e2009-11-08 17:37:07 -0800356 */
357 public static final int TYPE_STATUS_BAR_PANEL = FIRST_SYSTEM_WINDOW+14;
Jeff Brown3b2b3542010-10-15 00:54:27 -0700358
359 /**
360 * Window type: secure system overlay windows, which need to be displayed
361 * on top of everything else. These windows must not take input
362 * focus, or they will interfere with the keyguard.
363 *
364 * This is exactly like {@link #TYPE_SYSTEM_OVERLAY} except that only the
365 * system itself is allowed to create these overlays. Applications cannot
366 * obtain permission to create secure system overlays.
367 * @hide
368 */
369 public static final int TYPE_SECURE_SYSTEM_OVERLAY = FIRST_SYSTEM_WINDOW+15;
370
Dianne Hackbornbadc47e2009-11-08 17:37:07 -0800371 /**
Christopher Tatea53146c2010-09-07 11:57:52 -0700372 * Window type: the drag-and-drop pseudowindow. There is only one
373 * drag layer (at most), and it is placed on top of all other windows.
374 * @hide
375 */
Jeff Brown3b2b3542010-10-15 00:54:27 -0700376 public static final int TYPE_DRAG = FIRST_SYSTEM_WINDOW+16;
Christopher Tatea53146c2010-09-07 11:57:52 -0700377
378 /**
Joe Onorato29fc2c92010-11-24 10:26:50 -0800379 * Window type: panel that slides out from under the status bar
Joe Onoratoa89e9032010-11-24 11:13:44 -0800380 * @hide
Joe Onorato29fc2c92010-11-24 10:26:50 -0800381 */
382 public static final int TYPE_STATUS_BAR_SUB_PANEL = FIRST_SYSTEM_WINDOW+17;
383
Jeff Brown83c09682010-12-23 17:50:18 -0800384 /**
385 * Window type: (mouse) pointer
386 * @hide
387 */
388 public static final int TYPE_POINTER = FIRST_SYSTEM_WINDOW+18;
Joe Onorato29fc2c92010-11-24 10:26:50 -0800389
390 /**
Daniel Sandler8956dbb2011-04-22 07:55:02 -0400391 * Window type: Navigation bar (when distinct from status bar)
392 * @hide
393 */
394 public static final int TYPE_NAVIGATION_BAR = FIRST_SYSTEM_WINDOW+19;
395
396 /**
Dianne Hackborne8ecde12011-08-03 18:55:19 -0700397 * Window type: The volume level overlay/dialog shown when the user
398 * changes the system volume.
399 * @hide
400 */
401 public static final int TYPE_VOLUME_OVERLAY = FIRST_SYSTEM_WINDOW+20;
402
403 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800404 * End of types of system windows.
405 */
406 public static final int LAST_SYSTEM_WINDOW = 2999;
407
408 /**
Mathias Agopiand2112302010-12-07 19:38:17 -0800409 * @deprecated this is ignored
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800410 */
Mathias Agopiand2112302010-12-07 19:38:17 -0800411 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800412 public int memoryType;
413
Mathias Agopiand2112302010-12-07 19:38:17 -0800414 /** @deprecated this is ignored, this value is set automatically when needed. */
415 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800416 public static final int MEMORY_TYPE_NORMAL = 0;
Mathias Agopiand2112302010-12-07 19:38:17 -0800417 /** @deprecated this is ignored, this value is set automatically when needed. */
Mathias Agopian317a6282009-08-13 17:29:02 -0700418 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800419 public static final int MEMORY_TYPE_HARDWARE = 1;
Mathias Agopiand2112302010-12-07 19:38:17 -0800420 /** @deprecated this is ignored, this value is set automatically when needed. */
Mathias Agopian317a6282009-08-13 17:29:02 -0700421 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800422 public static final int MEMORY_TYPE_GPU = 2;
Mathias Agopiand2112302010-12-07 19:38:17 -0800423 /** @deprecated this is ignored, this value is set automatically when needed. */
424 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800425 public static final int MEMORY_TYPE_PUSH_BUFFERS = 3;
426
427 /**
428 * Various behavioral options/flags. Default is none.
429 *
430 * @see #FLAG_BLUR_BEHIND
431 * @see #FLAG_DIM_BEHIND
432 * @see #FLAG_NOT_FOCUSABLE
433 * @see #FLAG_NOT_TOUCHABLE
434 * @see #FLAG_NOT_TOUCH_MODAL
435 * @see #FLAG_LAYOUT_IN_SCREEN
436 * @see #FLAG_DITHER
437 * @see #FLAG_KEEP_SCREEN_ON
438 * @see #FLAG_FULLSCREEN
439 * @see #FLAG_FORCE_NOT_FULLSCREEN
440 * @see #FLAG_IGNORE_CHEEK_PRESSES
Romain Guy529b60a2010-08-03 18:05:47 -0700441 * @see #FLAG_HARDWARE_ACCELERATED
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800442 */
Joe Onorato8f2bd432010-03-25 11:45:28 -0700443 @ViewDebug.ExportedProperty(flagMapping = {
444 @ViewDebug.FlagToString(mask = FLAG_BLUR_BEHIND, equals = FLAG_BLUR_BEHIND,
445 name = "FLAG_BLUR_BEHIND"),
446 @ViewDebug.FlagToString(mask = FLAG_DIM_BEHIND, equals = FLAG_DIM_BEHIND,
447 name = "FLAG_DIM_BEHIND"),
448 @ViewDebug.FlagToString(mask = FLAG_NOT_FOCUSABLE, equals = FLAG_NOT_FOCUSABLE,
449 name = "FLAG_NOT_FOCUSABLE"),
450 @ViewDebug.FlagToString(mask = FLAG_NOT_TOUCHABLE, equals = FLAG_NOT_TOUCHABLE,
451 name = "FLAG_NOT_TOUCHABLE"),
452 @ViewDebug.FlagToString(mask = FLAG_NOT_TOUCH_MODAL, equals = FLAG_NOT_TOUCH_MODAL,
453 name = "FLAG_NOT_TOUCH_MODAL"),
454 @ViewDebug.FlagToString(mask = FLAG_LAYOUT_IN_SCREEN, equals = FLAG_LAYOUT_IN_SCREEN,
455 name = "FLAG_LAYOUT_IN_SCREEN"),
456 @ViewDebug.FlagToString(mask = FLAG_DITHER, equals = FLAG_DITHER,
457 name = "FLAG_DITHER"),
Daniel Sandler20e92712010-04-02 16:51:58 -0400458 @ViewDebug.FlagToString(mask = FLAG_TURN_SCREEN_ON, equals = FLAG_TURN_SCREEN_ON,
459 name = "FLAG_TURN_SCREEN_ON"),
Joe Onorato8f2bd432010-03-25 11:45:28 -0700460 @ViewDebug.FlagToString(mask = FLAG_KEEP_SCREEN_ON, equals = FLAG_KEEP_SCREEN_ON,
461 name = "FLAG_KEEP_SCREEN_ON"),
Daniel Sandler20e92712010-04-02 16:51:58 -0400462 @ViewDebug.FlagToString(mask = FLAG_SHOW_WHEN_LOCKED, equals = FLAG_SHOW_WHEN_LOCKED,
463 name = "FLAG_SHOW_WHEN_LOCKED"),
464 @ViewDebug.FlagToString(mask = FLAG_ALLOW_LOCK_WHILE_SCREEN_ON, equals = FLAG_ALLOW_LOCK_WHILE_SCREEN_ON,
465 name = "FLAG_ALLOW_LOCK_WHILE_SCREEN_ON"),
466 @ViewDebug.FlagToString(mask = FLAG_DISMISS_KEYGUARD, equals = FLAG_DISMISS_KEYGUARD,
467 name = "FLAG_DISMISS_KEYGUARD"),
Joe Onorato8f2bd432010-03-25 11:45:28 -0700468 @ViewDebug.FlagToString(mask = FLAG_FULLSCREEN, equals = FLAG_FULLSCREEN,
469 name = "FLAG_FULLSCREEN"),
470 @ViewDebug.FlagToString(mask = FLAG_FORCE_NOT_FULLSCREEN,
471 equals = FLAG_FORCE_NOT_FULLSCREEN, name = "FLAG_FORCE_NOT_FULLSCREEN"),
472 @ViewDebug.FlagToString(mask = FLAG_IGNORE_CHEEK_PRESSES,
Romain Guy529b60a2010-08-03 18:05:47 -0700473 equals = FLAG_IGNORE_CHEEK_PRESSES, name = "FLAG_IGNORE_CHEEK_PRESSES"),
474 @ViewDebug.FlagToString(mask = FLAG_HARDWARE_ACCELERATED,
475 equals = FLAG_HARDWARE_ACCELERATED, name = "FLAG_HARDWARE_ACCELERATED")
Joe Onorato8f2bd432010-03-25 11:45:28 -0700476 })
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800477 public int flags;
478
Mike Lockwoodef731622010-01-27 17:51:34 -0500479 /** Window flag: as long as this window is visible to the user, allow
480 * the lock screen to activate while the screen is on.
481 * This can be used independently, or in combination with
Christopher Tate95f78502010-01-29 15:57:34 -0800482 * {@link #FLAG_KEEP_SCREEN_ON} and/or {@link #FLAG_SHOW_WHEN_LOCKED} */
Mike Lockwoodef731622010-01-27 17:51:34 -0500483 public static final int FLAG_ALLOW_LOCK_WHILE_SCREEN_ON = 0x00000001;
484
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800485 /** Window flag: everything behind this window will be dimmed.
486 * Use {@link #dimAmount} to control the amount of dim. */
487 public static final int FLAG_DIM_BEHIND = 0x00000002;
488
489 /** Window flag: blur everything behind this window. */
490 public static final int FLAG_BLUR_BEHIND = 0x00000004;
491
492 /** Window flag: this window won't ever get key input focus, so the
493 * user can not send key or other button events to it. Those will
494 * instead go to whatever focusable window is behind it. This flag
495 * will also enable {@link #FLAG_NOT_TOUCH_MODAL} whether or not that
496 * is explicitly set.
497 *
498 * <p>Setting this flag also implies that the window will not need to
499 * interact with
500 * a soft input method, so it will be Z-ordered and positioned
501 * independently of any active input method (typically this means it
502 * gets Z-ordered on top of the input method, so it can use the full
503 * screen for its content and cover the input method if needed. You
504 * can use {@link #FLAG_ALT_FOCUSABLE_IM} to modify this behavior. */
505 public static final int FLAG_NOT_FOCUSABLE = 0x00000008;
506
507 /** Window flag: this window can never receive touch events. */
508 public static final int FLAG_NOT_TOUCHABLE = 0x00000010;
509
510 /** Window flag: Even when this window is focusable (its
511 * {@link #FLAG_NOT_FOCUSABLE is not set), allow any pointer events
512 * outside of the window to be sent to the windows behind it. Otherwise
513 * it will consume all pointer events itself, regardless of whether they
514 * are inside of the window. */
515 public static final int FLAG_NOT_TOUCH_MODAL = 0x00000020;
516
517 /** Window flag: When set, if the device is asleep when the touch
518 * screen is pressed, you will receive this first touch event. Usually
519 * the first touch event is consumed by the system since the user can
520 * not see what they are pressing on.
521 */
522 public static final int FLAG_TOUCHABLE_WHEN_WAKING = 0x00000040;
523
524 /** Window flag: as long as this window is visible to the user, keep
525 * the device's screen turned on and bright. */
526 public static final int FLAG_KEEP_SCREEN_ON = 0x00000080;
527
528 /** Window flag: place the window within the entire screen, ignoring
529 * decorations around the border (a.k.a. the status bar). The
530 * window must correctly position its contents to take the screen
531 * decoration into account. This flag is normally set for you
532 * by Window as described in {@link Window#setFlags}. */
533 public static final int FLAG_LAYOUT_IN_SCREEN = 0x00000100;
534
535 /** Window flag: allow window to extend outside of the screen. */
536 public static final int FLAG_LAYOUT_NO_LIMITS = 0x00000200;
537
538 /** Window flag: Hide all screen decorations (e.g. status bar) while
539 * this window is displayed. This allows the window to use the entire
540 * display space for itself -- the status bar will be hidden when
541 * an app window with this flag set is on the top layer. */
542 public static final int FLAG_FULLSCREEN = 0x00000400;
543
544 /** Window flag: Override {@link #FLAG_FULLSCREEN and force the
545 * screen decorations (such as status bar) to be shown. */
546 public static final int FLAG_FORCE_NOT_FULLSCREEN = 0x00000800;
547
548 /** Window flag: turn on dithering when compositing this window to
549 * the screen. */
550 public static final int FLAG_DITHER = 0x00001000;
551
552 /** Window flag: don't allow screen shots while this window is
Glenn Kastend6f5bde2011-01-19 15:27:27 -0800553 * displayed. Maps to Surface.SECURE. */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800554 public static final int FLAG_SECURE = 0x00002000;
555
556 /** Window flag: a special mode where the layout parameters are used
557 * to perform scaling of the surface when it is composited to the
558 * screen. */
559 public static final int FLAG_SCALED = 0x00004000;
560
561 /** Window flag: intended for windows that will often be used when the user is
562 * holding the screen against their face, it will aggressively filter the event
563 * stream to prevent unintended presses in this situation that may not be
564 * desired for a particular window, when such an event stream is detected, the
565 * application will receive a CANCEL motion event to indicate this so applications
566 * can handle this accordingly by taking no action on the event
567 * until the finger is released. */
568 public static final int FLAG_IGNORE_CHEEK_PRESSES = 0x00008000;
569
570 /** Window flag: a special option only for use in combination with
571 * {@link #FLAG_LAYOUT_IN_SCREEN}. When requesting layout in the
572 * screen your window may appear on top of or behind screen decorations
573 * such as the status bar. By also including this flag, the window
574 * manager will report the inset rectangle needed to ensure your
575 * content is not covered by screen decorations. This flag is normally
576 * set for you by Window as described in {@link Window#setFlags}.*/
577 public static final int FLAG_LAYOUT_INSET_DECOR = 0x00010000;
578
579 /** Window flag: invert the state of {@link #FLAG_NOT_FOCUSABLE} with
580 * respect to how this window interacts with the current method. That
581 * is, if FLAG_NOT_FOCUSABLE is set and this flag is set, then the
582 * window will behave as if it needs to interact with the input method
583 * and thus be placed behind/away from it; if FLAG_NOT_FOCUSABLE is
584 * not set and this flag is set, then the window will behave as if it
585 * doesn't need to interact with the input method and can be placed
586 * to use more space and cover the input method.
587 */
588 public static final int FLAG_ALT_FOCUSABLE_IM = 0x00020000;
589
590 /** Window flag: if you have set {@link #FLAG_NOT_TOUCH_MODAL}, you
591 * can set this flag to receive a single special MotionEvent with
592 * the action
593 * {@link MotionEvent#ACTION_OUTSIDE MotionEvent.ACTION_OUTSIDE} for
594 * touches that occur outside of your window. Note that you will not
595 * receive the full down/move/up gesture, only the location of the
596 * first down as an ACTION_OUTSIDE.
597 */
598 public static final int FLAG_WATCH_OUTSIDE_TOUCH = 0x00040000;
599
Suchi Amalapurapud1a93372009-05-14 17:54:31 -0700600 /** Window flag: special flag to let windows be shown when the screen
601 * is locked. This will let application windows take precedence over
602 * key guard or any other lock screens. Can be used with
603 * {@link #FLAG_KEEP_SCREEN_ON} to turn screen on and display windows
Dianne Hackborn9bfb7072009-09-22 11:37:40 -0700604 * directly before showing the key guard window. Can be used with
605 * {@link #FLAG_DISMISS_KEYGUARD} to automatically fully dismisss
606 * non-secure keyguards. This flag only applies to the top-most
607 * full-screen window.
Dianne Hackborn4c62fc02009-08-08 20:40:27 -0700608 */
Suchi Amalapurapud1a93372009-05-14 17:54:31 -0700609 public static final int FLAG_SHOW_WHEN_LOCKED = 0x00080000;
610
Dianne Hackborn4c62fc02009-08-08 20:40:27 -0700611 /** Window flag: ask that the system wallpaper be shown behind
612 * your window. The window surface must be translucent to be able
613 * to actually see the wallpaper behind it; this flag just ensures
614 * that the wallpaper surface will be there if this window actually
615 * has translucent regions.
616 */
617 public static final int FLAG_SHOW_WALLPAPER = 0x00100000;
618
Dianne Hackborn93e462b2009-09-15 22:50:40 -0700619 /** Window flag: when set as a window is being added or made
620 * visible, once the window has been shown then the system will
621 * poke the power manager's user activity (as if the user had woken
622 * up the device) to turn the screen on. */
623 public static final int FLAG_TURN_SCREEN_ON = 0x00200000;
624
Dianne Hackborn9bfb7072009-09-22 11:37:40 -0700625 /** Window flag: when set the window will cause the keyguard to
626 * be dismissed, only if it is not a secure lock keyguard. Because such
627 * a keyguard is not needed for security, it will never re-appear if
628 * the user navigates to another window (in contrast to
629 * {@link #FLAG_SHOW_WHEN_LOCKED}, which will only temporarily
630 * hide both secure and non-secure keyguards but ensure they reappear
631 * when the user moves to another UI that doesn't hide them).
632 * If the keyguard is currently active and is secure (requires an
633 * unlock pattern) than the user will still need to confirm it before
634 * seeing this window, unless {@link #FLAG_SHOW_WHEN_LOCKED} has
Daniel Sandlerae069f72010-06-17 21:56:26 -0400635 * also been set.
636 */
Dianne Hackborn9bfb7072009-09-22 11:37:40 -0700637 public static final int FLAG_DISMISS_KEYGUARD = 0x00400000;
Jeff Brown01ce2e92010-09-26 22:20:12 -0700638
639 /** Window flag: when set the window will accept for touch events
640 * outside of its bounds to be sent to other windows that also
641 * support split touch. When this flag is not set, the first pointer
642 * that goes down determines the window to which all subsequent touches
643 * go until all pointers go up. When this flag is set, each pointer
644 * (not necessarily the first) that goes down determines the window
645 * to which all subsequent touches of that pointer will go until that
646 * pointer goes up thereby enabling touches with multiple pointers
647 * to be split across multiple windows.
Dianne Hackbornd9b3b7e2010-11-16 18:22:49 -0800648 */
Jeff Brown01ce2e92010-09-26 22:20:12 -0700649 public static final int FLAG_SPLIT_TOUCH = 0x00800000;
Dianne Hackbornd9b3b7e2010-11-16 18:22:49 -0800650
651 /**
Romain Guy72f0a272011-01-09 16:01:46 -0800652 * <p>Indicates whether this window should be hardware accelerated.
653 * Requesting hardware acceleration does not guarantee it will happen.</p>
654 *
655 * <p>This flag can be controlled programmatically <em>only</em> to enable
656 * hardware acceleration. To enable hardware acceleration for a given
657 * window programmatically, do the following:</p>
658 *
659 * <pre>
660 * Window w = activity.getWindow(); // in Activity's onCreate() for instance
661 * w.setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
662 * WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
663 * </pre>
664 *
665 * <p>It is important to remember that this flag <strong>must</strong>
666 * be set before setting the content view of your activity or dialog.</p>
667 *
668 * <p>This flag cannot be used to disable hardware acceleration after it
669 * was enabled in your manifest using
670 * {@link android.R.attr#hardwareAccelerated}. If you need to selectively
671 * and programmatically disable hardware acceleration (for automated testing
672 * for instance), make sure it is turned off in your manifest and enable it
673 * on your activity or dialog when you need it instead, using the method
674 * described above.</p>
675 *
676 * <p>This flag is automatically set by the system if the
677 * {@link android.R.attr#hardwareAccelerated android:hardwareAccelerated}
678 * XML attribute is set to true on an activity or on the application.</p>
Dianne Hackbornd9b3b7e2010-11-16 18:22:49 -0800679 */
680 public static final int FLAG_HARDWARE_ACCELERATED = 0x01000000;
Jim Miller3fa8a452011-03-09 19:38:07 -0800681
682 /**
683 * Like {@link #FLAG_HARDWARE_ACCELERATED} except for trusted system windows
684 * that need hardware acceleration (e.g. LockScreen), where hardware acceleration
685 * is generally disabled. This flag must be specified in addition to
686 * {@link #FLAG_HARDWARE_ACCELERATED} to enable hardware acceleration for system
687 * windows.
688 *
689 * @hide
690 */
691 public static final int FLAG_HARDWARE_ACCELERATED_SYSTEM = 0x02000000;
Daniel Sandler611fae42010-06-17 10:45:00 -0400692
Dianne Hackbornd9b3b7e2010-11-16 18:22:49 -0800693 // ----- HIDDEN FLAGS.
694 // These start at the high bit and go down.
Jeff Brown98db5fa2011-06-08 15:37:10 -0700695
696 /** Window flag: Enable touches to slide out of a window into neighboring
697 * windows in mid-gesture instead of being captured for the duration of
698 * the gesture.
699 *
700 * This flag changes the behavior of touch focus for this window only.
701 * Touches can slide out of the window but they cannot necessarily slide
702 * back in (unless the other window with touch focus permits it).
703 *
704 * {@hide}
705 */
706 public static final int FLAG_SLIPPERY = 0x04000000;
707
Daniel Sandlere02d8082010-10-08 15:13:22 -0400708 /**
709 * Flag for a window belonging to an activity that responds to {@link KeyEvent#KEYCODE_MENU}
710 * and therefore needs a Menu key. For devices where Menu is a physical button this flag is
711 * ignored, but on devices where the Menu key is drawn in software it may be hidden unless
712 * this flag is set.
713 *
714 * (Note that Action Bars, when available, are the preferred way to offer additional
715 * functions otherwise accessed via an options menu.)
716 *
717 * {@hide}
718 */
Dianne Hackbornd9b3b7e2010-11-16 18:22:49 -0800719 public static final int FLAG_NEEDS_MENU_KEY = 0x08000000;
Daniel Sandlere02d8082010-10-08 15:13:22 -0400720
Dianne Hackborn3b3e1452009-09-24 19:22:12 -0700721 /** Window flag: *sigh* The lock screen wants to continue running its
722 * animation while it is fading. A kind-of hack to allow this. Maybe
723 * in the future we just make this the default behavior.
724 *
725 * {@hide} */
726 public static final int FLAG_KEEP_SURFACE_WHILE_ANIMATING = 0x10000000;
727
Mitsuru Oshima1ecf5d22009-07-06 17:20:38 -0700728 /** Window flag: special flag to limit the size of the window to be
729 * original size ([320x480] x density). Used to create window for applications
730 * running under compatibility mode.
731 *
732 * {@hide} */
Dianne Hackborn4c62fc02009-08-08 20:40:27 -0700733 public static final int FLAG_COMPATIBLE_WINDOW = 0x20000000;
Mitsuru Oshima1ecf5d22009-07-06 17:20:38 -0700734
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800735 /** Window flag: a special option intended for system dialogs. When
736 * this flag is set, the window will demand focus unconditionally when
737 * it is created.
738 * {@hide} */
739 public static final int FLAG_SYSTEM_ERROR = 0x40000000;
740
741 /**
742 * Given a particular set of window manager flags, determine whether
743 * such a window may be a target for an input method when it has
744 * focus. In particular, this checks the
745 * {@link #FLAG_NOT_FOCUSABLE} and {@link #FLAG_ALT_FOCUSABLE_IM}
746 * flags and returns true if the combination of the two corresponds
747 * to a window that needs to be behind the input method so that the
748 * user can type into it.
749 *
750 * @param flags The current window manager flags.
751 *
752 * @return Returns true if such a window should be behind/interact
753 * with an input method, false if not.
754 */
755 public static boolean mayUseInputMethod(int flags) {
756 switch (flags&(FLAG_NOT_FOCUSABLE|FLAG_ALT_FOCUSABLE_IM)) {
757 case 0:
758 case FLAG_NOT_FOCUSABLE|FLAG_ALT_FOCUSABLE_IM:
759 return true;
760 }
761 return false;
762 }
763
764 /**
765 * Mask for {@link #softInputMode} of the bits that determine the
766 * desired visibility state of the soft input area for this window.
767 */
768 public static final int SOFT_INPUT_MASK_STATE = 0x0f;
769
770 /**
771 * Visibility state for {@link #softInputMode}: no state has been specified.
772 */
773 public static final int SOFT_INPUT_STATE_UNSPECIFIED = 0;
774
775 /**
776 * Visibility state for {@link #softInputMode}: please don't change the state of
777 * the soft input area.
778 */
779 public static final int SOFT_INPUT_STATE_UNCHANGED = 1;
780
781 /**
782 * Visibility state for {@link #softInputMode}: please hide any soft input
783 * area when normally appropriate (when the user is navigating
784 * forward to your window).
785 */
786 public static final int SOFT_INPUT_STATE_HIDDEN = 2;
787
788 /**
789 * Visibility state for {@link #softInputMode}: please always hide any
790 * soft input area when this window receives focus.
791 */
792 public static final int SOFT_INPUT_STATE_ALWAYS_HIDDEN = 3;
793
794 /**
795 * Visibility state for {@link #softInputMode}: please show the soft
796 * input area when normally appropriate (when the user is navigating
797 * forward to your window).
798 */
799 public static final int SOFT_INPUT_STATE_VISIBLE = 4;
800
801 /**
802 * Visibility state for {@link #softInputMode}: please always make the
803 * soft input area visible when this window receives input focus.
804 */
805 public static final int SOFT_INPUT_STATE_ALWAYS_VISIBLE = 5;
806
807 /**
808 * Mask for {@link #softInputMode} of the bits that determine the
809 * way that the window should be adjusted to accommodate the soft
810 * input window.
811 */
812 public static final int SOFT_INPUT_MASK_ADJUST = 0xf0;
813
814 /** Adjustment option for {@link #softInputMode}: nothing specified.
815 * The system will try to pick one or
816 * the other depending on the contents of the window.
817 */
818 public static final int SOFT_INPUT_ADJUST_UNSPECIFIED = 0x00;
819
820 /** Adjustment option for {@link #softInputMode}: set to allow the
821 * window to be resized when an input
822 * method is shown, so that its contents are not covered by the input
Scott Mainf10e6332010-06-11 09:03:22 -0700823 * method. This can <em>not</em> be combined with
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800824 * {@link #SOFT_INPUT_ADJUST_PAN}; if
825 * neither of these are set, then the system will try to pick one or
826 * the other depending on the contents of the window.
827 */
828 public static final int SOFT_INPUT_ADJUST_RESIZE = 0x10;
829
830 /** Adjustment option for {@link #softInputMode}: set to have a window
831 * pan when an input method is
832 * shown, so it doesn't need to deal with resizing but just panned
833 * by the framework to ensure the current input focus is visible. This
Scott Mainf10e6332010-06-11 09:03:22 -0700834 * can <em>not</em> be combined with {@link #SOFT_INPUT_ADJUST_RESIZE}; if
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800835 * neither of these are set, then the system will try to pick one or
836 * the other depending on the contents of the window.
837 */
838 public static final int SOFT_INPUT_ADJUST_PAN = 0x20;
839
Dianne Hackborndea3ef72010-10-28 14:24:22 -0700840 /** Adjustment option for {@link #softInputMode}: set to have a window
841 * not adjust for a shown input method. The window will not be resized,
842 * and it will not be panned to make its focus visible.
843 */
844 public static final int SOFT_INPUT_ADJUST_NOTHING = 0x30;
845
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800846 /**
847 * Bit for {@link #softInputMode}: set when the user has navigated
848 * forward to the window. This is normally set automatically for
849 * you by the system, though you may want to set it in certain cases
850 * when you are displaying a window yourself. This flag will always
851 * be cleared automatically after the window is displayed.
852 */
853 public static final int SOFT_INPUT_IS_FORWARD_NAVIGATION = 0x100;
Mike Lockwoodfb73f792009-11-20 11:31:18 -0500854
855 /**
Gilles Debunnebe2c4f92011-01-17 15:14:32 -0800856 * Desired operating mode for any soft input area. May be any combination
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800857 * of:
858 *
859 * <ul>
860 * <li> One of the visibility states
861 * {@link #SOFT_INPUT_STATE_UNSPECIFIED}, {@link #SOFT_INPUT_STATE_UNCHANGED},
862 * {@link #SOFT_INPUT_STATE_HIDDEN}, {@link #SOFT_INPUT_STATE_ALWAYS_VISIBLE}, or
863 * {@link #SOFT_INPUT_STATE_VISIBLE}.
864 * <li> One of the adjustment options
865 * {@link #SOFT_INPUT_ADJUST_UNSPECIFIED},
866 * {@link #SOFT_INPUT_ADJUST_RESIZE}, or
867 * {@link #SOFT_INPUT_ADJUST_PAN}.
868 */
869 public int softInputMode;
870
871 /**
Dianne Hackborn8eb2e242010-11-01 12:31:24 -0700872 * Placement of window within the screen as per {@link Gravity}. Both
873 * {@link Gravity#apply(int, int, int, android.graphics.Rect, int, int,
874 * android.graphics.Rect) Gravity.apply} and
875 * {@link Gravity#applyDisplay(int, android.graphics.Rect, android.graphics.Rect)
876 * Gravity.applyDisplay} are used during window layout, with this value
877 * given as the desired gravity. For example you can specify
878 * {@link Gravity#DISPLAY_CLIP_HORIZONTAL Gravity.DISPLAY_CLIP_HORIZONTAL} and
879 * {@link Gravity#DISPLAY_CLIP_VERTICAL Gravity.DISPLAY_CLIP_VERTICAL} here
880 * to control the behavior of
881 * {@link Gravity#applyDisplay(int, android.graphics.Rect, android.graphics.Rect)
882 * Gravity.applyDisplay}.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800883 *
884 * @see Gravity
885 */
886 public int gravity;
887
888 /**
889 * The horizontal margin, as a percentage of the container's width,
Dianne Hackborn8eb2e242010-11-01 12:31:24 -0700890 * between the container and the widget. See
891 * {@link Gravity#apply(int, int, int, android.graphics.Rect, int, int,
892 * android.graphics.Rect) Gravity.apply} for how this is used. This
893 * field is added with {@link #x} to supply the <var>xAdj</var> parameter.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800894 */
895 public float horizontalMargin;
896
897 /**
898 * The vertical margin, as a percentage of the container's height,
Dianne Hackborn8eb2e242010-11-01 12:31:24 -0700899 * between the container and the widget. See
900 * {@link Gravity#apply(int, int, int, android.graphics.Rect, int, int,
901 * android.graphics.Rect) Gravity.apply} for how this is used. This
902 * field is added with {@link #y} to supply the <var>yAdj</var> parameter.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800903 */
904 public float verticalMargin;
905
906 /**
907 * The desired bitmap format. May be one of the constants in
908 * {@link android.graphics.PixelFormat}. Default is OPAQUE.
909 */
910 public int format;
911
912 /**
913 * A style resource defining the animations to use for this window.
914 * This must be a system resource; it can not be an application resource
915 * because the window manager does not have access to applications.
916 */
917 public int windowAnimations;
918
919 /**
920 * An alpha value to apply to this entire window.
921 * An alpha of 1.0 means fully opaque and 0.0 means fully transparent
922 */
923 public float alpha = 1.0f;
924
925 /**
926 * When {@link #FLAG_DIM_BEHIND} is set, this is the amount of dimming
927 * to apply. Range is from 1.0 for completely opaque to 0.0 for no
928 * dim.
929 */
930 public float dimAmount = 1.0f;
Dianne Hackborndea3ef72010-10-28 14:24:22 -0700931
932 /**
933 * Default value for {@link #screenBrightness} and {@link #buttonBrightness}
934 * indicating that the brightness value is not overridden for this window
935 * and normal brightness policy should be used.
936 */
937 public static final float BRIGHTNESS_OVERRIDE_NONE = -1.0f;
938
939 /**
940 * Value for {@link #screenBrightness} and {@link #buttonBrightness}
941 * indicating that the screen or button backlight brightness should be set
942 * to the lowest value when this window is in front.
943 */
944 public static final float BRIGHTNESS_OVERRIDE_OFF = 0.0f;
945
946 /**
947 * Value for {@link #screenBrightness} and {@link #buttonBrightness}
948 * indicating that the screen or button backlight brightness should be set
949 * to the hightest value when this window is in front.
950 */
951 public static final float BRIGHTNESS_OVERRIDE_FULL = 1.0f;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800952
953 /**
954 * This can be used to override the user's preferred brightness of
955 * the screen. A value of less than 0, the default, means to use the
956 * preferred screen brightness. 0 to 1 adjusts the brightness from
957 * dark to full bright.
958 */
Mike Lockwoodfb73f792009-11-20 11:31:18 -0500959 public float screenBrightness = BRIGHTNESS_OVERRIDE_NONE;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800960
961 /**
Mike Lockwoodfb73f792009-11-20 11:31:18 -0500962 * This can be used to override the standard behavior of the button and
963 * keyboard backlights. A value of less than 0, the default, means to
964 * use the standard backlight behavior. 0 to 1 adjusts the brightness
965 * from dark to full bright.
966 */
967 public float buttonBrightness = BRIGHTNESS_OVERRIDE_NONE;
968
969 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800970 * Identifier for this window. This will usually be filled in for
971 * you.
972 */
973 public IBinder token = null;
974
975 /**
976 * Name of the package owning this window.
977 */
978 public String packageName = null;
979
980 /**
981 * Specific orientation value for a window.
982 * May be any of the same values allowed
983 * for {@link android.content.pm.ActivityInfo#screenOrientation}.
984 * If not set, a default value of
985 * {@link android.content.pm.ActivityInfo#SCREEN_ORIENTATION_UNSPECIFIED}
986 * will be used.
987 */
988 public int screenOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
Joe Onorato664644d2011-01-23 17:53:23 -0800989
990 /**
991 * Control the visibility of the status bar.
Joe Onorato14782f72011-01-25 19:53:17 -0800992 *
993 * @see View#STATUS_BAR_VISIBLE
994 * @see View#STATUS_BAR_HIDDEN
Joe Onorato664644d2011-01-23 17:53:23 -0800995 */
996 public int systemUiVisibility;
997
998 /**
Joe Onorato14782f72011-01-25 19:53:17 -0800999 * @hide
1000 * The ui visibility as requested by the views in this hierarchy.
1001 * the combined value should be systemUiVisibility | subtreeSystemUiVisibility.
1002 */
1003 public int subtreeSystemUiVisibility;
1004
1005 /**
Joe Onorato664644d2011-01-23 17:53:23 -08001006 * Get callbacks about the system ui visibility changing.
1007 *
1008 * TODO: Maybe there should be a bitfield of optional callbacks that we need.
1009 *
1010 * @hide
1011 */
1012 public boolean hasSystemUiListeners;
1013
Jeff Brown474dcb52011-06-14 20:22:50 -07001014 /**
1015 * When this window has focus, disable touch pad pointer gesture processing.
1016 * The window will receive raw position updates from the touch pad instead
1017 * of pointer movements and synthetic touch events.
1018 *
1019 * @hide
1020 */
1021 public static final int INPUT_FEATURE_DISABLE_POINTER_GESTURES = 0x00000001;
1022
1023 /**
1024 * Control special features of the input subsystem.
1025 *
1026 * @see #INPUT_FEATURE_DISABLE_TOUCH_PAD_GESTURES
1027 * @hide
1028 */
1029 public int inputFeatures;
1030
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001031 public LayoutParams() {
Romain Guy980a9382010-01-08 15:06:28 -08001032 super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001033 type = TYPE_APPLICATION;
1034 format = PixelFormat.OPAQUE;
1035 }
1036
1037 public LayoutParams(int _type) {
Romain Guy980a9382010-01-08 15:06:28 -08001038 super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001039 type = _type;
1040 format = PixelFormat.OPAQUE;
1041 }
1042
1043 public LayoutParams(int _type, int _flags) {
Romain Guy980a9382010-01-08 15:06:28 -08001044 super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001045 type = _type;
1046 flags = _flags;
1047 format = PixelFormat.OPAQUE;
1048 }
1049
1050 public LayoutParams(int _type, int _flags, int _format) {
Romain Guy980a9382010-01-08 15:06:28 -08001051 super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001052 type = _type;
1053 flags = _flags;
1054 format = _format;
1055 }
1056
1057 public LayoutParams(int w, int h, int _type, int _flags, int _format) {
1058 super(w, h);
1059 type = _type;
1060 flags = _flags;
1061 format = _format;
1062 }
1063
1064 public LayoutParams(int w, int h, int xpos, int ypos, int _type,
1065 int _flags, int _format) {
1066 super(w, h);
1067 x = xpos;
1068 y = ypos;
1069 type = _type;
1070 flags = _flags;
1071 format = _format;
1072 }
1073
1074 public final void setTitle(CharSequence title) {
1075 if (null == title)
1076 title = "";
1077
1078 mTitle = TextUtils.stringOrSpannedString(title);
1079 }
1080
1081 public final CharSequence getTitle() {
1082 return mTitle;
1083 }
1084
1085 public int describeContents() {
1086 return 0;
1087 }
1088
1089 public void writeToParcel(Parcel out, int parcelableFlags) {
1090 out.writeInt(width);
1091 out.writeInt(height);
1092 out.writeInt(x);
1093 out.writeInt(y);
1094 out.writeInt(type);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001095 out.writeInt(flags);
1096 out.writeInt(softInputMode);
1097 out.writeInt(gravity);
1098 out.writeFloat(horizontalMargin);
1099 out.writeFloat(verticalMargin);
1100 out.writeInt(format);
1101 out.writeInt(windowAnimations);
1102 out.writeFloat(alpha);
1103 out.writeFloat(dimAmount);
1104 out.writeFloat(screenBrightness);
Mike Lockwoodfb73f792009-11-20 11:31:18 -05001105 out.writeFloat(buttonBrightness);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001106 out.writeStrongBinder(token);
1107 out.writeString(packageName);
1108 TextUtils.writeToParcel(mTitle, out, parcelableFlags);
1109 out.writeInt(screenOrientation);
Joe Onorato664644d2011-01-23 17:53:23 -08001110 out.writeInt(systemUiVisibility);
Joe Onorato14782f72011-01-25 19:53:17 -08001111 out.writeInt(subtreeSystemUiVisibility);
Joe Onorato664644d2011-01-23 17:53:23 -08001112 out.writeInt(hasSystemUiListeners ? 1 : 0);
Jeff Brown474dcb52011-06-14 20:22:50 -07001113 out.writeInt(inputFeatures);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001114 }
1115
1116 public static final Parcelable.Creator<LayoutParams> CREATOR
1117 = new Parcelable.Creator<LayoutParams>() {
1118 public LayoutParams createFromParcel(Parcel in) {
1119 return new LayoutParams(in);
1120 }
1121
1122 public LayoutParams[] newArray(int size) {
1123 return new LayoutParams[size];
1124 }
1125 };
1126
1127
1128 public LayoutParams(Parcel in) {
1129 width = in.readInt();
1130 height = in.readInt();
1131 x = in.readInt();
1132 y = in.readInt();
1133 type = in.readInt();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001134 flags = in.readInt();
1135 softInputMode = in.readInt();
1136 gravity = in.readInt();
1137 horizontalMargin = in.readFloat();
1138 verticalMargin = in.readFloat();
1139 format = in.readInt();
1140 windowAnimations = in.readInt();
1141 alpha = in.readFloat();
1142 dimAmount = in.readFloat();
1143 screenBrightness = in.readFloat();
Mike Lockwoodfb73f792009-11-20 11:31:18 -05001144 buttonBrightness = in.readFloat();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001145 token = in.readStrongBinder();
1146 packageName = in.readString();
1147 mTitle = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
1148 screenOrientation = in.readInt();
Joe Onorato664644d2011-01-23 17:53:23 -08001149 systemUiVisibility = in.readInt();
Joe Onorato14782f72011-01-25 19:53:17 -08001150 subtreeSystemUiVisibility = in.readInt();
Joe Onorato664644d2011-01-23 17:53:23 -08001151 hasSystemUiListeners = in.readInt() != 0;
Jeff Brown474dcb52011-06-14 20:22:50 -07001152 inputFeatures = in.readInt();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001153 }
1154
Romain Guy72998072009-06-22 11:09:20 -07001155 @SuppressWarnings({"PointlessBitwiseExpression"})
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001156 public static final int LAYOUT_CHANGED = 1<<0;
1157 public static final int TYPE_CHANGED = 1<<1;
1158 public static final int FLAGS_CHANGED = 1<<2;
1159 public static final int FORMAT_CHANGED = 1<<3;
1160 public static final int ANIMATION_CHANGED = 1<<4;
1161 public static final int DIM_AMOUNT_CHANGED = 1<<5;
1162 public static final int TITLE_CHANGED = 1<<6;
1163 public static final int ALPHA_CHANGED = 1<<7;
1164 public static final int MEMORY_TYPE_CHANGED = 1<<8;
1165 public static final int SOFT_INPUT_MODE_CHANGED = 1<<9;
1166 public static final int SCREEN_ORIENTATION_CHANGED = 1<<10;
1167 public static final int SCREEN_BRIGHTNESS_CHANGED = 1<<11;
Mike Lockwoodfb73f792009-11-20 11:31:18 -05001168 /** {@hide} */
1169 public static final int BUTTON_BRIGHTNESS_CHANGED = 1<<12;
Joe Onorato664644d2011-01-23 17:53:23 -08001170 /** {@hide} */
1171 public static final int SYSTEM_UI_VISIBILITY_CHANGED = 1<<13;
1172 /** {@hide} */
1173 public static final int SYSTEM_UI_LISTENER_CHANGED = 1<<14;
Jeff Brown474dcb52011-06-14 20:22:50 -07001174 /** {@hide} */
1175 public static final int INPUT_FEATURES_CHANGED = 1<<15;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001176
Mitsuru Oshimae5fb3282009-06-09 21:16:08 -07001177 // internal buffer to backup/restore parameters under compatibility mode.
1178 private int[] mCompatibilityParamsBackup = null;
1179
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001180 public final int copyFrom(LayoutParams o) {
1181 int changes = 0;
1182
1183 if (width != o.width) {
1184 width = o.width;
1185 changes |= LAYOUT_CHANGED;
1186 }
1187 if (height != o.height) {
1188 height = o.height;
1189 changes |= LAYOUT_CHANGED;
1190 }
1191 if (x != o.x) {
1192 x = o.x;
1193 changes |= LAYOUT_CHANGED;
1194 }
1195 if (y != o.y) {
1196 y = o.y;
1197 changes |= LAYOUT_CHANGED;
1198 }
1199 if (horizontalWeight != o.horizontalWeight) {
1200 horizontalWeight = o.horizontalWeight;
1201 changes |= LAYOUT_CHANGED;
1202 }
1203 if (verticalWeight != o.verticalWeight) {
1204 verticalWeight = o.verticalWeight;
1205 changes |= LAYOUT_CHANGED;
1206 }
1207 if (horizontalMargin != o.horizontalMargin) {
1208 horizontalMargin = o.horizontalMargin;
1209 changes |= LAYOUT_CHANGED;
1210 }
1211 if (verticalMargin != o.verticalMargin) {
1212 verticalMargin = o.verticalMargin;
1213 changes |= LAYOUT_CHANGED;
1214 }
1215 if (type != o.type) {
1216 type = o.type;
1217 changes |= TYPE_CHANGED;
1218 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001219 if (flags != o.flags) {
1220 flags = o.flags;
1221 changes |= FLAGS_CHANGED;
1222 }
1223 if (softInputMode != o.softInputMode) {
1224 softInputMode = o.softInputMode;
1225 changes |= SOFT_INPUT_MODE_CHANGED;
1226 }
1227 if (gravity != o.gravity) {
1228 gravity = o.gravity;
1229 changes |= LAYOUT_CHANGED;
1230 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001231 if (format != o.format) {
1232 format = o.format;
1233 changes |= FORMAT_CHANGED;
1234 }
1235 if (windowAnimations != o.windowAnimations) {
1236 windowAnimations = o.windowAnimations;
1237 changes |= ANIMATION_CHANGED;
1238 }
1239 if (token == null) {
1240 // NOTE: token only copied if the recipient doesn't
1241 // already have one.
1242 token = o.token;
1243 }
1244 if (packageName == null) {
1245 // NOTE: packageName only copied if the recipient doesn't
1246 // already have one.
1247 packageName = o.packageName;
1248 }
1249 if (!mTitle.equals(o.mTitle)) {
1250 mTitle = o.mTitle;
1251 changes |= TITLE_CHANGED;
1252 }
1253 if (alpha != o.alpha) {
1254 alpha = o.alpha;
1255 changes |= ALPHA_CHANGED;
1256 }
1257 if (dimAmount != o.dimAmount) {
1258 dimAmount = o.dimAmount;
1259 changes |= DIM_AMOUNT_CHANGED;
1260 }
1261 if (screenBrightness != o.screenBrightness) {
1262 screenBrightness = o.screenBrightness;
1263 changes |= SCREEN_BRIGHTNESS_CHANGED;
1264 }
Mike Lockwoodfb73f792009-11-20 11:31:18 -05001265 if (buttonBrightness != o.buttonBrightness) {
1266 buttonBrightness = o.buttonBrightness;
1267 changes |= BUTTON_BRIGHTNESS_CHANGED;
1268 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001269
1270 if (screenOrientation != o.screenOrientation) {
1271 screenOrientation = o.screenOrientation;
1272 changes |= SCREEN_ORIENTATION_CHANGED;
1273 }
Romain Guy529b60a2010-08-03 18:05:47 -07001274
Joe Onorato14782f72011-01-25 19:53:17 -08001275 if (systemUiVisibility != o.systemUiVisibility
1276 || subtreeSystemUiVisibility != o.subtreeSystemUiVisibility) {
Joe Onorato664644d2011-01-23 17:53:23 -08001277 systemUiVisibility = o.systemUiVisibility;
Joe Onorato14782f72011-01-25 19:53:17 -08001278 subtreeSystemUiVisibility = o.subtreeSystemUiVisibility;
Joe Onorato664644d2011-01-23 17:53:23 -08001279 changes |= SYSTEM_UI_VISIBILITY_CHANGED;
1280 }
1281
1282 if (hasSystemUiListeners != o.hasSystemUiListeners) {
1283 hasSystemUiListeners = o.hasSystemUiListeners;
1284 changes |= SYSTEM_UI_LISTENER_CHANGED;
1285 }
1286
Jeff Brown474dcb52011-06-14 20:22:50 -07001287 if (inputFeatures != o.inputFeatures) {
1288 inputFeatures = o.inputFeatures;
1289 changes |= INPUT_FEATURES_CHANGED;
1290 }
1291
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001292 return changes;
1293 }
1294
1295 @Override
1296 public String debug(String output) {
1297 output += "Contents of " + this + ":";
1298 Log.d("Debug", output);
1299 output = super.debug("");
1300 Log.d("Debug", output);
1301 Log.d("Debug", "");
1302 Log.d("Debug", "WindowManager.LayoutParams={title=" + mTitle + "}");
1303 return "";
1304 }
1305
1306 @Override
1307 public String toString() {
1308 StringBuilder sb = new StringBuilder(256);
1309 sb.append("WM.LayoutParams{");
1310 sb.append("(");
1311 sb.append(x);
1312 sb.append(',');
1313 sb.append(y);
1314 sb.append(")(");
Romain Guy980a9382010-01-08 15:06:28 -08001315 sb.append((width== MATCH_PARENT ?"fill":(width==WRAP_CONTENT?"wrap":width)));
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001316 sb.append('x');
Romain Guy980a9382010-01-08 15:06:28 -08001317 sb.append((height== MATCH_PARENT ?"fill":(height==WRAP_CONTENT?"wrap":height)));
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001318 sb.append(")");
Dianne Hackborn8eb2e242010-11-01 12:31:24 -07001319 if (horizontalMargin != 0) {
1320 sb.append(" hm=");
1321 sb.append(horizontalMargin);
1322 }
1323 if (verticalMargin != 0) {
1324 sb.append(" vm=");
1325 sb.append(verticalMargin);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001326 }
1327 if (gravity != 0) {
1328 sb.append(" gr=#");
1329 sb.append(Integer.toHexString(gravity));
1330 }
Dianne Hackborn8eb2e242010-11-01 12:31:24 -07001331 if (softInputMode != 0) {
1332 sb.append(" sim=#");
1333 sb.append(Integer.toHexString(softInputMode));
1334 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001335 sb.append(" ty=");
1336 sb.append(type);
1337 sb.append(" fl=#");
1338 sb.append(Integer.toHexString(flags));
Dianne Hackborna44abeb2011-08-08 19:24:01 -07001339 if (format != PixelFormat.OPAQUE) {
1340 sb.append(" fmt=");
1341 sb.append(format);
1342 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001343 if (windowAnimations != 0) {
1344 sb.append(" wanim=0x");
1345 sb.append(Integer.toHexString(windowAnimations));
1346 }
1347 if (screenOrientation != ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) {
1348 sb.append(" or=");
1349 sb.append(screenOrientation);
1350 }
Dianne Hackborn8eb2e242010-11-01 12:31:24 -07001351 if (alpha != 1.0f) {
1352 sb.append(" alpha=");
1353 sb.append(alpha);
1354 }
1355 if (screenBrightness != BRIGHTNESS_OVERRIDE_NONE) {
1356 sb.append(" sbrt=");
1357 sb.append(screenBrightness);
1358 }
1359 if (buttonBrightness != BRIGHTNESS_OVERRIDE_NONE) {
1360 sb.append(" bbrt=");
1361 sb.append(buttonBrightness);
1362 }
Mitsuru Oshima5a2b91d2009-07-16 16:30:02 -07001363 if ((flags & FLAG_COMPATIBLE_WINDOW) != 0) {
1364 sb.append(" compatible=true");
1365 }
Joe Onorato664644d2011-01-23 17:53:23 -08001366 if (systemUiVisibility != 0) {
1367 sb.append(" sysui=0x");
1368 sb.append(Integer.toHexString(systemUiVisibility));
1369 }
Joe Onorato14782f72011-01-25 19:53:17 -08001370 if (subtreeSystemUiVisibility != 0) {
1371 sb.append(" vsysui=0x");
1372 sb.append(Integer.toHexString(subtreeSystemUiVisibility));
1373 }
Joe Onorato664644d2011-01-23 17:53:23 -08001374 if (hasSystemUiListeners) {
1375 sb.append(" sysuil=");
1376 sb.append(hasSystemUiListeners);
1377 }
Dianne Hackborna44abeb2011-08-08 19:24:01 -07001378 if (inputFeatures != 0) {
1379 sb.append(" if=0x").append(Integer.toHexString(inputFeatures));
1380 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001381 sb.append('}');
1382 return sb.toString();
1383 }
Mitsuru Oshima8d112672009-04-27 12:01:23 -07001384
Mitsuru Oshima3d914922009-05-13 22:29:15 -07001385 /**
1386 * Scale the layout params' coordinates and size.
Mitsuru Oshima64f59342009-06-21 00:03:11 -07001387 * @hide
Mitsuru Oshima3d914922009-05-13 22:29:15 -07001388 */
Mitsuru Oshima64f59342009-06-21 00:03:11 -07001389 public void scale(float scale) {
Mitsuru Oshima61324e52009-07-21 15:40:36 -07001390 x = (int) (x * scale + 0.5f);
1391 y = (int) (y * scale + 0.5f);
Mitsuru Oshimae5fb3282009-06-09 21:16:08 -07001392 if (width > 0) {
Mitsuru Oshima61324e52009-07-21 15:40:36 -07001393 width = (int) (width * scale + 0.5f);
Mitsuru Oshimae5fb3282009-06-09 21:16:08 -07001394 }
1395 if (height > 0) {
Mitsuru Oshima61324e52009-07-21 15:40:36 -07001396 height = (int) (height * scale + 0.5f);
Mitsuru Oshima8d112672009-04-27 12:01:23 -07001397 }
1398 }
1399
Mitsuru Oshima3d914922009-05-13 22:29:15 -07001400 /**
Mitsuru Oshimae5fb3282009-06-09 21:16:08 -07001401 * Backup the layout parameters used in compatibility mode.
1402 * @see LayoutParams#restore()
Mitsuru Oshima3d914922009-05-13 22:29:15 -07001403 */
Mitsuru Oshimae5fb3282009-06-09 21:16:08 -07001404 void backup() {
1405 int[] backup = mCompatibilityParamsBackup;
1406 if (backup == null) {
Mitsuru Oshima64f59342009-06-21 00:03:11 -07001407 // we backup 4 elements, x, y, width, height
1408 backup = mCompatibilityParamsBackup = new int[4];
Mitsuru Oshima3d914922009-05-13 22:29:15 -07001409 }
Mitsuru Oshimae5fb3282009-06-09 21:16:08 -07001410 backup[0] = x;
1411 backup[1] = y;
1412 backup[2] = width;
1413 backup[3] = height;
Mitsuru Oshimae5fb3282009-06-09 21:16:08 -07001414 }
1415
1416 /**
1417 * Restore the layout params' coordinates, size and gravity
1418 * @see LayoutParams#backup()
1419 */
1420 void restore() {
1421 int[] backup = mCompatibilityParamsBackup;
1422 if (backup != null) {
1423 x = backup[0];
1424 y = backup[1];
1425 width = backup[2];
Mitsuru Oshima3d914922009-05-13 22:29:15 -07001426 height = backup[3];
1427 }
1428 }
1429
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001430 private CharSequence mTitle = "";
1431 }
1432}