-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/mobile/cmd/gomobile: icon support in gomobile #9985
Comments
There's so many ways to go about this. As a lowest common denominator, simply having an As an addition to this, it may be reasonable to allow someone to tweak how scaling is done with a name modifier, e.g. With regards to platform specifics, things may get a little crazy when trying to remain platform agnostic. For example, Android defines the mipmap resource directory specifically for defining icons where assets provided may be displayed larger than what is normally provided in a drawable qualifier (mdpi, hdpi, etc) for cases where something like a home screen may display icons larger than what was intended by the system. With things like this in mind, I don't think it would be unreasonable to allow finite control over defining icon resources to assure the app is presentable for it's intended audience, but this does push against the grain of platform agnostic behavior with gomobile. With regards to Android, I'm unaware if simply packing the icons in the apk is enough (that'd be great). I suspect that a resources.arsc will need to be generated to identify the drawables for their intended configurations, such as with internal/binres. |
Has there been any work done on this? Is it now possible to set the app icon using gomobile? |
I'm working on android support as of a couple weeks ago but it's not ready yet. |
CL https://golang.org/cl/30019 mentions this issue. |
Please add anote to wiki https://github.com/golang/go/wiki/Mobile about this restriction. |
Provides support for resources.arsc generation enabling the setting of an application icon. If an asset/icon.png is encountered during build, then the resources.arsc is generated to identify a single xxxhdpi resource and the manifest will be updated to reference resource as app icon. References golang/go#9985 Change-Id: I9ef59fff45dcd612a41c479b2c679d22c094ab36 Reviewed-on: https://go-review.googlesource.com/30019 Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
What's the status of this addition? |
@rucuriousyet this push added the ability to generate resource tables for apks which is then used for the simplest form of icon support, picking up on an It's desirable to support specifying the icon for each density and this pushed removed technical hurdles related. It's also desirable to support iOS but I don't have the requisite hardware to test an implementation. From what I read a year ago, my impression is iOS support would be comparatively trivial. |
Any idea when this may become part of gomobile? |
Or has it already? |
It has. You'll need to install the latest version of cmd/gomobile to use. |
Awesome! I just wish there was some notation of this in the gomobile wiki
…-sent from my OnePlus X
On Nov 3, 2017 6:48 PM, "Daniel Skinner" ***@***.***> wrote:
It has. You'll need to install the latest version of cmd/gomobile to use.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9985 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AIIciAYjIXHx66_FyYCQfqKr9xTLKp45ks5sy5hPgaJpZM4DlHEN>
.
|
Provides support for resources.arsc generation enabling the setting of an application icon. If an asset/icon.png is encountered during build, then the resources.arsc is generated to identify a single xxxhdpi resource and the manifest will be updated to reference resource as app icon. References golang/go#9985 Change-Id: I9ef59fff45dcd612a41c479b2c679d22c094ab36 Reviewed-on: https://go-review.googlesource.com/30019 Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
Provides support for resources.arsc generation enabling the setting of an application icon. If an asset/icon.png is encountered during build, then the resources.arsc is generated to identify a single xxxhdpi resource and the manifest will be updated to reference resource as app icon. References golang/go#9985 Change-Id: I9ef59fff45dcd612a41c479b2c679d22c094ab36 Reviewed-on: https://go-review.googlesource.com/30019 Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
There are some useful defaults we could have for app icons. Place an icon in /assets/icon.png, and it gets used.
But it turns out there are many icons. Android has an arbitrary number of potential sizes, depending on the DPI of the screen. iOS has a series of fixed sizes. Both also have much larger store icons (1024x1024 and 512x512).
http://developer.android.com/design/style/iconography.html
https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html
Given the large number of android combinations, automatic scaling might make sense. However users may need the ability to provide multiple icons, as small images often require artistic adjustment to the number of pixels. One possibility is /assets/iconUxV.png.
The text was updated successfully, but these errors were encountered: