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 maximyudin.wallpaperswitcher; import java.util.ArrayList; import android.app.*; import android.content.*; import android.os.Bundle; import android.view.*; import android.view.animation.AnimationUtils; import android.widget.*; import android.widget.Gallery.LayoutParams; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.drawable.Drawable; public class WallpaperSwitcher extends Activity implements ViewSwitcher.ViewFactory, AdapterView.OnItemSelectedListener { /** Called when the activity is first created. */ private ImageSwitcher mISwitcher; private int mCurrentSelectedImage; private TextView mTVCurrentWallpaper; private ArrayList allimages = new ArrayList(); @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.main); for (int i = 0; i < mImageIds.length; i++) { allimages.add(this.getResources().getDrawable(mImageIds[i])); } mISwitcher = (ImageSwitcher) findViewById(R.id.switcher); mISwitcher.setFactory(this); mISwitcher.setInAnimation(AnimationUtils.loadAnimation(this, android.R.anim.fade_in)); mISwitcher.setOutAnimation(AnimationUtils.loadAnimation(this, android.R.anim.fade_out)); Gallery gallery = (Gallery) findViewById(R.id.gallery); gallery.setAdapter(new ImageAdapter(this)); gallery.setSelectorSkin(getResources().getDrawable(android.R.drawable.box)); gallery.setOnItemSelectedListener(this); final Button btnSetWallpaper = (Button) findViewById(R.id.btnsetwallpaper); btnSetWallpaper.setOnClickListener(btnSetWallpaperListener); mTVCurrentWallpaper = (TextView) findViewById(R.id.tvcurrentwallpaper); } private Button.OnClickListener btnSetWallpaperListener = new Button.OnClickListener() { public void onClick(View v) { NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); try { Bitmap newwallpaper = Bitmap.createBitmap(320, 240, true); Canvas myCanvas = new Canvas(newwallpaper); allimages.get(mCurrentSelectedImage).draw(myCanvas); setWallpaper(newwallpaper); broadcastIntent(new Intent (Intent.WALLPAPER_CHANGED_ACTION)); nm.notifyWithText(R.id.btnsetwallpaper, getText(R.string.newwallpaperset), NotificationManager.LENGTH_SHORT, null); } catch (Exception e) { nm.notifyWithText(R.id.btnsetwallpaper, getText(R.string.newwallpaperfailed), NotificationManager.LENGTH_SHORT, null); } } }; public void onItemSelected(AdapterView parent, View v, int position, long id) { mCurrentSelectedImage = position; mISwitcher.setImageDrawable(allimages.get(position)); mTVCurrentWallpaper.setText(getText(R.string.selectedpicture) + " [ " + (mCurrentSelectedImage + 1) + "/" + allimages.size() + " ]"); } public void onNothingSelected(AdapterView parent) { } public View makeView() { ImageView i = new ImageView(this); i.setBackgroundColor(0xFF000000); i.setScaleType(ImageView.ScaleType.FIT_CENTER); i.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); return i; } public class ImageAdapter extends BaseAdapter { private Context mContext; public ImageAdapter(Context c) { mContext = c; } public int getCount() { return allimages.size(); } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { ImageView galleryview = new ImageView(mContext); galleryview.setImageDrawable(allimages.get(position)); galleryview.setAdjustViewBounds(true); galleryview.setLayoutParams(new Gallery.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); galleryview.setBackground(android.R.drawable.picture_frame); return galleryview; } public float getAlpha(boolean focused, int offset) { return Math.max(0.2f, 1.0f - (0.2f * Math.abs(offset))); } public float getScale(boolean focused, int offset) { return Math.max(0, offset == 0 ? 1.0f : 0.6f); } } private Integer[] mImageIds = { R.drawable.sample_0, R.drawable.sample_1}; }