using System;
using System.ComponentModel;
using System.Diagnostics;
-using System.Collections.Generic; // for Dictionary
+using System.Collections.Generic;
using Tizen.NUI;
using Tizen.NUI.BaseComponents;
using Tizen.NUI.Components;
Bundle bundle = Bundle.Decode(contentInfo);
navigator = window.GetDefaultNavigator();
this.window = window;
+ window.SetTransparency(true);
+ window.BackgroundColor = Color.Transparent;
viewManager = new ViewManager();
viewManager.ApplicationClosed += (object sender, System.EventArgs e) =>
{
};
//Add Widget for next pages
navigator.Push(viewManager.GetContentPage());
- navigator.BackgroundColor = Color.Transparent;
+ //navigator.BackgroundColor = Color.Transparent;
window.Resized += OnWindowResized;
}
private void OnWindowResized(object sender, Window.ResizedEventArgs e)
{
+ Tizen.Log.Info("Testing", "Resizing");
viewManager.UpdateView();
}
CloseAccount();
};
appBar.NavigationContent = navigationContent;
+ RelativeLayout.SetLeftTarget(appBar.NavigationContent, appBar);
+ RelativeLayout.SetLeftRelativeOffset(appBar.NavigationContent, 0.0f);
+ RelativeLayout.SetVerticalAlignment(appBar.NavigationContent, RelativeLayout.Alignment.Center);
+ appBarStyle.Dispose();
Button actionContent = new Button()
{
Size2D = new Size2D(100, 48).SpToPx(),
Text = "Add",
PointSize = 15.0f,
- CellHorizontalAlignment = HorizontalAlignmentType.Right,
};
actionContent.Clicked += (object sender, ClickedEventArgs e) =>
{
CloseAccount();
};
appBar.ActionContent = actionContent;
+ RelativeLayout.SetRightTarget(appBar.ActionContent, appBar);
+ RelativeLayout.SetRightRelativeOffset(appBar.ActionContent, 1.0f);
+ RelativeLayout.SetLeftTarget(appBar.ActionContent, appBar.TitleContent);
+ RelativeLayout.SetLeftRelativeOffset(appBar.ActionContent, 1.0f);
+ RelativeLayout.SetVerticalAlignment(appBar.ActionContent, RelativeLayout.Alignment.Center);
TextLabel titleContent = new TextLabel("Accounts")
{
//FontStyle = Resources.FontStyleAllNormal,
};
appBar.TitleContent = titleContent;
+ RelativeLayout.SetLeftTarget(appBar.TitleContent, appBar.NavigationContent);
+ RelativeLayout.SetLeftRelativeOffset(appBar.TitleContent, 1.0f);
+ RelativeLayout.SetVerticalAlignment(appBar.TitleContent, RelativeLayout.Alignment.Center);
}
private void CloseAccount()
Tizen.Log.Info("TESTAPP", "UpdateVIew");
contentPage.Size2D = new Size2D(Window.Instance.Size.Width, Window.Instance.Size.Height);
+ appBar.TitleContent.WidthSpecification = Window.Instance.Size.Width - 175.SpToPx();
}
}
}
\ No newline at end of file
private static readonly string CloseIcon = ResourcePath + "/images/close.png";
private static readonly string LeftCornerIcon = ResourcePath + "/images/leftCorner.png";
- private int width = 540;//500
+ private int width = 540;
private bool hide = false;
private View borderView;
//private TextLabel title;
public override void CreateBorderView(View borderView)
{
this.borderView = borderView;
- borderView.CornerRadius = new Vector4(0.3f, 0.3f, 0.3f, 0.3f); // Vector4(0.03f, 0.03f, 0.03f, 0.03f)
+ borderView.CornerRadius = new Vector4(0.3f, 0.3f, 0.3f, 0.3f);
borderView.CornerRadiusPolicy = VisualTransformPolicyType.Relative;
borderView.BackgroundColor = new Color(0, 0, 0, 0.16f); //Color(0, 0, 0, 0.35f)
}
BorderWindow.Maximize(false);
}
preWinPositonSize = BorderWindow.WindowPositionSize;
- BorderWindow.WindowPositionSize = new Rectangle(preWinPositonSize.X, preWinPositonSize.Y, 540, 0); //500,0
+ BorderWindow.WindowPositionSize = new Rectangle(preWinPositonSize.X, preWinPositonSize.Y, 540, 0);
}
return true;
}
using Tizen.NUI;
using Tizen.NUI.Components;
using Tizen.System;
+using Tizen.NUI.BaseComponents;
namespace SettingView
{
public class Program : NUIApplication
{
private WidgetView widgetView;
+
public Program(string styleSheet, Size2D windowSize, Position2D windowPosition, IBorderInterface borderInterface)
: base(styleSheet, windowSize, windowPosition, borderInterface)
- {
+ {
}
protected override void OnCreate()
bundle.AddItem("COUNT", "1");
string encodedBundle = bundle.Encode();
- //widgetView = WidgetViewManager.Instance.AddWidget("Account@org.tizen.cssetting-Account", encodedBundle, window.Size.Width, window.Size.Height, 0.0f);
- widgetView = WidgetViewManager.Instance.AddWidget("account@org.tizen.cssetting-account", encodedBundle, window.Size.Width, window.Size.Height, 0.0f);
+ widgetView = WidgetViewManager.Instance.AddWidget("account@org.tizen.cssetting-account", encodedBundle, window.Size.Width, window.Size.Height, 0.0f); //(540,960)
+ widgetView.WidthSpecification = LayoutParamPolicies.MatchParent;
+ widgetView.HeightSpecification = LayoutParamPolicies.MatchParent;
widgetView.Position = new Position(0, 0); // Position of the application window(Account)
widgetView.WidgetContentUpdated += OnWidgetContentUpdated;
window.GetDefaultLayer().Add(widgetView);
Position2D pos = isPortrait ? new Position2D(60, 640) : new Position2D(480, 170);
Tizen.Log.Info("TESTAPP", "pos: " + pos.X + " " + pos.Y);
var app = new Program("", new Size2D(960, 540), pos, appCustomBorder);
-
app.Run(args);
}
}