Code example for Point

Methods: set

0
SharedPreferences prefs;
	int resid = -1;
	BitmapDrawable drawable;
	Rect bounds = new Rect();
	Point center = new Point();
	int alpha = 255;
	float scale = 1;
	 
	public CustomDrawable( Context pCtx, int pResID )
	{ 
		prefs = PreferenceManager.getDefaultSharedPreferences( pCtx );
		resid = pResID;
		drawable = (BitmapDrawable)pCtx.getResources().getDrawable( pResID );
		drawable.setBounds( 0, 0, drawable.getBitmap().getWidth(), drawable.getBitmap().getHeight() );
		bounds = drawable.getBounds();
		center.set( bounds.centerX(), bounds.centerY() );
	} 
 
	public boolean setFromPrefs( int pButtonCount )
	{ 
		Log.v( "CustomDrawable", "setFromPrefs: resid="+resid );
Experience pair programming with AI  Get Codota for Java