[android-developers] Re: VideoView inside a ListView

2016-05-24 Thread rayworks
Hi, there

Please note that VideoView is a kind of SurfaceView. As the doc mentions 
SurfaceView:

*The surface is Z ordered so that it is behind the window holding its 
> SurfaceView; the SurfaceView punches a hole in its window to allow its 
> surface to be displayed. The view hierarchy will take care of correctly 
> compositing with the Surface any siblings of the SurfaceView that would 
> normally appear on top of it. This can be used to place overlays such as 
> buttons on top of the Surface, though note however that it can have an 
> impact on performance since a full alpha-blended composite will be 
> performed each time the Surface changes. *


One of the solutions for having Video content in a scrolling view container 
could be using TextureView 
 to 
wrapper  MediaPlayer the same as VideoView does.

> *Unlike SurfaceView 
> , 
> TextureView does not create a separate window but behaves as a regular 
> View.*


Hope it could help. 


在 2016年5月20日星期五 UTC+8下午8:56:42,Ankit Sevak写道:
>
>Hello Every One
>  
>In this time i am Suffering  one problem in Android code.
>   I am working on a project which should include a list of videos from 
> allover the internet 
> (video sources are different - youtube, vimeo, facebook, videos hosted on 
> servers, ...). 
> I am trying to make a ListView, where item has a video player and some 
> description
>  When user clicks on play button the video starts playing. I made one 
> example, 
> where I use VideoView as player, but soon realised that the performance is 
> not very good - *scrolling is very laggy * 
>
>
>
>
>
>
>
> On Friday, August 13, 2010 at 4:01:12 AM UTC+5:30, Sandy wrote:
>>
>> I am trying to play a video via VideoView in my android application. 
>> The VideoView is one of items inside a ListView. Video playing 
>> functionality works good but when the list scroll happens, there are 
>> rendering artifacts at the boundaries of the list. Also, the video 
>> view surface changes location only after scroll/flick is complete. 
>>
>> Anyone tried this before in android? Does android allow this ? If so, 
>> can you please suggest of how to fix the rendering artifacts? 
>>
>> Thanks, 
>> Sandy 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/ce141a53-07e9-48a7-ad6c-27b87109d606%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Webview with transparent background

2011-08-18 Thread rayworks
On Aug 18, 10:23 am, bob b...@coolgroups.com wrote:
 Is there any way to make a Webview have a transparent background?

 Thanks.

RTM pls.

public void setBackgroundColor (int color)
Set the background color. It's white by default. Pass zero to make the
view transparent.

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


[android-developers] Re: Place a custom view on a relative layout programmatically

2011-08-18 Thread rayworks

         MyCustomView customView = new MyCustomView(this);
         // Settings here the margin : Doesn't works!
         MarginLayoutParams mLayoutParams = new MarginLayoutParams(338,
 338);
         mLayoutParams.setMargins(100, 100, 0, 0);
         customView.setLayoutParams(mLayoutParams);
         mainLayout.addView(customView, 0, mLayoutParams);

Replace with the following codes and you will find the custom view on
the right position:

// for testing only
MyCustomView customView = new MyCustomView(this);
RelativeLayout.LayoutParams layoutParam = new
RelativeLayout.LayoutParams(100, 100);
layoutParam.setMargins(100, 100, 0, 0);
mainLayout.addView(customView, 0, layoutParam);

BTW, for specified width and height of this custom view, you need to
check the View.onMeasure()  method.

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