Closed Bug 950826 Opened 6 years ago Closed 6 years ago

Super toast style not matching native platform look and feel

Categories

(Firefox for Android :: Theme and Visual Design, defect)

29 Branch
ARM
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 30

People

(Reporter: aaronmt, Assigned: veeti.paananen)

Details

(Keywords: reproducible)

Attachments

(3 files)

See screenshot ('Bookmark Added') vs ('Bookmark Removed). This was tested on a a KitKat (Android 4.4.x) device, LG Nexus 4.

--
Nightly (12/16)
I've quickly hacked together drawables and styles based on the native 4.4 AOSP files. Attaching a patch and screenshot.
Attached image toast-screenshot.png
Attached patch 950826.patchSplinter Review
Comment on attachment 8350954 [details] [diff] [review]
950826.patch

Not sure you can use that licence in toast_button.xml
Attachment #8350954 - Flags: review?(wjohnston)
toast_button.xml is a copy from another drawable bucket and already included that license.
Comment on attachment 8350954 [details] [diff] [review]
950826.patch

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

This is originally stolen from a project by roman that shipped a custom background here. But, I wonder if we can instead steal the android drawable? i.e. use @android:drawable/toast_frame here:

https://developer.android.com/reference/android/R.drawable.html#toast_frame

It looks like its the right image http://androidxref.com/4.4_r1/xref/frameworks/base/core/res/res/drawable-hdpi/toast_frame_holo.9.png

You mind trying? The pressed state may be wrong since Android doesn't have one. Maybe that's why he didn't do this....
> But, I wonder if we can instead steal the android drawable? i.e. use @android:drawable/toast_frame here:

That's where the v19 toast frames are from (toast.9.png). Copied straight from AOSP.

> The pressed state may be wrong since Android doesn't have one.

Native toasts don't have any concept of interactivity: actionable toasts are not a part of the standard library at all. That is why there aren't any drawables for a pressed toast in the AOSP frameworks. Thus, I had to create the pressed state drawable myself based on the originals.
review ping?
Status: NEW → ASSIGNED
Comment on attachment 8350954 [details] [diff] [review]
950826.patch

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

Sorry. Yeah, I'm just trying to think of a way to use the built in drawables so that we're not constantly chasing Google's tail here. Lets do this for now and I'll file a separate bug to look into better ways to fix this.
Attachment #8350954 - Flags: review?(wjohnston) → review+
Ping for landing?
https://hg.mozilla.org/mozilla-central/rev/2fca335e35c6
Assignee: nobody → veeti.paananen
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 30
You need to log in before you can comment on or make changes to this bug.