Droid-fu library’s WebGalleryAdapter with gallery example

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Droid-fu library’s WebGalleryAdapter with gallery example

Postby faisalloe » Sun Jan 03, 2010 8:10 pm

Any good tutorial shows how to use Droid-fu library's WebGalleryAdapter with gallery widget ??? here you can found info about

http://brainflush.wordpress.com/2009/11 ... ryadapter/

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. public class ImageGallery extends Activity{
  2.  
  3.  
  4.  
  5.     /** Called when the activity is first created. */
  6.  
  7.  
  8.  
  9.     @Override
  10.  
  11.     public void onCreate(Bundle savedInstanceState) {
  12.  
  13.         super.onCreate(savedInstanceState);
  14.  
  15.         WebGalleryAdapter webAdapter = new WebGalleryAdapter(ImageGallery.this);
  16.  
  17.  
  18.  
  19.         try {
  20.  
  21.             requestWindowFeature(Window.FEATURE_NO_TITLE);
  22.  
  23.             setContentView(R.layout.image_switcher_1);
  24.  
  25.             webAdapter.setImageUrls(loadImages());
  26.  
  27.             webAdapter.setProgressDrawable(getResources().getDrawable(R.drawable.ajax_loader));
  28.  
  29.             Gallery gallery = (Gallery)findViewById(R.id.gallery);
  30.  
  31.             gallery.setAdapter(webAdapter);
  32.  
  33.         } catch (Exception e) {
  34.  
  35.             Log.e(TAG, Util.getExceptionMsg(e));
  36.  
  37.         }
  38.  
  39.  
  40.  
  41.     }
  42.  
  43.     private LinkedList<String> loadImages(){
  44.  
  45.             //loading images from another static object
  46.  
  47.         LinkedList<ImageURL> urlList = ResultSetHandler.getImagesGalleryUrls();
  48.  
  49.         LinkedList<String> list = new LinkedList<String>();
  50.  
  51.         for(ImageURL imageUrl: urlList){
  52.  
  53.             list.add(imageUrl.getImagePath());
  54.  
  55.         }
  56.  
  57.         return list;
  58.  
  59.     }
  60.  
  61.  
  62.  
  63.     //Retriving loaded image urls
  64.  
  65.  
  66.  
  67. }
Parsed in 0.068 seconds, using GeSHi 1.0.8.4

is there any thing named WebImageGallery in droid-fu library i could not found any thing...
Attachments
8954c5a8a9.jpg
8954c5a8a9.jpg (12.97 KiB) Viewed 851 times
faisalloe
Developer
Developer
 
Posts: 29
Joined: Wed Nov 04, 2009 5:01 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Exabot [Bot] and 3 guests