0
I created a imageView
via code and would like to know how to center it on the screen
0
I created a imageView
via code and would like to know how to center it on the screen
3
Hello,
This will depend on the type of layout you’re using.But try using this one:
LinearLayout.LayoutParams mLayoutParams=new LinearLayout.LayoutParams(width, height);
mLayoutParams.gravity=Gravity.CENTER;
ImageView.setLayoutParams(layoutParams);
Browser other questions tagged java android imageview
You are not signed in. Login or sign up in order to post.