Closed Bug 903160 Opened 11 years ago Closed 11 years ago

Follow-up: Use ViewStub in home_list_with_title.xml for lazy inflation

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 26

People

(Reporter: liuche, Assigned: liuche)

References

Details

(Whiteboard: fixed-fig)

Attachments

(1 file)

Since the empty view in home_list_with_title.xml is not set on creation, use a ViewStub to do lazy inflation.

http://developer.android.com/reference/android/view/ViewStub.html
Attached patch Patch: viewstubSplinter Review
Attachment #788427 - Flags: review?(sriram)
Comment on attachment 788427 [details] [diff] [review]
Patch: viewstub

Review of attachment 788427 [details] [diff] [review]:
-----------------------------------------------------------------

Super.

::: mobile/android/base/home/LastTabsPage.java
@@ +159,5 @@
>          mRestoreButton.setVisibility(View.GONE);
>  
>          if (mEmptyView == null) {
>              // Set empty page view. We delay this so that the empty view won't flash.
> +            ViewStub emptyViewStub = (ViewStub) getActivity().findViewById(R.id.home_empty_view_stub);

Please make this final.

::: mobile/android/base/home/MostRecentPage.java
@@ +158,5 @@
>          // Cursor is empty, so hide the title and set the empty view if it hasn't been set already.
>          mTitle.setVisibility(View.GONE);
>          if (mEmptyView == null) {
>              // Set empty page view. We delay this so that the empty view won't flash.
> +            ViewStub emptyViewStub = (ViewStub) getActivity().findViewById(R.id.home_empty_view_stub);

Please make this final.
Attachment #788427 - Flags: review?(sriram) → review+
Forgot to drop the revision here: https://hg.mozilla.org/projects/fig/rev/dff6e98eaac0
Whiteboard: fixed-fig
https://hg.mozilla.org/mozilla-central/rev/dff6e98eaac0
Assignee: nobody → liuche
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: