replicant-packages_apps_Email/src/com/android/email/widget
Makoto Onuki 2fbb3db5d8 Don't use findViewById (part 1 -- account setup)
Added two new functions:
- UiUtilities.getView()
  is a fail-fast version of findViewById().  Crashes when there's no view
- setVisibilitySafe()
  same as View.setVisibility, but doesn't crash even if a view doesn't exist

Let's try to avoid the use of findViewById(), and instead use getView(), *right
after* the layout is inflated, so that we'll always fail-fast if a layout
doesn't have a required view.  (Rather than getting a NPE only when the view
is really accessed, which can be in a code path which is rarely executed--e.g.
only when there's a protocol error.)

Let's only use findViewById() only when we're sure no all the variants of a
layout have the view in question and leave a comment to make it clear it's on
purpose.

(UiUtilities has been moved from com.android.email to
com.android.email.activity)

Change-Id: I36e0bab65a989f5d34cf636f13e1eaee084547af
2011-03-30 13:47:13 -07:00
..
EmailWidget.java Don't use findViewById (part 1 -- account setup) 2011-03-30 13:47:13 -07:00
EmailWidgetLoader.java Widget: Use unread count for inbox views. 2011-02-23 17:25:07 -08:00
WidgetManager.java Refactoring widget part 2 2011-02-23 14:20:00 -08:00
WidgetView.java Widget: Use unread count for inbox views. 2011-02-23 17:25:07 -08:00