Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I tried to do it and its working .. Only difference I used the relative layoyt.. check this code:</p> <p>layout:</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="2000px" android:layout_height="1125px" tools:context=".MainActivity" &gt; &lt;VideoView android:id="@+id/videoView" android:layout_width="2000px" android:layout_height="1125px" android:layout_marginTop="0px" android:layout_marginLeft="0px" /&gt; &lt;Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="right" android:onClick="goright" /&gt; &lt;Button android:layout_width="wrap_content" android:layout_marginLeft="100px" android:layout_height="wrap_content" android:text="down" android:onClick="godown" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>and code is :</p> <pre><code> public class MainActivity extends Activity { private VideoView vv; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); vv = (VideoView) findViewById(R.id.videoView); vv.setVideoPath("sdcard/foo/foo.mp4"); vv.start(); } public void goright(View v) { RelativeLayout.LayoutParams ll = (RelativeLayout.LayoutParams) vv .getLayoutParams(); ll.setMargins(ll.leftMargin - 100, ll.topMargin, ll.rightMargin, ll.bottomMargin); vv.setLayoutParams(ll); } public void godown(View v) { RelativeLayout.LayoutParams ll = (RelativeLayout.LayoutParams) vv .getLayoutParams(); ll.setMargins(ll.leftMargin, ll.topMargin - 100, ll.rightMargin, ll.bottomMargin); vv.setLayoutParams(ll); } } </code></pre> <p>there are two buttons to move the video 100px to right or down</p> <p>good luck,</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload