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)
class PhotoAdapter extends BaseAdapter { private LayoutInflater mInflater; private List mPhotos; public PhotoAdapter(Context context, List photos) { mInflater = LayoutInflater.from(context); mPhotos = photos; } public int getCount() { return mPhotos.size(); } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } @Override public View getView(int position, View conView, ViewGroup par) { ViewHolder holder; if (conView == null) { conView = mInflater.inflate(R.layout.photo, null); holder = new ViewHolder(); holder.image = (ImageView)conView.findViewById(R.id.photo); // holder.image.setLayoutParams(new GridView.LayoutParams(85, 85)); // holder.image.setScaleType(ImageView.ScaleType.CENTER_CROP); // holder.image.setPadding(8, 8, 8, 8); conView.setTag(holder); } else { holder = (ViewHolder) conView.getTag(); } Photo photo = mPhotos.get(position); URL url; try { url = new URL(photo.getThumbnailUrl()); URLConnection conn = url.openConnection(); conn.connect(); InputStream is = conn.getInputStream(); Bitmap bm = BitmapFactory.decodeStream(is); holder.image.setImageBitmap(bm); } catch (Exception e) { e.printStackTrace(); } return conView; } private class ViewHolder { ImageView image; } } public class ShowPhotosActivity extends Activity { List photos = null; String keyword = ""; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.showphotos); GridView showPhotoGridView = (GridView) findViewById(R.id.showPhotoGridView); Intent intent = this.getIntent(); Bundle bundle = intent.getExtras(); keyword = bundle.getString("keyword"); photos = getPhotos(keyword); showPhotoGridView.setAdapter(new PhotoAdapter(this, photos)); showPhotoGridView.setOnItemClickListener( new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView arg0,View arg1, int arg2,long arg3) { Intent intent = new Intent(); intent.setClass(ShowPhotosActivity.this, ShowPhotoActivity.class); Bundle bundle = new Bundle(); bundle.putString("photoUrl",photos.get(arg2).getUrl()); intent.putExtras(bundle); startActivity(intent); } }); } private List getPhotos(String keyword) { System.setProperty("http.proxyHost", "10.254.144.158"); System.setProperty("http.proxyPort", "8080"); List photos = null; String path = "http://picasaweb.google.com/data/feed/api/all?kind=photo&q=" + keyword + "&max-results=9&imgmax=512&thumbsize=64"; URL url = null; try { url = new URL(path); PhotoXmlHandler handler = new PhotoXmlHandler(); Xml.parse(url.openConnection().getInputStream(), Xml.Encoding.UTF_8, handler); photos = handler.getPhotos(); } catch (Exception e) { throw new RuntimeException(e); } return photos; } @Override protected void onStart() { super.onStart(); } @Override protected void onRestart() { super.onRestart(); } @Override protected void onResume() { super.onResume(); } @Override protected void onPause() { super.onPause(); } @Override protected void onStop() { super.onStop(); } @Override protected void onDestroy() { super.onDestroy(); } }