My problem is that Left monitor and Right monitor display very different scenes(like phicture)
Now I use VrVideoView for my 360 video player.
<com.google.vr.sdk.widgets.video.VrVideoView
android:id="#+id/video_view"
android:layout_width="match_parent"
android:scrollbars="#null"
android:layout_height="250dip"/>
full code :
enter link description here
I just change file name "congo.mp4"
Use this snippet in your code:
If you are using HLS:
options.inputFormat = Options.FORMAT_HLS;
Otherwise:
options.inputFormat = Options.FORMAT_DEFAULT;
And If you want to use mono video:
options.inputType = Options.TYPE_MONO;
Otherwise:
options.inputType = Options.TYPE_STEREO_OVER_UNDER;
options.inputType = Options.TYPE_MONO;
Related
I capture a image by camera in emulator and it was saved as:
"/storage/emulated/0/Download/IMG_1582623402006.jpg"
I am trying to display this image in < ImageView > as the following:
Bitmap finalBitmap = BitmapFactory.decodeFile("/storage/emulated/0/Download/IMG_1582623402006.jpg");
holder.image.setImageBitmap(scaledBitmap);
but it shows that "finalBitmap" is empty. What have I missed?
Thanks in advance!
You posted this over a year ago, so it may be too old at this point.
It appears that you are using two variables for your bitmaps: finalBitmap and scaledBitmap and not referencing the proper one in the setImageBitmap command.
Instead, have you tried this?
holder.image.setImageBitmap(finalBitmap);
Not totally sure, but adding some attributes in "options" seems make it work in emulator:
final BitmapFactory.Options options = new BitmapFactory.Options();
options.inScaled = true;
options.inSampleSize = 5;
Bitmap scaledBitmap = BitmapFactory.decodeFile(/storage/emulated/0/Download/IMG_1582623402006.jpg, options);
holder.image.setImageBitmap(scaledBitmap);
I have checked around but no able to find any info about this.
Is there any way to set text and image in MDCBottomAppBarView, among setting the high of MDCBottomAppBarView ?
You can set the Image by setImage:
let appBarBottom = MDCBottomAppBarView()
appBarBottom.floatingButton.backgroundColor = UIColor.white // Change this if you have another color icon
appBarBottom.floatingButton.setImage(UIImage(named: "IMAGE NAME"), for: UIControl.State.normal)
I'm trying to use Xamarin Forms plugin SVG.Forms.Plugin.Abstractions to render scalable SVG files rather than create a file for each device size.
On reading the how-to, it states that to create the image in code I should do this:
new SvgImage
{
SvgPath = "pic.svg",
SvgAssembly = typeof (App).GetTypeInfo().Assembly,
HeightRequest = 200,
WidthRequest = 200,
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.End,
BackgroundColor = Color.White
};
However I would rather do this in XAML, and so far have the following
<abstractions:SvgImage Grid.Row="1" Grid.Column="0" SvgAssembly="{Binding SvgAssembly}" SvgPath="{Binding SvgPath}" HeightRequest="250" WidthRequest="250" BackgroundColor="White" HorizontalOptions="Center" VerticalOptions="End"/>
I assume I need to bind SvgPath to a string value in the code behind, but I'm not sure what to bind the SvgAssembly to, I tried a string but it gave an unhandled runtime error.
Does anyone know how to do this?
thanks in advance
You should bind it to an actual assembly.
To simplify, you could just get the assembly from a type that is within the assembly you are looking:
Assembly SvgAssembly = typeof(ClassInAssembly).Assembly;
You should be good to go with this.
If you need to dig a bit deeper, check out my blog post about drawing SVG with SkiaSharp.
I am trying to make a screenshot at the bottom of the long page (e.g. http://www.taoism.net/ttc/complete.htm) like so:
Nightmare({ show: false })
.viewport(1024, 30000)
.goto('http://www.taoism.net/ttc/complete.htm')
.wait()
.screenshot(sImagePath, {
x : 0,
y : 27711,
width : 1024,
height : 133
});
Screenshot file size is 0 bytes.
Tested with different y values, it works until ~8000px.
Tried using .scrollTo, it did not help.
Does anybody know a workaround?
P.S. Nightmarejs wraps around electron browser.
This might be what you've looking for https://github.com/segmentio/nightmare/issues/328#issuecomment-159311982
Basically you dynamically adjust the viewport dimensions based on the content to grab size.
I am using audio tool box and selected the following code to play a 30 second m4a file.
(IBAction)playFullSongButton:(id)sender
{
CFBundleRef mainBundle= CFBundleGetMainBundle();
CFURLRef soundFileUrlRef;
soundFileUrlRef = CFBundleCopyResourceURL(mainBundle,
(CFStringRef)#"fullsong",CFSTR("m4a"),NULL);
UInt32 soundID;
AudioServicesCreateSystemSoundID(soundFileUrlRef, &soundID);
AudioServicesPlaySystemSound(soundID);
}
it works with all my 2 and 3 second files but Im assuming 30 seconds is too long . any suggestions? please bare in mind that I am totally new to this Thanks!