Code example for ViewGroup.MarginLayoutParams

0
 
	@Override 
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		DrawView view = new DrawView(this);
		view.setLayoutParams(new LayoutParams(new MarginLayoutParams(0, 0)));
		view.setPadding(0, 0, 0, 0);
		setContentView(view);
		mView = view;
	} 
 
	@Override 
	protected void onResume() { 
		 
		Log.d(TAG, "onStart()");
 
		Context saverContext;
 
		try { 
			saverContext = createPackageContext("pl.zajecia.cw4_1", 0);
		} catch (NameNotFoundException e) {