Debug("ConnectPage");
mWifi = wifi;
}
- internal void CreateComponents(AP ap)
- {
- mAp = ap;
-
- var connectView = new RecyclerViewItem()
- {
- Layout = new LinearLayout()
- {
- LinearOrientation = LinearLayout.Orientation.Vertical,
- },
- WidthSpecification = LayoutParamPolicies.MatchParent,
- HeightSpecification = LayoutParamPolicies.WrapContent,
- };
+ internal TextField CreatePasswordField()
+ {
var passwordItem = new DefaultLinearItem()
{
WidthSpecification = LayoutParamPolicies.MatchParent,
hiddenInput.SubstituteCount = 0;
hiddenInput.ShowLastCharacterDuration = 1000;
passwordField.SetHiddenInput(hiddenInput);
-
passwordItem.Add(passwordField);
- var wpsButton = new Button()
+ return passwordField;
+ }
+
+ internal DefaultLinearItem CreateWpsItem()
+ {
+ ImageViewStyle iconStyle = new ImageViewStyle()
+ {
+ Color = new Selector<Color>()
+ {
+ Normal = new Color("#17234D"),
+ Focused = new Color("#17234D"),
+ Pressed = new Color("#FF6200"),
+ Disabled = new Color("#CACACA"),
+ },
+ ResourceUrl = new Selector<String>()
+ {
+ Normal = new String(Tizen.Applications.Application.Current.DirectoryInfo.Resource
+ + "/images/wifi_icon_wps.png"),
+ },
+ };
+
+ var wpsItem = new DefaultLinearItem()
{
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ IsSelectable = true,
+ Icon = new ImageView(iconStyle),
Text = Resources.IDS_WIFI_OPT_WPS,
- WidthSpecification = 100,
- HeightSpecification = 50,
};
- wpsButton.Clicked += OnWpsClicked;
- connectView.Add(passwordField);
- connectView.Add(wpsButton);
+ wpsItem.Icon.HeightSpecification = 20;
+ wpsItem.Clicked += OnWpsClicked;
+ wpsItem.Label.HorizontalAlignment = HorizontalAlignment.Begin;
+ return wpsItem;
+ }
+
+ internal void CreateComponents(AP ap)
+ {
+ mAp = ap;
+
+ var connectView = new RecyclerViewItem()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.WrapContent,
+ };
+
+ connectView.Add(CreatePasswordField());
+ connectView.Add(CreateWpsItem());
var cancelButton = new Button()
{
{
Title = mAp.Essid,
Content = connectView,
- Actions = new View[] { cancelButton, connectButton, wpsButton },
+ Actions = new View[] { cancelButton, connectButton},
};
}