Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
package com.major; import java.io.File; import com.major.R.string; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.res.TypedArray; import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.View.OnTouchListener; import android.view.ViewGroup.LayoutParams; import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.Gallery; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.Toast; import android.widget.AdapterView.OnItemClickListener; import android.widget.AdapterView.OnItemSelectedListener; import android.provider.MediaStore; public class GalleryExample extends Activity { private Context mContext; private Cursor cursor; private int column_index; private Gallery g; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.galleryexample1); // Here we set up a string array of the thumbnail ID column we want to // get back String[] proj = { MediaStore.Images.Thumbnails._ID }; // Now we create the cursor pointing to the external thumbnail store cursor = managedQuery( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, proj, // Which // columns // to // return null, // WHERE clause; which rows to return (all rows) null, // WHERE clause selection arguments (none) null); // Order-by clause (ascending by name) // We now get the column index of the thumbnail id // startManagingCursor(cursor); column_index = cursor .getColumnIndexOrThrow(MediaStore.Images.Thumbnails._ID); // Reference the Gallery view g = (Gallery) findViewById(R.id.gallery); // Set the adapter to our custom adapter (below) g.setAdapter(new ImageAdapter(this)); // Set a item click listener, and just Toast the clicked position ThreadExt th = new ThreadExt(); th.start(); g.setOnItemSelectedListener(new OnItemSelectedListener() { @Override public void onItemSelected(AdapterView arg0, View arg1, int arg2, long arg3) { ImageView ibutton = (ImageView) (findViewById(R.id.ibuttion)); ibutton.setImageURI(Uri.withAppendedPath( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, "" + (arg2 ))); filename = "" + arg2 ; } @Override public void onNothingSelected(AdapterView arg0) { // TODO Auto-generated method stub } }); } public void toast(String filename) { try { Toast.makeText(GalleryExample.this, filename, Toast.LENGTH_SHORT) .show(); } catch (Exception e) { e.printStackTrace(); } } public class ImageAdapter extends BaseAdapter { int mGalleryItemBackground; // private ImageManager mImageManager; public ImageAdapter(Context c) { mContext = c; // See res/values/attrs.xml for the that defines // Gallery1. TypedArray a = obtainStyledAttributes(R.styleable.Gallery1); mGalleryItemBackground = a.getResourceId( R.styleable.Gallery1_android_galleryItemBackground, 0); a.recycle(); } public int getCount() { return cursor.getCount(); } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { ImageView i = new ImageView(mContext); if (convertView == null) { cursor.moveToPosition(position); int id = cursor.getInt(column_index); // ImageView ix = new ImageView(mContext); i.setImageURI(Uri.withAppendedPath( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, "" + (id))); i.setScaleType(ImageView.ScaleType.FIT_XY); i.setLayoutParams(new Gallery.LayoutParams(204, 132)); // The preferred Gallery item background i.setBackgroundResource(mGalleryItemBackground); } return i; } } String filename; public class ThreadExt extends Thread { public void run() { try { Thread.sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } // Now we want to actually get the data location of the file String[] proj = { MediaStore.Images.Media.DATA }; // We request our cursor again Cursor cursor = managedQuery( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, proj, // Which // columns // to // return null, // WHERE clause; which rows to return (all rows) null, // WHERE clause selection arguments (none) null); // Order-by clause (ascending by name) // We want to get the column index for the data uri column_index = cursor .getColumnIndexOrThrow(MediaStore.Images.Media.DATA); // Lets move to the selected item in the cursor cursor.moveToPosition((int) g.getSelectedItemId()); } }; private Handler handler = new Handler() { public void handleMessage(Message msg) { toast(filename); } }; }