Hi, i have a VideoView that i know how to center it on the screen, but
now i need to specify dinamically (java code, not xml code) the
position on the screen.

This is my actual code:

    VideoView vv = new VideoView(this);
    this.setContentView(vv);
    LayoutParams vvParams = (LayoutParams) vv.getLayoutParams();
    vvParams.gravity=17; //gravity 17 = center horizontal & vertical
    vvParams.width=150;
    vv.setLayoutParams(vvParams);
    String fileName = "android.resource://" + getPackageName() + "/" +
R.raw.v;
    vv.setVideoURI(Uri.parse(fileName));
    vv.start();

These are the possible positions i want to specify:

(vertical/horizontal) top left, top center, top right center left,
center center, center right bottom left, bottom center, bottom right

How to specify these possitions with java code dinamically?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to