java - Android Videoview Set Width,Height,X and Y -
my screen android phone width=888 height=672
i want create videoview x=670 , y=250
(videowidth=500 , videoheight=200 ,videox=670 , videoy=250)
i seek code below
windowmanager.layoutparams params = new windowmanager.layoutparams( videowidth, videoheight, videox, videoy, windowmanager.layoutparams.type_system_overlay, windowmanager.layoutparams.flag_watch_outside_touch, pixelformat.translucent);
but video show , x , y moving left,so x , y not fiks, how can create videoview x , y fiks,i want create programmatically no xml, give thanks you
like link image exampe image screen , videoview
i seek this
i seek
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/relativelayout1" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingbottom="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" tools:context=".mainactivity" > <surfaceview android:id="@+id/playersurface" android:layout_width="wrap_content" android:layout_height="48dp" android:layout_alignparentleft="true" android:layout_alignparenttop="true" android:layout_marginleft="-37dp" android:layout_margintop="62dp" />
but same, cannot show x -37
java android xml performance android-layout
No comments:
Post a Comment