If you only need to assign some background to you ImageView you should
use resources instead.
http://developer.android.com/guide/topics/resources/resources-i18n.html

On Jul 2, 1:02 pm, qLabs <[email protected]> wrote:
> okey so i found a solution
>
> here is it
>
> is = SharedData.context.getAssets().open(myFile);
> Bitmap bitmap=BitmapFactory.decodeStream(is);
>
> and after that i set my ImaveView sith setImageBitmap(bitmap).
>
> thanks u alot nightwolf
>
> Cheers
>
> On Jul 2, 10:28 am, qLabs <[email protected]> wrote:
>
>
>
> > First, thanks for replying.
>
> > So since my asset directory did'nt exist, i created it and i placed 4
> > folders in it, each one containing files.
> > My goal is to set up image (the contained files) on ImageView object
> > from a xml parser.
> > So with the InputStream i don't know how to use it, i mean the only
> > methods ive got from an ImageView are setImageDrawable(from
> > ressources) or setImagebitmap...
> > I might be dump but i have no clue how to use this InputStream for
> > setup image to my ImageViews.
>
> > Cheers
>
> > On Jul 2, 6:39 am, Nightwolf <[email protected]> wrote:
>
> > > It's possible to store files to assets directory of your Android
> > > project and access them like this
>
> > > final InputStream is = context.getAssets().open("myfile.txt");
>
> > > Asset files like resource files are included into application package
> > > and you only need to install apk as usual.
> > > For other approaches please check MediaPlayerDemo from APIDemos.
> > > Confusing moment (for me) is that path to sd card should be started
> > > with "/sdcard/" (sorry, don't remember which slash is correct).
> > > And remember that file name is case sensitive.
>
> > > On Jul 1, 4:43 pm, qLabs <[email protected]> wrote:
>
> > > > Hello,
>
> > > > Im trying to read some local files, and ive been reading a lot of
> > > > stuff about it, but i still don't know where to store the files on my
> > > > phone and how to get the right path.
> > > > Some say, it should be stored on /data/data/your.package.here/files
> > > > but where is that, i mean i can get there when using the emulator but
> > > > i have no clue how to put files in this on a real device.
>
> > > > Cheers,
>
> > > > qLabs
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to