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 de.gallery.demo; import java.lang.reflect.Field; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.util.DisplayMetrics; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.GridView; import android.widget.ImageView; public class MyGallery extends Activity { private final int ThumbWidth = 60; private final int ThumbHeight = 60; private GridView mGrid; private int[] allDrawables; private ImageView large; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); allDrawables = getAllResourceIDs(R.drawable.class); large = (ImageView) findViewById(R.id.large); large.setScaleType(ImageView.ScaleType.FIT_CENTER); large.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { switchView(); } }); large.setVisibility(View.GONE); DisplayMetrics dm = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(dm); mGrid = (GridView) findViewById(R.id.grid); mGrid.setAdapter(new GridAdapter(this, ThumbWidth, ThumbHeight)); mGrid.setNumColumns(dm.widthPixels/ThumbWidth); mGrid.setColumnWidth(ThumbWidth); } private int[] getAllResourceIDs(Class aClass) { Field[] IDFields = aClass.getFields(); int[] IDs = new int[IDFields.length]; try { for(int i = 0; i < IDFields.length; i++) IDs[i] = IDFields[i].getInt(null); } catch (Exception e) { } return IDs; } private void switchView() { if(mGrid.getVisibility() == View.VISIBLE) { mGrid.setVisibility(View.GONE); large.setVisibility(View.VISIBLE); } else { large.setVisibility(View.GONE); mGrid.setVisibility(View.VISIBLE); } } class GridAdapter extends BaseAdapter { private Context mContext; private int tw; private int th; public GridAdapter(Context c, int thumbw, int thumbh) { this.mContext = c; this.tw = thumbw; this.th = thumbh; } public int getCount() { return allDrawables.length; } public Object getItem(int position) { return allDrawables[position]; } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { ImageView iv; if (convertView == null) { iv = new ImageView(mContext); iv.setScaleType(ImageView.ScaleType.FIT_XY); iv.setLayoutParams(new GridView.LayoutParams(tw, th)); iv.setId(position); iv.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { large.setImageResource(allDrawables[v.getId()]); switchView(); } }); } else { iv = (ImageView) convertView; } iv.setImageResource(allDrawables[position]); return iv; } } }