Closed Bug 1149645 Opened 10 years ago Closed 10 years ago

Polish UI of Toast to be same as rest of Fennec

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Android
defect
Not set
normal

Tracking

(firefox40 verified)

VERIFIED FIXED
Firefox 40
Tracking Status
firefox40 --- verified

People

(Reporter: antlam, Assigned: mhaigh)

References

Details

Attachments

(2 files, 1 obsolete file)

As per our convo, just general clean up.
Assignee: nobody → mhaigh
Attached patch Polish Tab Queue (obsolete) — Splinter Review
Attachment #8595042 - Flags: review?(michael.l.comella)
Comment on attachment 8595042 [details] [diff] [review] Polish Tab Queue Review of attachment 8595042 [details] [diff] [review]: ----------------------------------------------------------------- 좋아요! ::: mobile/android/base/resources/layout/tab_queue_toast.xml @@ +11,5 @@ > + android:layout_height="wrap_content"> > + > + <LinearLayout > + android:id="@+id/toast" > + style="@style/TabQueueToast"> This doesn't need to be in a style - use Toast as the base style and add the separate parts here. ::: mobile/android/base/tabqueue/TabQueueService.java @@ +95,5 @@ > openNowButton.setText(resources.getText(R.string.tab_queue_toast_action)); > > + int layoutWidth = WindowManager.LayoutParams.MATCH_PARENT; > + if (!resources.getBoolean(R.bool.tab_queue_toast_width_match_parent)) { > + layoutWidth = resources.getDimensionPixelOffset(R.dimen.tab_queue_toast_width); As we discussed, just use the value with some margins - if there isn't enough space to fit the value, it will decrease in size.
Attachment #8595042 - Flags: review?(michael.l.comella) → review+
> As we discussed, just use the value with some margins - if there isn't > enough space to fit the value, it will decrease in size. Actually from testing it doesn't seem to limit the size of the view to the viewport. I've adjusted the code to use a width specific bucket which come about in Android 3.2 (level 13). This means that: - Pre 3.2 will use MATCH_WIDTH - this should be fine as there weren't any real tablets around pre 3 and we don't suppose 3.2 (also nobody uses 3.2 - https://developer.android.com/about/dashboards/index.html) - Anything with a width less than 400dp will use match parent with a margin on each side - anything with a width larger than 400dp will use a width of 400dp. this change will also affect our normal custom toasts, such as when you close a tab. Have talked to antlam about this who is happy with the change.
Attachment #8595042 - Attachment is obsolete: true
Attachment #8595637 - Flags: review?(michael.l.comella)
Comment on attachment 8595637 [details] [diff] [review] Polish UI of Toast to be same as rest of Fennec Review of attachment 8595637 [details] [diff] [review]: ----------------------------------------------------------------- 좋은 걸 하기 계속하세요! ::: mobile/android/base/resources/layout/tab_queue_toast.xml @@ +11,5 @@ > + android:layout_height="wrap_content"> > + > + <LinearLayout > + android:id="@+id/toast" > + style="@style/Toast"> If we want to better tie the layout of button_toast with tab_queue_toast, you could use an <include> tag here and dynamically add the left drawable. You'd have to have another layout for the FrameLayout or add a Java class file that extends FrameLayout and inflates button_toast as the inner layout. I won't block on this though. ::: mobile/android/base/tabqueue/TabQueueService.java @@ +99,1 @@ > WindowManager.LayoutParams.WRAP_CONTENT, For my edification, does this override the FrameLayout's params?
Attachment #8595637 - Flags: review?(michael.l.comella) → review+
>If we want to better tie the layout of button_toast with tab_queue_toast, you could use an <include> tag here and dynamically add the left drawable. You'd have to have another layout for the FrameLayout or add a Java class file that extends FrameLayout and inflates button_toast as the inner layout. I would do an include but for some reason adding the left drawable to the open now button didn't work! > For my edification, does this override the FrameLayout's params? Yes - I believe so.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
Tapping a link outside Firefox will display "Tab queued in Nightly | Open now" toast notification, so: Verified as fixed using: Device: Alcatel One Touch (Android 4.1.2) Build: Firefox for Android 40.0a1 (2015-04-28)
Status: RESOLVED → VERIFIED
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: