On 26 Wrz, 14:59, Ashley McConnell <ash...@siroccoracing.com> wrote:
> On Mon, Sep 26, 2011 at 1:04 PM, skink <psk...@gmail.com> wrote:
>
> > On Sep 26, 1:10 pm, Ashley McConnell <ash...@siroccoracing.com> wrote:
> > > > So you would like to call RemoteViews.setBitmap() right?
>
> > > I'd like to call RemoteViews.setImageViewUri with a file in the assets
> > > directory.  The problem with setImageViewBitmap is that it very quickly
> > hits
> > > an android imposed limit.
>
> > > All the best,
> > > Ash
>
> > > --
> > > Awesome Widgets <http://www.siroccosoftware.com/awesome>
> > > Online Racing Championship <http://onlineracingchampionship.com>
> > > Twitter <http://twitter.com/AshMcConnell>
>
> > Ok, I see it now.
>
> > Looking into ImageView sources it seems however that your problem can
> > be solved by using custom ContentProvider
>
> > pskink
>
> Thanks, That was a workaround I didn't think of, I'll give it a go.  I don't
> understand why the asset URI doesn't work as advertised though.
> --
> Awesome Widgets <http://www.siroccosoftware.com/awesome>
> Online Racing Championship <http://onlineracingchampionship.com>
> Twitter <http://twitter.com/AshMcConnell>

simply
@Override
public AssetFileDescriptor openAssetFile(Uri uri, String mode) throws
FileNotFoundException {
        String path = uri.getPath().substring(1);
        try {
            AssetFileDescriptor afd = mAssetManager.openFd(path);
            return afd;
        } catch (IOException e) {
            throw new FileNotFoundException("No asset found: " + uri);
        }
}

where mAssetManager = getContext().getAssets();

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to