I want to put an imageView on the center_vertically of FrameLayout. But, I can not do it. I have tried FrameLayout.LayoutParams but, it does not have .addRule() method.
public class P023Deneme extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FrameLayout frameLayout=new FrameLayout(this);
ImageView imageViewBackgroud=new ImageView(this);
imageViewBackgroud.setImageResource(R.drawable.sample_6);
ImageView imageViewLeftArrow=new ImageView(this);
imageViewLeftArrow.setImageResource(R.drawable.slidersolok_logo);
frameLayout.addView(imageViewBackgroud);
frameLayout.addView(imageViewLeftArrow,50,50);
setContentView(frameLayout);
}
}