/[projects]/android/Side9/src/dk/thoerup/side9/ImageAdapter.java
ViewVC logotype

Diff of /android/Side9/src/dk/thoerup/side9/ImageAdapter.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 911 by torben, Thu Jun 3 09:31:00 2010 UTC revision 912 by torben, Sat Jun 26 08:21:22 2010 UTC
# Line 12  import android.view.ViewGroup; Line 12  import android.view.ViewGroup;
12  import android.widget.BaseAdapter;  import android.widget.BaseAdapter;
13  import android.widget.GridView;  import android.widget.GridView;
14  import android.widget.ImageView;  import android.widget.ImageView;
15    import android.widget.Toast;
16    
17  public class ImageAdapter extends BaseAdapter {  public class ImageAdapter extends BaseAdapter {
18      //int mGalleryItemBackground;      //int mGalleryItemBackground;
# Line 25  public class ImageAdapter extends BaseAd Line 26  public class ImageAdapter extends BaseAd
26                    
27          String path = Environment.getExternalStorageDirectory().getPath() + "/Side9" ;          String path = Environment.getExternalStorageDirectory().getPath() + "/Side9" ;
28                    
29            
30            
31          File root = new File(path);          File root = new File(path);
32            
33            if (root.exists() == false) {
34                    Toast.makeText(mContext, "Side9 folder not found on sdcard", Toast.LENGTH_LONG).show();
35                    return;
36            }
37            
38          File files[] = root.listFiles();          File files[] = root.listFiles();
39          for (File f : files) {                    for (File f : files) {          
40              Bitmap bmp = BitmapFactory.decodeFile( f.getPath() );              Bitmap bmp = BitmapFactory.decodeFile( f.getPath() );

Legend:
Removed from v.911  
changed lines
  Added in v.912

  ViewVC Help
Powered by ViewVC 1.1.20