base.OnCreate();
ResourceManager.TextResourceManager = this;
mPeerSource = new PeerSource();
+ mPeerSource.SetScanningState(true);
return CreateComponents();
}
- internal Loading CreateLoadingIcon()
+ internal View CreateLoadingIcon()
{
- var path = Resources.GetPath();
- var imageArray = new string[36];
- for (int i = 0; i < 36; i++)
- {
- if (i < 10)
- {
- imageArray[i] = path + "/loading/loading_0" + i + ".png";
- }
- else
- {
- imageArray[i] = path + "/loading/loading_" + i + ".png";
- }
- }
-
- return new Loading()
+ var lottieAnimationView = new LottieAnimationView()
{
WidthSpecification = 40,
HeightSpecification = 40,
- ImageArray = imageArray,
+ Size = new Size(40, 40),
+ URL = Resources.GetPath() + "/loadingAnimation.json",
+ LoopCount = -1,
};
+
+ lottieAnimationView.SetMinMaxFrame(10, 30);
+ lottieAnimationView.Play();
+ return lottieAnimationView;
}
internal View CreateComponents()
group.Label.SetBinding(TextLabel.TextProperty, "Title");
group.Label.HorizontalAlignment = HorizontalAlignment.Begin;
- //var icon = CreateLoadingIcon();
- //icon.SetBinding(View.OpacityProperty, "IconOpacity");
- //group.Icon = icon;
+ var icon = CreateLoadingIcon();
+ icon.SetBinding(View.OpacityProperty, "IconOpacity");
+ group.Icon = icon;
return group;
}),
IsGrouped = true,
private void OnWFDStateChanged(Object sender, WFDStateChangedEventArgs e)
{
- Debug("+");
- UpdateDeviceList();
+ Debug("State: " + e.State);
+ switch (e.State)
+ {
+ case WFDState.Discovering:
+ mPeerSource.SetScanningState(true);
+ break;
+ case WFDState.Activated:
+ UpdateDeviceList();
+ mPeerSource.SetScanningState(false);
+ break;
+ //TODO: update for further states.
+ }
}
private Selector<Color> GetDefaultColorSelector()
--- /dev/null
+{"v":"5.9.0","fr":30,"ip":0,"op":30,"w":200,"h":200,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"LT_small Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[0],"e":[-359]},{"t":30}],"ix":10},"p":{"a":0,"k":[100,100,0],"ix":2,"l":2},"a":{"a":0,"k":[100,100,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-14.536,-0.952],[-11.556,-8.867],[-4.682,-13.794],[3.77,-14.07]],"o":[[12.615,-7.283],[14.535,0.953],[11.557,8.868],[4.682,13.793],[0,0]],"v":[[-55.868,-36.091],[-14.226,-45.801],[25.793,-30.739],[50.699,4.018],[52.098,46.753]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.384313755409,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":16,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[119.043,72.309],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":30,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"LT_big Outlines","sr":1,"ks":{"o":{"a":0,"k":10,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[0],"e":[359]},{"t":30}],"ix":10},"p":{"a":0,"k":[100,100,0],"ix":2,"l":2},"a":{"a":0,"k":[100,100,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[12.112,8.092],[5.574,13.457],[-2.842,14.287],[-10.3,10.3],[-14.287,2.842],[-13.457,-5.574],[-8.093,-12.112],[0,-14.566]],"o":[[-14.567,0],[-12.111,-8.093],[-5.575,-13.458],[2.841,-14.287],[10.3,-10.3],[14.286,-2.842],[13.458,5.574],[8.093,12.111],[0,0]],"v":[[0.714,74.363],[-40.204,61.951],[-67.329,28.898],[-71.521,-13.655],[-51.365,-51.365],[-13.655,-71.521],[28.898,-67.33],[61.951,-40.204],[74.363,0.713]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.384313755409,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":16,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[99.286,99.287],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":30,"st":0,"bm":0}],"markers":[]}
\ No newline at end of file