where we need to store text files  to access!!!

On Mon, Feb 20, 2012 at 3:07 PM, Chandra Sekhar <[email protected]>wrote:

> Hi Ankur, try this one
>
> Do this one in  onCreate() method   (All the best)
> *************************************
>     ArrayAdapter<String> adapter;
>              ArrayList<String> listItems=new ArrayList<String>();
>              File[] imagelist;
>              String[] pdflist;
>              File images = Environment.getExternalStorageDirectory();
>              imagelist = images.listFiles(new FilenameFilter(){
>                      public boolean accept(File dir, String name)
>                      {
>                              return ((name.endsWith(".pdf")));
>                      }
>              });
>              pdflist = new String[imagelist.length];
>              Log.i("RGT"," Size  :"+imagelist.length);
>
>              for(int i = 0;i<imagelist.length;i++)
>              {
>                      pdflist[i] = imagelist[i].getName();
>                      Log.i("RGT"," Size  :"+imagelist.length);
>              }
>              this.setListAdapter(new ArrayAdapter<String>(this,
>  android.R.layout.simple_list_item_1, pdflist));
> }
> --
>
>  --
> 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
>



-- 
Thanks& Regards
Deepa M

-- 
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