android - Is it possible to convert data types such as long to view? -


i want id of file convert view can use drag , drop method.

here code:

view x = madapter.getitemid(position); 

and state'st "type mismatch cannot convert long view"...

so, there way id of file bind view me implement drag , drop ? .

thanks in advance.

no. long not view. there large amount of data , logic powers view (such code draw , measure view) isn't in long. how android/java convert simple number graphical object?

what can use data file populate view. example, use picture sd card set image of imageview:

imageview myimageview = (imageview) findviewbyid(r.id.imageview1);     string imagepath = environment.getexternalstoragedirectory().tostring() "images/my-image.jpg"; bitmap bmp = bitmapfactory.decodefile(imagepath); myimageview.setimagebitmap(bmp); 

similarly read data text file populate textview.


Comments