i have two linear layouts in one frame layout.
layout = (LinearLayout) findViewById(R.id.layoutbtnlinear_aboutme); LinearLayout.LayoutParams params = (LinearLayout.LayoutParams)layout.getLayoutParams(); params.setMargins(0, 50, 0, 0); layout.setLayoutParams(params);