1

how can I change the layout params (centerInParent) of a videoview

<VideoView
        android:id="@+id/videoPlayer"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_centerInParent="false" />

to

<VideoView
        android:id="@+id/videoPlayer"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_centerInParent="true" />

regards christian

user1836363
  • 295
  • 1
  • 5
  • 13

1 Answers1

0

Did You mean, setting LayoutParams programmatically? Maybe it is possible with a code like this

    RelativeLayout.Layoutparams params = new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT);
    params.addRule(RelativeLayout.CENTER_IN_PARENT);
Opiatefuchs
  • 9,800
  • 2
  • 36
  • 49