public MainPageCS() { var scroller = new CircleScrollView { Content = new StackLayout { Spacing = 20, Padding = new Thickness(0, 30), Children = { new Image { Source = "Tizen.NET_round.png" }, new Image { Source = "CircularUI_round.png" }, new Image { Source = "TVUI_round.png" } } } }; RotaryFocusObject = scroller; Content = scroller; }
/// <summary> /// Create a new ListView /// This ScrollView shows download information list. /// </summary> /// <returns>ListView</returns> private CircleScrollView CreateScrollView() { CircleScrollView listView = new CircleScrollView() { HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, }; return(listView); }
public ProfileEditPage(PageParameters pageParameters) { var profileEditView = new StackLayout { Children = { new Label { Text = "Hi" } } }; var profileEditViewScroll = new CircleScrollView { Content = profileEditView }; Content = profileEditViewScroll; }
public ProfileEditPage(PageParameters pageParameters) { var profileEditView = new StackLayout { HorizontalOptions = LayoutOptions.CenterAndExpand, VerticalOptions = LayoutOptions.CenterAndExpand, Children = { new Label { HorizontalTextAlignment = TextAlignment.Center, Text = "v4 ok - v5.5 NOT ok" } } }; var profileEditViewScroll = new CircleScrollView { Content = profileEditView }; Content = profileEditViewScroll; }
/// <summary> /// Initialize components of page. /// </summary> private void InitializeComponent() { headerLabel = CreateHeaderLabel(); downloadInfoScrollView = CreateScrollView(); headerLabel.SetValue(Grid.RowProperty, 0); downloadInfoScrollView.SetValue(Grid.RowProperty, 1); Content = new Grid() { RowDefinitions = { new RowDefinition() { Height = new GridLength(100, GridUnitType.Absolute) }, new RowDefinition() { Height = new GridLength(1, GridUnitType.Star) }, new RowDefinition() { Height = new GridLength(50, GridUnitType.Absolute) }, }, Children = { headerLabel, downloadInfoScrollView }, HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, }; RotaryFocusObject = downloadInfoScrollView; AddEvent(); }
public NetworkPage() { // Create components // Create Label Label title = CreateTitle(); // Add Button for getting Cell ID var cellBtn = new Button { Text = "Get cell ID", VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events cellBtn.Clicked += CellBtn_Clicked; // Add Button for getting LAC var lacBtn = new Button { Text = "Get LAC", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events lacBtn.Clicked += LacBtn_Clicked; // Add Button for getting MCC var mccBtn = new Button { Text = "Get MCC", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events mccBtn.Clicked += MccBtn_Clicked; // Add Button for getting MNC var mncBtn = new Button { Text = "Get MNC", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events mncBtn.Clicked += MncBtn_Clicked; // Add Button for getting Network Name var nwNameBtn = new Button { Text = "Get network name", VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events nwNameBtn.Clicked += NwNameBtn_Clicked; // Add Button for getting Network Name Option var nwNameOptionBtn = new Button { Text = "Get network name option", FontSize = 9, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events nwNameOptionBtn.Clicked += NwNameOptionBtn_Clicked; // Add Button for getting roaming status var roamingStatusBtn = new Button { Text = "Get roaming status", VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events roamingStatusBtn.Clicked += RoamingStatusBtn_Clicked; // Add Button for getting RSSI var rssiBtn = new Button { Text = "Get RSSI", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events rssiBtn.Clicked += RssiBtn_Clicked; // Add Button for getting Service State var serviceStateBtn = new Button { Text = "Get service state", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events serviceStateBtn.Clicked += ServiceStateBtn_Clicked; // Add Button for getting Network Type var typeBtn = new Button { Text = "Get network type", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events typeBtn.Clicked += TypeBtn_Clicked; // Add Button for getting Packet Service Type var psTypeBtn = new Button { Text = "Get PS type", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events psTypeBtn.Clicked += PsTypeBtn_Clicked; // Add Button for getting default data subscription type var dataSubsBtn = new Button { Text = "Get default data subscription", FontSize = 8, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events dataSubsBtn.Clicked += DataSubsBtn_Clicked; // Add Button for getting default subscription type var defaultSubsBtn = new Button { Text = "Get default subscription", FontSize = 10, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events defaultSubsBtn.Clicked += DefaultSubsBtn_Clicked; // Add Button for getting Network Selection Mode var selectionModeBtn = new Button { Text = "Get selection mode", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events selectionModeBtn.Clicked += SelectionModeBtn_Clicked; // Add Button for getting TAC var tacBtn = new Button { Text = "Get TAC", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events tacBtn.Clicked += TacBtn_Clicked; // Add Button for getting System ID var systemIdBtn = new Button { Text = "Get system ID", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events systemIdBtn.Clicked += SystemIdBtn_Clicked; // Add Button for getting Network ID var nwIdBtn = new Button { Text = "Get network ID", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events nwIdBtn.Clicked += NwIdBtn_Clicked; // Add Button for getting base station ID var baseStationIdBtn = new Button { Text = "Get base station ID", FontSize = 10, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events baseStationIdBtn.Clicked += BaseStationIdBtn_Clicked; // Add Button for getting base station Longitude var baseStationLongitudeBtn = new Button { Text = "Get base station longitude", FontSize = 9, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events baseStationLongitudeBtn.Clicked += BaseStationLongitudeBtn_Clicked; // Add Button for getting base station Latitude var baseStationLatitudeBtn = new Button { Text = "Get base station latitude", FontSize = 9, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events baseStationLatitudeBtn.Clicked += BaseStationLatitudeBtn_Clicked; // Create Label // Set attribute for result label result = new Label() { BackgroundColor = Color.White, FontSize = 10, HorizontalTextAlignment = TextAlignment.Center, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand, }; result.Text = "Start Network API test"; // Create Label // Set attribute for start_temp label Label start_temp = new Label() { Text = "...", FontSize = 13, TextColor = Color.Black, HorizontalTextAlignment = TextAlignment.Center, VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.Center, }; // Create Label // Set attribute for temp label Label temp = new Label() { Text = "...", TextColor = Color.Black, FontSize = 10, LineHeight = 3, HorizontalTextAlignment = TextAlignment.Center, VerticalOptions = LayoutOptions.End, HorizontalOptions = LayoutOptions.Center, }; // Put the StackLayout in a ScrollView. CircleScrollView sv = new CircleScrollView { Orientation = ScrollOrientation.Vertical, // Add all controls on layout for displaying on screen Content = new StackLayout { Children = { start_temp, title, cellBtn, lacBtn, mccBtn, mncBtn, nwNameBtn, nwNameOptionBtn, roamingStatusBtn, rssiBtn, serviceStateBtn, typeBtn, psTypeBtn, dataSubsBtn, defaultSubsBtn, selectionModeBtn, tacBtn, systemIdBtn, nwIdBtn, baseStationIdBtn, baseStationLatitudeBtn, baseStationLongitudeBtn, result, temp, } } }; Content = sv; RotaryFocusObject = sv; try { // If not set slotHandle, can't get any info from Telephony API. // Should be initialized before executing the menu on NetworkPage. if (Globals.slotHandle == null) { Log.Debug(Globals.LogTag, "Telephony is not initialized/there are no SIM slot handles"); return; } Globals.slotHandle.ChangeNotification += SlotHandle_ChangeNotification; List <ChangeNotificationEventArgs.Notification> notiList = new List <ChangeNotificationEventArgs.Notification>(); foreach (ChangeNotificationEventArgs.Notification noti in notiArr) { notiList.Add(noti); } Globals.slotHandle.SetNotificationId(notiList); // For getting and using Network information, // instance of Network Class should be needed. _network = new Network(Globals.slotHandle); } catch (Exception ex) { Log.Debug(Globals.LogTag, "Exception in network constructor: " + ex.ToString()); } }
public SimPage() { // Create components // Create Label Label title = CreateTitle(); // Add Button for getting SIM status var changedBtn = new Button { Text = "Is SIM changed", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events changedBtn.Clicked += ChangedBtn_Clicked; // Add Button for getting Operator information on SIM var operatorBtn = new Button { Text = "Get operator", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events operatorBtn.Clicked += OperatorBtn_Clicked; // Add Button for getting ICCID var iccIdBtn = new Button { Text = "Get ICCID", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events iccIdBtn.Clicked += IccIdBtn_Clicked; // Add Button for getting MSIN var msinBtn = new Button { Text = "Get MSIN", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events msinBtn.Clicked += MsinBtn_Clicked; // Add Button for getting SPN var spnBtn = new Button { Text = "Get SPN", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events spnBtn.Clicked += SpnBtn_Clicked; // Add Button for getting SIM State var stateBtn = new Button { Text = "Get SIM state", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events stateBtn.Clicked += StateBtn_Clicked; // Add Button for getting application list offered by SIM var appListBtn = new Button { Text = "Get SIM application list", FontSize = 9, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events appListBtn.Clicked += AppListBtn_Clicked; // Add Button for getting subscriber number var subscriberBtn = new Button { Text = "Get subscriber number", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events subscriberBtn.Clicked += SubscriberBtn_Clicked; // Add Button for getting subscriber ID var subscriberIdBtn = new Button { Text = "Get subscriber ID", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events subscriberIdBtn.Clicked += SubscriberIdBtn_Clicked; // Add Button for getting SIM Lock State var lockStateBtn = new Button { Text = "Get lock state", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events lockStateBtn.Clicked += LockStateBtn_Clicked; // Add Button for getting group ID var groupIdBtn = new Button { Text = "Get group ID1", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events groupIdBtn.Clicked += GroupIdBtn_Clicked; // Add Button for getting call forwarding indicator state var cfIndiStateBtn = new Button { Text = "Get call forwarding indicator state", FontSize = 8, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events cfIndiStateBtn.Clicked += CfIndiStateBtn_Clicked; // Create Label // Set attribute for result label result = new Label() { BackgroundColor = Color.White, FontSize = 10, HorizontalTextAlignment = TextAlignment.Center, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand, }; result.Text = "Start SIM API test"; // Create Label // Set attribute for start_temp label Label start_temp = new Label() { Text = "...", FontSize = 13, TextColor = Color.Black, HorizontalTextAlignment = TextAlignment.Center, VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.Center, }; // Create Label // Set attribute for temp label Label temp = new Label() { Text = "...", TextColor = Color.Black, FontSize = 10, LineHeight = 3, HorizontalTextAlignment = TextAlignment.Center, VerticalOptions = LayoutOptions.End, HorizontalOptions = LayoutOptions.Center, }; // Put the StackLayout in a ScrollView. CircleScrollView sv = new CircleScrollView { Orientation = ScrollOrientation.Vertical, // Add all controls on layout for displaying on screen Content = new StackLayout { Children = { start_temp, title, changedBtn, operatorBtn, iccIdBtn, msinBtn, spnBtn, stateBtn, appListBtn, subscriberBtn, subscriberIdBtn, lockStateBtn, groupIdBtn, cfIndiStateBtn, result, temp, } } }; Content = sv; RotaryFocusObject = sv; try { // If not set slotHandle, can't get any info from Telephony API. // Should be initialized before executing the menu on SIMPage. if (Globals.slotHandle == null) { Log.Debug(Globals.LogTag, "Telephony is not initialized/there are no SIM slot handles"); return; } Globals.slotHandle.ChangeNotification += SlotHandle_ChangeNotification; List <ChangeNotificationEventArgs.Notification> notiList = new List <ChangeNotificationEventArgs.Notification>(); foreach (ChangeNotificationEventArgs.Notification noti in notiArr) { notiList.Add(noti); } Globals.slotHandle.SetNotificationId(notiList); // For getting and using SIM information, // instance of SIM Class should be needed. _sim = new Sim(Globals.slotHandle); } catch (Exception ex) { Log.Debug(Globals.LogTag, "Exception in SIM constructor: " + ex.ToString()); } }
/// <summary> /// Constructor /// </summary> public FirstPage() { // Make this page have no navigation bar NavigationPage.SetHasNavigationBar(this, false); // create UI controls var myLabel = new Label { HorizontalTextAlignment = TextAlignment.Center }; var myEntry = new Entry { HorizontalTextAlignment = TextAlignment.Center, }; var myButton = new Button(); var myPicker = new Picker(); myPicker.Items.Add("0"); myPicker.Items.Add("1"); myPicker.Items.Add("2"); myPicker.Items.Add("3"); myPicker.Items.Add("4"); // apply translated resources myLabel.Text = AppResources.NotesLabel; myEntry.Placeholder = AppResources.NotesPlaceholder; myPicker.Title = AppResources.PickerName; myButton.Text = AppResources.AddButton; var flag = new Image(); switch (Device.RuntimePlatform) { case Device.UWP: flag.Source = ImageSource.FromFile("Assets/Images/flag.png"); break; case Device.iOS: case Device.Android: case Device.Tizen: default: flag.Source = ImageSource.FromFile("flag.png"); break; } // When myButton is pressed, // alert message is displayed. // This message will be localized according to the current system language. myButton.Clicked += async(sender, e) => { var message = AppResources.AddMessageN; // According to the selected index of picker, message will be selected. if (myPicker.SelectedIndex <= 0) { message = AppResources.AddMessage0; } else if (myPicker.SelectedIndex == 1) { message = AppResources.AddMessage1; } else { message = String.Format(message, myPicker.Items[myPicker.SelectedIndex]); } // Display an alert dialog await DisplayAlert(message, message, AppResources.CancelButton); }; // add to screen CircleScrollView myScrollView = new CircleScrollView() { Content = new StackLayout { VerticalOptions = LayoutOptions.CenterAndExpand, HorizontalOptions = LayoutOptions.Center, Children = { myLabel, myEntry, myPicker, myButton, flag }, } }; // Now, can scroll the view using rotating the bezel RotaryFocusObject = myScrollView; Content = myScrollView; if (Device.RuntimePlatform == Device.Tizen) { MessagingCenter.Subscribe <App>(this, "UpdateUIByLanguageChanges", (obj) => { // apply translated resources myLabel.Text = AppResources.NotesLabel; myEntry.Placeholder = AppResources.NotesPlaceholder; myPicker.Title = AppResources.PickerName; myButton.Text = AppResources.AddButton; }); } }
public MenuPage() { // Set title message Title = "SampleTelephony"; IsVisible = true; // Create components // Create Label Label title = CreateTitle(); /// <summary> /// The Button for initializing Telephony C# API library and getting the SlotHandle /// It should be called at first before running any functions /// </summary> var initBtn = new Button { Text = "Initialize", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.Fill, }; // Add Clicked events initBtn.Clicked += InitBtn_Clicked; /// <summary> /// The Button for executing call functionality of Tizen.Telephony C# API /// </summary> var callBtn = new Button { Text = "Call", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.Fill, }; // Add Clicked events callBtn.Clicked += CallBtn_Clicked; /// <summary> /// The Button for executing Modem functionality of Tizen.Telephony C# API /// </summary> var ModemBtn = new Button { Text = "Modem", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.Fill }; // Add Clicked events ModemBtn.Clicked += ModemBtn_Clicked; /// <summary> /// The Button for executing Network functionality of Tizen.Telephony C# API /// </summary> var NetworkBtn = new Button { Text = "Network", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.Fill }; // Add Clicked events NetworkBtn.Clicked += NetworkBtn_Clicked; /// <summary> /// The Button for executing SIM functionality of Tizen.Telephony C# API /// </summary> var simBtn = new Button { Text = "SIM", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.Fill }; // Add Clicked events simBtn.Clicked += SimBtn_Clicked; /// <summary> /// The Button for de-initializing Telephony C# API library and freeing the SlotHandle /// It should be called before exiting sample Telephony Application /// </summary> var deinitBtn = new Button { Text = "De-initialize", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.Fill }; // Add Clicked events deinitBtn.Clicked += DeinitBtn_Clicked; // Create Label // Set attribute for result label result = new Label() { BackgroundColor = Color.White, FontSize = 10, HorizontalTextAlignment = TextAlignment.Center, VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.Fill, }; result.Text = "Start Sample Telephony Application"; // Create Label // Set attribute for temp label Label temp = new Label() { Text = "...", TextColor = Color.Black, FontSize = 10, LineHeight = 3, HorizontalTextAlignment = TextAlignment.Center, VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.Fill, }; // Put the StackLayout in a ScrollView. CircleScrollView sv = new CircleScrollView { Orientation = ScrollOrientation.Vertical, Content = new StackLayout { Children = { title, initBtn, callBtn, ModemBtn, NetworkBtn, simBtn, deinitBtn, result, temp } } }; Content = sv; RotaryFocusObject = sv; try { // For getting the Telephony State changed status, // should be set Manager State Changed callback. Manager.StateChanged += Manager_StateChanged; } catch (Exception ex) { Log.Debug(Globals.LogTag, "Exception in registering for state changed event: " + ex.ToString()); } }
private async Task GoToContentPage() { var actionButton = new Button { BackgroundColor = Color.Orange }; //AbsoluteLayout.SetLayoutBounds(actionButton, new Rectangle(0, 150, 150, 100)); actionButton.On <Xamarin.Forms.PlatformConfiguration.Tizen>().SetStyle(ButtonStyle.Bottom); actionButton.Clicked += async(sender, args) => { // ignore this bad code await Device.InvokeOnMainThreadAsync(async() => { await ButtonWorker(); }).ConfigureAwait(false); }; var profileEditView = new CircleStackLayout { Padding = new Thickness(0, 25, 0, 70), HorizontalOptions = LayoutOptions.Center, Children = { new Label { FontSize = 8, HorizontalTextAlignment = TextAlignment.Center, BackgroundColor = Color.Black, Text = "Content Page", }, new StackLayout { VerticalOptions = LayoutOptions.Center, Orientation = StackOrientation.Horizontal, Children = { new Label { VerticalOptions = LayoutOptions.Center, FontSize = 12, Text = "🗺:" }, new PopupEntry { Text = "abc" } } }, new StackLayout { VerticalOptions = LayoutOptions.Center, Orientation = StackOrientation.Horizontal, Children = { new Label { VerticalOptions = LayoutOptions.Center, FontSize = 12, Text = "🗺:" }, new PopupEntry { Text = "abc" } } }, new StackLayout { VerticalOptions = LayoutOptions.Center, Orientation = StackOrientation.Horizontal, Children = { new Label { VerticalOptions = LayoutOptions.Center, FontSize = 12, Text = "🗺:" }, new PopupEntry { Text = "abc" } } }, new StackLayout { VerticalOptions = LayoutOptions.Center, Orientation = StackOrientation.Horizontal, Children = { new Label { VerticalOptions = LayoutOptions.Center, FontSize = 12, Text = "🗺:" }, new PopupEntry { Text = "abc" } } } } }; var profileEditScrollView = new CircleScrollView { Content = profileEditView }; var stackLayout = new StackLayout { Children = { profileEditScrollView, actionButton } }; MainPage = new ContentPage { Content = stackLayout }; async Task ButtonWorker() => await GoToCirclePage().ConfigureAwait(false); actionButton.Text = "To CirclePage"; }
private async Task GoToCirclePage() { var circlePage = new CirclePage { ActionButton = new ActionButtonItem() }; circlePage.ActionButton.Clicked += async(sender, args) => { // ignore this bad code await Device.InvokeOnMainThreadAsync(async() => { await ButtonWorker(); }).ConfigureAwait(false); }; var profileEditView = new CircleStackLayout { Padding = new Thickness(0, 25, 0, 70), HorizontalOptions = LayoutOptions.Center, Children = { new Label { FontSize = 8, HorizontalTextAlignment = TextAlignment.Center, BackgroundColor = Color.Black, Text = "CirclePage", }, new StackLayout { VerticalOptions = LayoutOptions.Center, Orientation = StackOrientation.Horizontal, Children = { new Label { VerticalOptions = LayoutOptions.Center, FontSize = 12, Text = "🗺:" }, new PopupEntry { Text = "abc" } } }, new StackLayout { VerticalOptions = LayoutOptions.Center, Orientation = StackOrientation.Horizontal, Children = { new Label { VerticalOptions = LayoutOptions.Center, FontSize = 12, Text = "🗺:" }, new PopupEntry { Text = "abc" } } }, new StackLayout { VerticalOptions = LayoutOptions.Center, Orientation = StackOrientation.Horizontal, Children = { new Label { VerticalOptions = LayoutOptions.Center, FontSize = 12, Text = "🗺:" }, new PopupEntry { Text = "abc" } } }, new StackLayout { VerticalOptions = LayoutOptions.Center, Orientation = StackOrientation.Horizontal, Children = { new Label { VerticalOptions = LayoutOptions.Center, FontSize = 12, Text = "🗺:" }, new PopupEntry { Text = "abc" } } } } }; var profileEditScrollView = new CircleScrollView { Content = profileEditView }; circlePage.Content = profileEditScrollView; MainPage = circlePage; async Task ButtonWorker() => await GoToContentPage().ConfigureAwait(false); circlePage.ActionButton.Text = "To ContentPage"; }
public ModemPage() { // Create components // Create Label Label title = CreateTitle(); // Add button in screen for getting IMEI var imeiBtn = new Button { Text = "Get IMEI", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events imeiBtn.Clicked += ImeiBtn_Clicked; // Add button in screen for getting power status var powerBtn = new Button { Text = "Get power status", VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events powerBtn.Clicked += PowerBtn_Clicked; // Add button in screen for getting MEID var meidBtn = new Button { Text = "Get MEID", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; // Add Clicked events meidBtn.Clicked += MeidBtn_Clicked; // Create Label // Set attribute for result label result = new Label() { BackgroundColor = Color.White, FontSize = 10, HorizontalTextAlignment = TextAlignment.Center, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand, }; result.Text = "Start Modem API test"; // Create Label // Set attribute for start_temp label Label start_temp = new Label() { Text = "...", FontSize = 13, TextColor = Color.Black, HorizontalTextAlignment = TextAlignment.Center, VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.Center, }; // Create Label // Set attribute for temp label Label temp = new Label() { Text = "...", TextColor = Color.Black, FontSize = 10, LineHeight = 3, HorizontalTextAlignment = TextAlignment.Center, VerticalOptions = LayoutOptions.End, HorizontalOptions = LayoutOptions.Center, }; // Put the StackLayout in a ScrollView. CircleScrollView sv = new CircleScrollView { Orientation = ScrollOrientation.Vertical, // Add all controls on layout for displaying on screen Content = new StackLayout { Children = { start_temp, title, imeiBtn, powerBtn, meidBtn, result, temp } } }; Content = sv; RotaryFocusObject = sv; try { // If not set slotHandle, can't get any info from Telephony API. // Should be initialized before executing the menu on ModemPage. if (Globals.slotHandle == null) { Log.Debug(Globals.LogTag, "Telephony is not initialized/there are no SIM slot handles"); return; } // For getting and using modem information, // instance of Modem Class should be needed. _modem = new Modem(Globals.slotHandle); } catch (Exception ex) { Log.Debug(Globals.LogTag, "Exception in modem constructor: " + ex.ToString()); } }
public CallPage() { // Create components // Create Label Label title = CreateTitle(); // Add Button for getting preferred voice subscription var subsBtn = new Button { Text = "Get preferred voice subscription", FontSize = 8, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.Fill, }; // Add Clicked events subsBtn.Clicked += SubsBtn_Clicked; // Add Button for getting current call list var callListBtn = new Button { Text = "Get call list", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.Fill }; // Add Clicked events callListBtn.Clicked += CallListBtn_Clicked; // Create Label // Set attribute for result label result = new Label() { BackgroundColor = Color.White, FontSize = 10, HorizontalTextAlignment = TextAlignment.Center, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand, }; result.Text = "Start Call API test"; // Create Label // Set attribute for start_temp label Label start_temp = new Label() { Text = "...", TextColor = Color.Black, FontSize = 10, HorizontalTextAlignment = TextAlignment.Center, VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.Center, }; // Create Label // Set attribute for temp label Label temp = new Label() { Text = "...", TextColor = Color.Black, FontSize = 10, LineHeight = 3, HorizontalTextAlignment = TextAlignment.Center, VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.Center, }; // Put the StackLayout in a ScrollView. CircleScrollView sv = new CircleScrollView { Orientation = ScrollOrientation.Vertical, // Add all controls on layout for displaying on screen Content = new StackLayout { Children = { start_temp, title, subsBtn, callListBtn, result, temp } } }; Content = sv; RotaryFocusObject = sv; try { // If not set slotHandle, can't get any info from Telephony API. // Should be initialized before executing the menu on CallPage. if (Globals.slotHandle == null) { Log.Debug(Globals.LogTag, "Telephony is not initialized/there are no SIM slot handles"); return; } Globals.slotHandle.ChangeNotification += SlotHandle_ChangeNotification; List <ChangeNotificationEventArgs.Notification> notiList = new List <ChangeNotificationEventArgs.Notification>(); foreach (ChangeNotificationEventArgs.Notification noti in notiArr) { notiList.Add(noti); } Globals.slotHandle.SetNotificationId(notiList); // For getting and using call information, // instance of Call Class should be needed. _call = new Call(Globals.slotHandle); } catch (Exception ex) { Log.Debug(Globals.LogTag, "Exception in call constructor: " + ex.ToString()); } }