package credit.android.dg;

import android.app.Activity;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.RoundRectShape;
import android.os.Bundle;
import android.view.View;

public class Cash extends Activity{
	private ShapeDrawable m_sdTopShape;
	private ShapeDrawable m_sdBottomShape;
	private View[] m_vCashOptions;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.cash);
		
		m_vCashOptions = new View[4];
		m_vCashOptions[0] = findViewById(R.id.cash_1);
		m_vCashOptions[3] = findViewById(R.id.cash_4);
		
		makeTopRounded();
		makeBottomRounded();
	}
	
	public void makeTopRounded(){
		float[] outerR = new float[] { 8, 8, 8, 8, 0, 0, 0, 0 };
		m_sdTopShape = new ShapeDrawable(new RoundRectShape(outerR, null, null));
		m_sdTopShape.getPaint().setColor(0xffffffff);
		m_vCashOptions[0].setBackgroundDrawable(m_sdTopShape);
	};
	
	public void makeBottomRounded(){
		float[] outerR = new float[] { 0, 0, 0, 0, 8, 8, 8, 8 };
		m_sdBottomShape = new ShapeDrawable(new RoundRectShape(outerR, null, null));
		m_sdBottomShape.getPaint().setColor(0xffffffff);
		m_vCashOptions[m_vCashOptions.length - 1].setBackgroundDrawable(m_sdBottomShape);
	};

}
