blob: 4dc960c84318ac31bc8253e19c068363debec547 [file] [log] [blame]
Leon Scroggins571b3762010-05-26 10:25:01 -04001/*
2 * Copyright (C) 2010 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 com.android.browser;
18
Michael Kolb11d19782011-03-20 10:17:40 -070019import com.android.browser.UI.DropdownChangeListener;
John Reck92026732011-02-15 10:12:30 -080020import com.android.browser.UrlInputView.UrlInputListener;
Michael Kolb11d19782011-03-20 10:17:40 -070021import com.android.browser.autocomplete.SuggestedTextController.TextChangeWatcher;
John Reck92026732011-02-15 10:12:30 -080022
Michael Kolb46f987e2011-04-05 10:39:10 -070023import android.animation.Animator;
24import android.animation.Animator.AnimatorListener;
25import android.animation.ObjectAnimator;
John Reck92026732011-02-15 10:12:30 -080026import android.app.SearchManager;
Leon Scroggins571b3762010-05-26 10:25:01 -040027import android.content.Context;
John Reck92026732011-02-15 10:12:30 -080028import android.content.Intent;
Leon Scroggins571b3762010-05-26 10:25:01 -040029import android.graphics.Bitmap;
Leon Scroggins571b3762010-05-26 10:25:01 -040030import android.graphics.drawable.Drawable;
John Reck92026732011-02-15 10:12:30 -080031import android.os.Bundle;
32import android.speech.RecognizerResultsIntent;
Michael Kolb11d19782011-03-20 10:17:40 -070033import android.text.TextUtils;
34import android.view.ContextThemeWrapper;
Michael Kolb7cdc4902011-02-03 17:54:40 -080035import android.view.Gravity;
Michael Kolb11d19782011-03-20 10:17:40 -070036import android.view.KeyEvent;
37import android.view.LayoutInflater;
Leon Scroggins571b3762010-05-26 10:25:01 -040038import android.view.View;
Michael Kolb11d19782011-03-20 10:17:40 -070039import android.view.View.OnClickListener;
40import android.view.View.OnFocusChangeListener;
Michael Kolb46f987e2011-04-05 10:39:10 -070041import android.view.ViewGroup;
Michael Kolb11d19782011-03-20 10:17:40 -070042import android.view.animation.Animation;
43import android.view.animation.Animation.AnimationListener;
44import android.view.animation.AnimationUtils;
45import android.webkit.WebView;
Michael Kolb7cdc4902011-02-03 17:54:40 -080046import android.widget.AbsoluteLayout;
Michael Kolb11d19782011-03-20 10:17:40 -070047import android.widget.ArrayAdapter;
48import android.widget.Button;
Michael Kolb46f987e2011-04-05 10:39:10 -070049import android.widget.FrameLayout;
Leon Scroggins571b3762010-05-26 10:25:01 -040050import android.widget.ImageView;
Michael Kolb11d19782011-03-20 10:17:40 -070051import android.widget.ProgressBar;
52import android.widget.RelativeLayout;
53import android.widget.Spinner;
54import android.widget.TextView;
55
56import java.util.List;
Leon Scroggins571b3762010-05-26 10:25:01 -040057
58/**
59 * Base class for a title bar used by the browser.
60 */
Michael Kolb11d19782011-03-20 10:17:40 -070061public class TitleBarBase extends RelativeLayout
62 implements OnClickListener, OnFocusChangeListener, UrlInputListener,
63 TextChangeWatcher, DeviceAccountLogin.AutoLoginCallback {
John Reck94b7e042011-02-15 15:02:33 -080064
65 protected static final int PROGRESS_MAX = 100;
66
Leon Scroggins571b3762010-05-26 10:25:01 -040067 // These need to be set by the subclass.
68 protected ImageView mFavicon;
69 protected ImageView mLockIcon;
70
John Reck92026732011-02-15 10:12:30 -080071 protected UiController mUiController;
72 protected BaseUi mBaseUi;
Michael Kolb46f987e2011-04-05 10:39:10 -070073 protected FrameLayout mParent;
74 protected PageProgressView mProgress;
John Reck92026732011-02-15 10:12:30 -080075 protected UrlInputView mUrlInput;
76 protected boolean mInVoiceMode;
Michael Kolb46f987e2011-04-05 10:39:10 -070077 protected View mContainer;
78
Leon Scroggins571b3762010-05-26 10:25:01 -040079
Michael Kolb11d19782011-03-20 10:17:40 -070080 // Auto-login UI
81 protected View mAutoLogin;
82 protected Spinner mAutoLoginAccount;
83 protected Button mAutoLoginLogin;
84 protected ProgressBar mAutoLoginProgress;
85 protected TextView mAutoLoginError;
John Reck12472f62011-04-27 15:32:10 -070086 protected View mAutoLoginCancel;
Michael Kolb11d19782011-03-20 10:17:40 -070087 protected DeviceAccountLogin mAutoLoginHandler;
88 protected ArrayAdapter<String> mAccountsAdapter;
Michael Kolbfdb70242011-03-24 09:41:11 -070089 protected boolean mUseQuickControls;
Michael Kolb11d19782011-03-20 10:17:40 -070090
Michael Kolb46f987e2011-04-05 10:39:10 -070091 //state
92 protected boolean mShowing;
93 protected boolean mInLoad;
94 protected boolean mSkipTitleBarAnimations;
95 private Animator mTitleBarAnimator;
96
97 public TitleBarBase(Context context, UiController controller, BaseUi ui,
98 FrameLayout parent) {
Leon Scroggins571b3762010-05-26 10:25:01 -040099 super(context, null);
John Reck92026732011-02-15 10:12:30 -0800100 mUiController = controller;
101 mBaseUi = ui;
Michael Kolb46f987e2011-04-05 10:39:10 -0700102 mParent = parent;
Leon Scroggins571b3762010-05-26 10:25:01 -0400103 }
104
Michael Kolb11d19782011-03-20 10:17:40 -0700105 protected void initLayout(Context context, int layoutId) {
106 LayoutInflater factory = LayoutInflater.from(context);
107 factory.inflate(layoutId, this);
Michael Kolb46f987e2011-04-05 10:39:10 -0700108 mContainer = findViewById(R.id.taburlbar);
109 mProgress = (PageProgressView) findViewById(R.id.progress);
Michael Kolb11d19782011-03-20 10:17:40 -0700110 mUrlInput = (UrlInputView) findViewById(R.id.url);
111 mLockIcon = (ImageView) findViewById(R.id.lock);
112 mUrlInput.setUrlInputListener(this);
113 mUrlInput.setController(mUiController);
114 mUrlInput.setOnFocusChangeListener(this);
115 mUrlInput.setSelectAllOnFocus(true);
116 mUrlInput.addQueryTextWatcher(this);
117 mAutoLogin = findViewById(R.id.autologin);
118 mAutoLoginAccount = (Spinner) findViewById(R.id.autologin_account);
119 mAutoLoginLogin = (Button) findViewById(R.id.autologin_login);
120 mAutoLoginLogin.setOnClickListener(this);
121 mAutoLoginProgress = (ProgressBar) findViewById(R.id.autologin_progress);
122 mAutoLoginError = (TextView) findViewById(R.id.autologin_error);
John Reck12472f62011-04-27 15:32:10 -0700123 mAutoLoginCancel = mAutoLogin.findViewById(R.id.autologin_close);
Michael Kolb11d19782011-03-20 10:17:40 -0700124 mAutoLoginCancel.setOnClickListener(this);
125 }
126
127 protected void setupUrlInput() {
128 }
129
Michael Kolbfdb70242011-03-24 09:41:11 -0700130 protected void setUseQuickControls(boolean use) {
131 mUseQuickControls = use;
Michael Kolb46f987e2011-04-05 10:39:10 -0700132 setLayoutParams(makeLayoutParams());
Michael Kolbfdb70242011-03-24 09:41:11 -0700133 }
134
Michael Kolb46f987e2011-04-05 10:39:10 -0700135 void setShowProgressOnly(boolean progress) {
136 if (progress && !inAutoLogin()) {
137 mContainer.setVisibility(View.GONE);
138 } else {
139 mContainer.setVisibility(View.VISIBLE);
140 }
141 }
142
143 void setSkipTitleBarAnimations(boolean skip) {
144 mSkipTitleBarAnimations = skip;
145 }
146
147 void show() {
148 if (mUseQuickControls) {
149 mParent.addView(this);
150 } else {
151 if (!mSkipTitleBarAnimations) {
152 cancelTitleBarAnimation(false);
153 int visibleHeight = getVisibleTitleHeight();
154 float startPos = (-getEmbeddedHeight() + visibleHeight);
155 if (getTranslationY() != 0) {
156 startPos = Math.max(startPos, getTranslationY());
157 }
158 mTitleBarAnimator = ObjectAnimator.ofFloat(this,
159 "translationY",
160 startPos, 0);
161 mTitleBarAnimator.start();
162 }
163 mBaseUi.setTitleGravity(Gravity.TOP);
164 }
165 mShowing = true;
166 }
167
168 void hide() {
169 if (mUseQuickControls) {
170 mParent.removeView(this);
171 } else {
172 if (!mSkipTitleBarAnimations) {
173 cancelTitleBarAnimation(false);
174 int visibleHeight = getVisibleTitleHeight();
175 mTitleBarAnimator = ObjectAnimator.ofFloat(this,
176 "translationY", getTranslationY(),
177 (-getEmbeddedHeight() + visibleHeight));
178 mTitleBarAnimator.addListener(mHideTileBarAnimatorListener);
179 mTitleBarAnimator.start();
180 } else {
181 mBaseUi.setTitleGravity(Gravity.NO_GRAVITY);
182 }
183 }
184 mShowing = false;
185 }
186
187 boolean isShowing() {
188 return mShowing;
189 }
190
191 void cancelTitleBarAnimation(boolean reset) {
192 if (mTitleBarAnimator != null) {
193 mTitleBarAnimator.cancel();
194 mTitleBarAnimator = null;
195 }
196 if (reset) {
197 setTranslationY(0);
198 }
199 }
200
201 private AnimatorListener mHideTileBarAnimatorListener = new AnimatorListener() {
202
203 boolean mWasCanceled;
204 @Override
205 public void onAnimationStart(Animator animation) {
206 mWasCanceled = false;
207 }
208
209 @Override
210 public void onAnimationRepeat(Animator animation) {
211 }
212
213 @Override
214 public void onAnimationEnd(Animator animation) {
215 if (!mWasCanceled) {
216 setTranslationY(0);
217 }
218 mBaseUi.setTitleGravity(Gravity.NO_GRAVITY);
219 }
220
221 @Override
222 public void onAnimationCancel(Animator animation) {
223 mWasCanceled = true;
224 }
225 };
226
227 private int getVisibleTitleHeight() {
228 Tab tab = mBaseUi.getActiveTab();
229 WebView webview = tab != null ? tab.getWebView() : null;
230 return webview != null ? webview.getVisibleTitleHeight() : 0;
231 }
232
233 /**
234 * Update the progress, from 0 to 100.
235 */
236 void setProgress(int newProgress) {
237 if (newProgress >= PROGRESS_MAX) {
238 mProgress.setProgress(PageProgressView.MAX_PROGRESS);
239 mProgress.setVisibility(View.GONE);
240 mInLoad = false;
241 onProgressStopped();
242 // check if needs to be hidden
243 if (!isEditingUrl() && !inAutoLogin()) {
244 hide();
245 if (mUseQuickControls) {
246 setShowProgressOnly(false);
247 }
248 }
249 } else {
250 if (!mInLoad) {
251 mProgress.setVisibility(View.VISIBLE);
252 mInLoad = true;
253 onProgressStarted();
254 }
255 mProgress.setProgress(newProgress * PageProgressView.MAX_PROGRESS
256 / PROGRESS_MAX);
257 if (!mShowing) {
258 if (mUseQuickControls && !isEditingUrl()) {
259 setShowProgressOnly(true);
260 }
261 show();
262 }
263 }
264 }
265
266 protected void onProgressStarted() {
267 }
268
269 protected void onProgressStopped() {
270 }
Leon Scroggins571b3762010-05-26 10:25:01 -0400271
272 /* package */ void setLock(Drawable d) {
273 assert mLockIcon != null;
274 if (null == d) {
275 mLockIcon.setVisibility(View.GONE);
276 } else {
277 mLockIcon.setImageDrawable(d);
278 mLockIcon.setVisibility(View.VISIBLE);
279 }
280 }
281
282 /* package */ void setFavicon(Bitmap icon) {
Michael Kolb5a4372f2011-04-29 13:53:10 -0700283 mFavicon.setImageDrawable(mBaseUi.getFaviconDrawable(icon));
Leon Scroggins571b3762010-05-26 10:25:01 -0400284 }
285
Michael Kolb29ccf8a2011-02-23 16:13:24 -0800286 public int getEmbeddedHeight() {
Michael Kolb46f987e2011-04-05 10:39:10 -0700287 int height = mContainer.getHeight();
288 if (mAutoLogin.getVisibility() == View.VISIBLE) {
289 height += mAutoLogin.getHeight();
290 }
291 return height;
Michael Kolb29ccf8a2011-02-23 16:13:24 -0800292 }
293
Michael Kolb11d19782011-03-20 10:17:40 -0700294 protected void updateAutoLogin(Tab tab, boolean animate) {
295 DeviceAccountLogin login = tab.getDeviceAccountLogin();
296 if (login != null) {
297 mAutoLoginHandler = login;
298 ContextThemeWrapper wrapper = new ContextThemeWrapper(mContext,
299 android.R.style.Theme_Holo_Light);
300 mAccountsAdapter = new ArrayAdapter<String>(wrapper,
301 android.R.layout.simple_spinner_item, login.getAccountNames());
302 mAccountsAdapter.setDropDownViewResource(
303 android.R.layout.simple_spinner_dropdown_item);
304 mAutoLoginAccount.setAdapter(mAccountsAdapter);
305 mAutoLoginAccount.setSelection(0);
306 mAutoLoginAccount.setEnabled(true);
307 mAutoLoginLogin.setEnabled(true);
John Reck12472f62011-04-27 15:32:10 -0700308 mAutoLoginProgress.setVisibility(View.INVISIBLE);
Michael Kolb11d19782011-03-20 10:17:40 -0700309 mAutoLoginError.setVisibility(View.GONE);
310 switch (login.getState()) {
311 case DeviceAccountLogin.PROCESSING:
312 mAutoLoginAccount.setEnabled(false);
313 mAutoLoginLogin.setEnabled(false);
314 mAutoLoginProgress.setVisibility(View.VISIBLE);
315 break;
316 case DeviceAccountLogin.FAILED:
John Reck12472f62011-04-27 15:32:10 -0700317 mAutoLoginProgress.setVisibility(View.INVISIBLE);
Michael Kolb11d19782011-03-20 10:17:40 -0700318 mAutoLoginError.setVisibility(View.VISIBLE);
319 break;
320 case DeviceAccountLogin.INITIAL:
321 break;
322 default:
323 throw new IllegalStateException();
324 }
325 showAutoLogin(animate);
Michael Kolb43909f22011-03-23 13:18:36 -0700326 } else {
327 hideAutoLogin(animate);
Michael Kolb11d19782011-03-20 10:17:40 -0700328 }
329 }
330
331 protected void showAutoLogin(boolean animate) {
Michael Kolb46f987e2011-04-05 10:39:10 -0700332 if (mUseQuickControls) {
333 mBaseUi.showTitleBar();
334 }
Michael Kolb11d19782011-03-20 10:17:40 -0700335 mAutoLogin.setVisibility(View.VISIBLE);
336 if (animate) {
337 mAutoLogin.startAnimation(AnimationUtils.loadAnimation(
338 getContext(), R.anim.autologin_enter));
339 }
340 }
341
342 protected void hideAutoLogin(boolean animate) {
343 mAutoLoginHandler = null;
Michael Kolb46f987e2011-04-05 10:39:10 -0700344 if (mUseQuickControls) {
345 mBaseUi.hideTitleBar();
Michael Kolb11d19782011-03-20 10:17:40 -0700346 mAutoLogin.setVisibility(View.GONE);
347 mBaseUi.refreshWebView();
Michael Kolb46f987e2011-04-05 10:39:10 -0700348 } else {
349 if (animate) {
350 Animation anim = AnimationUtils.loadAnimation(getContext(),
351 R.anim.autologin_exit);
352 anim.setAnimationListener(new AnimationListener() {
353 @Override
354 public void onAnimationEnd(Animation a) {
355 mAutoLogin.setVisibility(View.GONE);
356 mBaseUi.refreshWebView();
357 }
358
359 @Override
360 public void onAnimationStart(Animation a) {
361 }
362
363 @Override
364 public void onAnimationRepeat(Animation a) {
365 }
366 });
367 mAutoLogin.startAnimation(anim);
368 } else if (mAutoLogin.getAnimation() == null) {
369 mAutoLogin.setVisibility(View.GONE);
370 mBaseUi.refreshWebView();
371 }
Michael Kolb11d19782011-03-20 10:17:40 -0700372 }
373 }
374
375 @Override
376 public void loginFailed() {
377 mAutoLoginAccount.setEnabled(true);
378 mAutoLoginLogin.setEnabled(true);
John Reck12472f62011-04-27 15:32:10 -0700379 mAutoLoginProgress.setVisibility(View.INVISIBLE);
Michael Kolb11d19782011-03-20 10:17:40 -0700380 mAutoLoginError.setVisibility(View.VISIBLE);
381 }
382
383
384 protected boolean inAutoLogin() {
385 return mAutoLoginHandler != null;
386 }
387
388 @Override
389 public void onClick(View v) {
390 if (mAutoLoginCancel == v) {
391 if (mAutoLoginHandler != null) {
392 mAutoLoginHandler.cancel();
393 mAutoLoginHandler = null;
394 }
395 hideAutoLogin(true);
396 } else if (mAutoLoginLogin == v) {
397 if (mAutoLoginHandler != null) {
398 mAutoLoginAccount.setEnabled(false);
399 mAutoLoginLogin.setEnabled(false);
400 mAutoLoginProgress.setVisibility(View.VISIBLE);
401 mAutoLoginError.setVisibility(View.GONE);
402 mAutoLoginHandler.login(
403 mAutoLoginAccount.getSelectedItemPosition(), this);
404 }
405 }
406 }
407
408 @Override
409 public void onFocusChange(View view, boolean hasFocus) {
410 // if losing focus and not in touch mode, leave as is
411 if (hasFocus || view.isInTouchMode() || mUrlInput.needsUpdate()) {
412 setFocusState(hasFocus);
413 }
414 if (hasFocus) {
415 mUrlInput.forceIme();
416 if (mInVoiceMode) {
417 mUrlInput.forceFilter();
418 }
419 } else if (!mUrlInput.needsUpdate()) {
420 mUrlInput.dismissDropDown();
421 mUrlInput.hideIME();
422 if (mUrlInput.getText().length() == 0) {
423 Tab currentTab = mUiController.getTabControl().getCurrentTab();
424 if (currentTab != null) {
425 mUrlInput.setText(currentTab.getUrl(), false);
426 }
427 }
428 }
429 mUrlInput.clearNeedsUpdate();
430 }
431
432 protected void setFocusState(boolean focus) {
433 if (focus) {
434 updateSearchMode(false);
435 }
436 }
437
438 protected void updateSearchMode(boolean userEdited) {
439 setSearchMode(!userEdited || TextUtils.isEmpty(mUrlInput.getUserText()));
440 }
441
442 protected void setSearchMode(boolean voiceSearchEnabled) {}
443
444 boolean isEditingUrl() {
445 return mUrlInput.hasFocus();
446 }
447
448 void stopEditingUrl() {
449 mUrlInput.clearFocus();
450 }
451
452 void setDisplayTitle(String title) {
453 if (!isEditingUrl()) {
454 mUrlInput.setText(title, false);
455 }
456 }
457
458 // UrlInput text watcher
459
460 @Override
461 public void onTextChanged(String newText) {
462 if (mUrlInput.hasFocus()) {
463 // check if input field is empty and adjust voice search state
464 updateSearchMode(true);
465 // clear voice mode when user types
466 setInVoiceMode(false, null);
467 }
468 }
469
470 // voicesearch
471
472 public void setInVoiceMode(boolean voicemode, List<String> voiceResults) {
473 mInVoiceMode = voicemode;
474 mUrlInput.setVoiceResults(voiceResults);
475 }
476
477 void setIncognitoMode(boolean incognito) {
478 mUrlInput.setIncognitoMode(incognito);
479 }
480
481 void clearCompletions() {
482 mUrlInput.setSuggestedText(null);
483 }
484
John Reck92026732011-02-15 10:12:30 -0800485 // UrlInputListener implementation
486
487 /**
488 * callback from suggestion dropdown
489 * user selected a suggestion
490 */
491 @Override
492 public void onAction(String text, String extra, String source) {
493 mUiController.getCurrentTopWebView().requestFocus();
494 mBaseUi.hideTitleBar();
495 Intent i = new Intent();
496 String action = null;
497 if (UrlInputView.VOICE.equals(source)) {
498 action = RecognizerResultsIntent.ACTION_VOICE_SEARCH_RESULTS;
499 source = null;
500 } else {
501 action = Intent.ACTION_SEARCH;
502 }
503 i.setAction(action);
504 i.putExtra(SearchManager.QUERY, text);
505 if (extra != null) {
506 i.putExtra(SearchManager.EXTRA_DATA_KEY, extra);
507 }
508 if (source != null) {
509 Bundle appData = new Bundle();
510 appData.putString(com.android.common.Search.SOURCE, source);
511 i.putExtra(SearchManager.APP_DATA, appData);
512 }
513 mUiController.handleNewIntent(i);
514 setDisplayTitle(text);
515 }
516
517 @Override
518 public void onDismiss() {
519 final Tab currentTab = mBaseUi.getActiveTab();
520 mBaseUi.hideTitleBar();
521 post(new Runnable() {
522 public void run() {
523 clearFocus();
524 if ((currentTab != null) && !mInVoiceMode) {
525 setDisplayTitle(currentTab.getUrl());
526 }
527 }
528 });
529 }
530
531 /**
532 * callback from the suggestion dropdown
533 * copy text to input field and stay in edit mode
534 */
535 @Override
536 public void onCopySuggestion(String text) {
537 mUrlInput.setText(text, true);
538 if (text != null) {
539 mUrlInput.setSelection(text.length());
540 }
541 }
542
John Reck94b7e042011-02-15 15:02:33 -0800543 public void setCurrentUrlIsBookmark(boolean isBookmark) {
544 }
545
Michael Kolb11d19782011-03-20 10:17:40 -0700546 @Override
547 public boolean dispatchKeyEventPreIme(KeyEvent evt) {
548 if (evt.getKeyCode() == KeyEvent.KEYCODE_BACK) {
549 // catch back key in order to do slightly more cleanup than usual
550 mUrlInput.clearFocus();
551 return true;
552 }
553 return super.dispatchKeyEventPreIme(evt);
554 }
555
556 protected WebView getCurrentWebView() {
557 Tab t = mBaseUi.getActiveTab();
558 if (t != null) {
559 return t.getWebView();
560 } else {
561 return null;
562 }
563 }
564
565 void registerDropdownChangeListener(DropdownChangeListener d) {
566 mUrlInput.registerDropdownChangeListener(d);
567 }
568
Michael Kolbfdb70242011-03-24 09:41:11 -0700569 /**
570 * called from the Ui when the user wants to edit
571 * @param clearInput clear the input field
572 */
Michael Kolb46f987e2011-04-05 10:39:10 -0700573 void startEditingUrl(boolean clearInput) {
574 // editing takes preference of progress
575 mContainer.setVisibility(View.VISIBLE);
576 if (mUseQuickControls) {
577 mProgress.setVisibility(View.GONE);
578 }
579 if (!mUrlInput.hasFocus()) {
580 mUrlInput.requestFocus();
581 }
582 if (clearInput) {
583 mUrlInput.setText("");
584 } else if (mInVoiceMode) {
585 mUrlInput.showDropDown();
586 }
587 }
588
589 private ViewGroup.LayoutParams makeLayoutParams() {
590 if (mUseQuickControls) {
591 return new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT,
592 LayoutParams.WRAP_CONTENT);
593 } else {
594 return new AbsoluteLayout.LayoutParams(
595 LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT,
596 0, 0);
597 }
598 }
Michael Kolbfdb70242011-03-24 09:41:11 -0700599
Leon Scroggins571b3762010-05-26 10:25:01 -0400600}