Go to file
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
assets Remove empty.html, which isn't used any more. 2010-12-22 11:59:31 -08:00
docs auto import from //depot/cupcake/@135843 2009-03-03 19:32:22 -08:00
emailcommon Don't duplicate HTML in reply / forward 2011-03-25 14:25:48 -07:00
images auto import from //depot/cupcake/@135843 2009-03-03 19:32:22 -08:00
res Don't use findViewById (part 1 -- account setup) 2011-03-30 13:47:13 -07:00
src/com Don't use findViewById (part 1 -- account setup) 2011-03-30 13:47:13 -07:00
tests Don't use findViewById (part 1 -- account setup) 2011-03-30 13:47:13 -07:00
.classpath Initial Contribution 2008-10-21 07:00:00 -07:00
.project Initial Contribution 2008-10-21 07:00:00 -07:00
Android.mk Split out emailcommon/Android.mk 2011-03-01 15:56:27 -08:00
AndroidManifest.xml Better fix for the PendingIntent issue. 2011-03-23 14:49:38 -07:00
CleanSpec.mk Split out emailcommon/Android.mk 2011-03-01 15:56:27 -08:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2009-03-03 19:32:22 -08:00
NOTICE auto import from //depot/cupcake/@135843 2009-03-03 19:32:22 -08:00
proguard.flags DO NOT MERGE Add original HTML message to forward/reply 2011-03-03 15:27:09 -08:00
remove-exchange-support.sh remove-exchange-support.sh supports MacOS 2011-01-28 13:39:39 -08:00