I\'m trying to center an ImageView inside a LinearLayout horizontally and vertically, but I just can\'t do it. The main reason why I\'m not using a
ImageView
LinearLayout
If you are looking for an answer in java code,
LinearLayout linearLayout = new LinearLayout(context); linearLayout.setGravity(Gravity.CENTER); // add children