Any idea what’s happening here I’m playing with video and as you can see its working great but the video goes…
Any idea what’s happening here I’m playing with video and as you can see its working great but the video goes outside of the custom view when in edit mode.
VideoView is set to match parent and so is the frame layout I also tried with a LinearLayout but same thing happened.
]]>« On Android Marshmallow the badges are not visible and no funtional (Previous Post)
(Next Post) I’m having a problem creating widgets. »
< ![CDATA[
Great, I like this π
I think the video uses an hardware overlay for which the scaling is not applied but I have no idea why.
]]>
< ![CDATA[
No worrys I was just curious wasnt a bug report or anything that’s why its in discussion π
]]>
< ![CDATA[
I believe it should work, for instance in the Youtube app the video can be scaled and moved in the corner, I don’t know why it’s different here π Maybe some configuration when creating the view.
]]>
< ![CDATA[
It could also be my code I’m still not to good with this stuff.
// Video Test
LL.bindClass(“android.widget.FrameLayout“);
LL.bindClass(“android.widget.VideoView“);
LL.bindClass(“android.widget.MediaController“);
var mctx = LL.getContext();
var file = “/storage/emulated/0/Movies/BigCity1.mp4”;
var fl = new LinearLayout(mctx);
var flp = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT,FrameLayout.LayoutParams.MATCH_PARENT);
fl.setLayoutParams(flp);
var vv = new VideoView(mctx);
vv.setVideoPath(file);
var vvp = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT,FrameLayout.LayoutParams.MATCH_PARENT);
vv.setLayoutParams(vvp);
fl.addView(vv);
vv.start();
var mc = new MediaController(mctx);
vv.setMediaController(mc);
return fl;
]]>
< ![CDATA[
Syntax highlighted by Google lol
]]>
< ![CDATA[
Has anyone figured this out yet? Same issue here. π
]]>
< ![CDATA[
Why the sad face? it doesn’t effect anything it only happens in edit mode.
]]>
< ![CDATA[
Thanks for the response π
I can’t get the videoview to appear at all sometimes, in and out of edit mode, and I also have randomly-aligned video controls (without video, but audio is there) at times – with the same video files that display video in odd places in edit mode… I’ll try to explain better after getting some sleep – but any advice for creating a video window (considering a WebView with html5, but I wanted to try alternate options first) would be greatly appreciated. Thanks π
]]>
< ![CDATA[
Weird :/ I never had those problems are you using my code or your own? I did this with a webview azwell I can’t remember if I posted the code or not though. If i did it will be posted under discussion.
Btw I asked what would be the best way to display a large gif and Pierre suggested using a videoview because it would be more efficient and the animation would be smoother. So your probably better of sticking with that instead of a webview.
]]>
< ![CDATA[
I’m using your code above, plus an extra binding… android.widget.LinearLayout… I can’t seem to find the above-mentioned videoview js code in your exchanges with Pierre… If you have a moment, I’d really appreciate anything you have in that department. From one Jay M. to another – Thanks π
]]>
< ![CDATA[
I never posted the full videoview code this^ is just what I had at the time. Il check my TV when I get home but I don’t think I have it anymore, btw I just noticed the fifth line of this^ code is LinearLayout. IIRC I originally used a LinearLayout then later on I used search and replace to change Linear to Frame i must of forgot about replacing that line though.
]]>
< ![CDATA[
Na I don’t have it.
]]>
< ![CDATA[
Jason Miller if you replace LinearLayout with FrameLayout the script should work ok, although it will still behaves trangely when scrolling and zooming the desktop.
I just implemented a workaround which will improve the situation when scrolling the desktop, but unfortunately it will remain broken when zooming. Any scale different from 1 will result in a misplaced content. You may try this in the upcoming update.
]]>
< ![CDATA[
Just tried this again works great for me.
]]>