Wow! Great! It works :-)
Follow-up questions:
1) Is it possible to restrict other applications to access one's
assets files?
2) getAssets().list("") seems to list three directories by default:
images, sounds, and webkit. Is there some reason behind this, or did
some assets leak here that should not be here? (the images directory
contains for example "boot_robot.png" and "boot_robot_glow.png")
Thanks,
Peli
On 22 Nov., 01:24, "Dianne Hackborn" <[EMAIL PROTECTED]> wrote:
> You can just create a context for the other application, and get its
> resources and then asset manager and use that.
>
>
>
> On Fri, Nov 21, 2008 at 3:07 PM, Peli <[EMAIL PROTECTED]> wrote:
>
> > Is it possible to import a Typeface from another apk? Or from the SD
> > card?
>
> > I only found: Typeface.createFromAsset(AssetManager mgr, String path)
> >http://code.google.com/android/reference/android/graphics/Typeface.html
>
> > I would like to ship fonts as an add-on to the main application, since
> > font files can be large. For this reason, the main application would
> > have to access a font from a different location than its own asset
> > folder.
>
> > I thought about maybe overriding AssetManager to provide a custom
> > InputStream for the font data, but this is not possible because
> > AssetManager is declared as final.
>
> > Are there any other tricks I could use to obtain Typeface from a
> > different location?
>
> > Peli
>
> --
> Dianne Hackborn
> Android framework engineer
> [EMAIL PROTECTED]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support. All such questions should be posted on public
> forums, where I and others can see and answer them.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---