2fbb3db5d8
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 |
||
---|---|---|
.. | ||
account_folder_list_item.xml | ||
account_folder_list.xml | ||
account_selector_dropdown.xml | ||
account_selector.xml | ||
account_settings_exchange_fragment.xml | ||
account_settings_incoming_fragment.xml | ||
account_settings_outgoing_fragment.xml | ||
account_settings.xml | ||
account_setup_account_type.xml | ||
account_setup_basics_common.xml | ||
account_setup_basics.xml | ||
account_setup_exchange_fragment.xml | ||
account_setup_exchange.xml | ||
account_setup_incoming_fragment.xml | ||
account_setup_incoming.xml | ||
account_setup_names.xml | ||
account_setup_options.xml | ||
account_setup_outgoing_fragment.xml | ||
account_setup_outgoing.xml | ||
account_shortcut_picker_item.xml | ||
account_shortcut_picker.xml | ||
action_bar_indeterminate_progress.xml | ||
connection_error_banner.xml | ||
debug.xml | ||
list_separator.xml | ||
list_title.xml | ||
mailbox_list_fragment.xml | ||
mailbox_list_item.xml | ||
mailbox_list.xml | ||
message_command_button_view.xml | ||
message_compose_attachment.xml | ||
message_compose.xml | ||
message_file_view.xml | ||
message_list_fragment.xml | ||
message_list_item_footer.xml | ||
message_list_item.xml | ||
message_list_xl.xml | ||
message_list.xml | ||
message_view_attachment.xml | ||
message_view_details.xml | ||
message_view_fragment.xml | ||
message_view_invitation.xml | ||
message_view.xml | ||
recipient_dropdown_item_loading.xml | ||
recipient_dropdown_item.xml | ||
widget_list_item.xml | ||
widget_loading.xml | ||
widget.xml |