Hi all I developed xamarin media player by help of this link its working perfectly https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/custom-renderer/video-player/ but I want to know how can I add a fullscreen icon and make it work in Xamarin video player . please Help
You can use a custom renderer refer to this
To make the custom renderer work, I made some modification on the code:
First, replace the video renderer in your Android project with the custom video renderer, then move code in init method into VideoRenderer construcor and delete the init method, change the _context variable to Context and remove static:
Context _context;
double deviceWidth;
double deviceHeight;
then, use _context.GetActivity().RequestedOrientation instead of _context.RequestedOrientation in related method.
At last, icons need to be added to resource/drawable in Android, you can find the icon in the github issue link.
To make it full screen, need to hide extra UIs like:
var uiOpts = SystemUiFlags.LayoutStable
| SystemUiFlags.LayoutFullscreen
| SystemUiFlags.HideNavigation
| SystemUiFlags.LightStatusBar
| SystemUiFlags.Immersive
| SystemUiFlags.LayoutHideNavigation
| SystemUiFlags.Fullscreen;
window.DecorView.SystemUiVisibility = (StatusBarVisibility)uiOpts;
and when exit full screen, clear the flags accordingly, here's a google doc for full screen
Hope it helps.
Related
I would like to modify the design of the chrome and top menu panel of my app where the close and minify icons are.
How do I do this and in what XAML file? Should it be done in App.xaml, or in my main page's xaml file? I can find instructions on how to do this in a WPF app, but the concepts don't seem to carry over to Univeral App XAML.
As far as I know, you can change some settings from the chrome bar in the uwp, but not fully customize it by default.
The starting point for doing so would be the ApplicationView's TitleBar property.
This allows you to change the colors of the buttons and the bar itself:
var titleBar = ApplicationView.GetForCurrentView().TitleBar;
if (titleBar != null)
{
titleBar.ButtonBackgroundColor = Colors.DarkBlue;
titleBar.ButtonForegroundColor = Colors.White;
titleBar.BackgroundColor = Colors.Blue;
titleBar.ForegroundColor = Colors.White;
}
It is worth mentioning that when running the application on a PC, the control is called TitleBar but on a mobile device, it is called StatusBar. Full example for handling both devices can be found here.
If you need more personalization options, creating your own TitleBar component should be possible, look for the ExtendViewIntoTitleBar property of the CoreApplicationViewTitleBar object.
More info can be found here.
You need to use a resource dictionary with the custom styles. You can import these themes via App.Xaml to apply it.
These links might be of help. If you have any specific questions feel free to ask.
ResourceDictionary and XAML resource references
XAML theme resources
I have created FB app in that i need Camera option. of course i want 3 buttons, one to take a picture and 2nd to save and Main thing is 3rd button that is to directly upload images to facebook without saving to specified location im Mobile. I searched a lot but cant get like this.So please help me out. Thanks in Advance
I'm new to Windows 8 development. I want to implement something similar to the following in Microsoft Maps application for Windows 8:
In the maps app, when the user clicks on Directions menu item in the app bar, a side bar appears on the right.
How can I implement such a side bar ?
Unfortunately there's no such control built-in in WinRT. The closest to what your looking for would be SettingsFlyout control from Callisto. It's not ideal for this case, since it was designed to be used as settings flyout. Most notably you'd need to get rid of the back button which opens up the settings charm. You could try overriding the style or taking the control source code and modifying it.
It's really simple to use, though:
var flyout = new SettingsFlyout();
flyout.FlyoutWidth = SettingsFlyout.SettingsFlyoutWidth.Narrow;
flyout.HeaderText = "Flyout";
flyout.Content = new FlyoutControl();
flyout.IsOpen = true;
FlyoutControl would be a custom UserControl you want to display.
I'm now developing an app on iOS. With some reason, I want to use AssistiveTouch UI in my app. For example, there will display a button in my app like AssistiveTouch, if anyone press this button, four buttons will appear like AssistiveTouch, if anyone press one of there four buttons again, some action i set before will excuse.
Does apple support api about this? Or Is there any source code available?
You would have to reimplement this from scratch. There is no public API for either accessing the existing Assistive Touch feature (it has to be turned on by the user in the settings) or for creating a similar UI.
I am new Application Developer with the Titanium. i want to develop new Application with Titanium and created a HelloWorld application. Every time my application starts up Than every time Titanium startscreen is show. how I remove this Titanium Startscreen.
I have also 1 question when i run the application in iPhone than show its title bar with windows.
but, in android have not show.
i use build custom with use if else statement i add the title bar. but, any syntax. whose add the tittle bar in android.
I have also occur this type problem than, i sort out this problem with the help of my friend.
I write below step by step.
go to the resource folder where u create ur application.
select the build folder and open iphone and copy the picture whose u want to show on screen.
and rename with default.png
I, think this is useful to you. Let try it.