v24.1.41
|
@ -0,0 +1,44 @@
|
|||
**Bug description**
|
||||
* Clearly and concisely describe the problem or feature (this cannot be empty).
|
||||
|
||||
**Root cause**
|
||||
* Briefly describe the root cause and analysis of the problem.
|
||||
* If there is an internal discussion on the forum, provide the link.
|
||||
|
||||
**Reason for not identifying earlier**
|
||||
* Explain how it was missed in our earlier testing and development. This will help prevent similar mistakes in the future.
|
||||
|
||||
***Guidelines/documents are not followed***
|
||||
|
||||
* Common guidelines / Core team guideline
|
||||
* Specification document
|
||||
* Requirement document
|
||||
|
||||
***Guidelines/documents are not given***
|
||||
|
||||
* Common guidelines / Core team guideline
|
||||
* Specification document
|
||||
* Requirement document
|
||||
|
||||
***Reason:***
|
||||
|
||||
Mention any one or more reasons from the above points.
|
||||
|
||||
***Action taken:***
|
||||
|
||||
What action did you take to avoid this in future?
|
||||
|
||||
***Related areas:***
|
||||
|
||||
Is there any other related areas also to be addressed?
|
||||
|
||||
**Solution description**
|
||||
* Describe your code changes in detail for reviewers.
|
||||
|
||||
**Areas affected and ensured**
|
||||
* List the areas affected by your code changes.
|
||||
|
||||
**Additional checklist**
|
||||
[ ] Doesn’t have memory leak.
|
||||
[ ] Have you ensured the changes in Android API 19 and iOS 9?
|
||||
[ ] Ensured in iOS, Android, UWP and macOS (if supported).
|
|
@ -0,0 +1,20 @@
|
|||
**Feature description**
|
||||
* Clearly and concisely describe the problem or feature (this cannot be empty).
|
||||
|
||||
**Analysis and design**
|
||||
* If there is an external design, link to its project documentation area.
|
||||
* If there is an internal discussion on the forum, provide the link.
|
||||
|
||||
**Solution description**
|
||||
* Describe your code changes in detail for reviewers.
|
||||
|
||||
**Areas affected and ensured**
|
||||
* List the areas are affected by your code changes.
|
||||
|
||||
**Additional checklist**
|
||||
* [ ] Does it follow the design [guidelines](https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/)? It is mandatory that, we should not move the changes without reading this.
|
||||
* [ ] Properly working in Xamarin.Forms [previewer](https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-previewer?tabs=vswin).
|
||||
* [ ] Ensured in iOS, Android, UWP and macOS (if supported).
|
||||
* [ ] Doesn’t have memory leak. Please check the list of items to be ensured [here](https://syncfusion.atlassian.net/wiki/spaces/XAMRIN/pages/880875734/Memory+Leak).
|
||||
* [ ] Have you added [Preserve](https://syncfusion.atlassian.net/wiki/spaces/XAMRIN/pages/192124218/Guidelines+for+adding+Preserve+attribute) attribute if needed?
|
||||
* [ ] Have you ensured the changes in Android API 19 and iOS 9?
|
|
@ -0,0 +1,19 @@
|
|||
Any raw assets you want to be deployed with your application can be placed in
|
||||
this directory (and child directories) and given a Build Action of "AndroidAsset".
|
||||
|
||||
These files will be deployed with your package and will be accessible using Android's
|
||||
AssetManager, like this:
|
||||
|
||||
public class ReadAsset : Activity
|
||||
{
|
||||
protected override void OnCreate (Bundle bundle)
|
||||
{
|
||||
base.OnCreate (bundle);
|
||||
|
||||
InputStream input = Assets.Open ("my_asset.txt");
|
||||
}
|
||||
}
|
||||
|
||||
Additionally, some Android functions will automatically load asset files:
|
||||
|
||||
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
|
После Ширина: | Высота: | Размер: 2.6 KiB |
|
@ -0,0 +1 @@
|
|||
{"BackgroundColor":"rgb(255,255,255)","IsVisible":true,"shapes":[{"Color":"rgb(255,255,255)","FontSize":30,"Mode":"stroke","Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":56.40362,"width":38.15534,"x":58.8349533,"y":24.0620956},"Text":"Text","Thickness":5,"Type":"rectangle"},{"Color":"rgb(255,255,255)","FontSize":30,"Mode":"fill","Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":48.9003868,"width":31.9417477,"x":62.0388336,"y":27.943079},"Text":"Text","Thickness":5,"Type":"rectangle"},{"Color":"rgb(251,176,59)","FontSize":61.5263939,"Mode":"stroke","Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":8.408797,"width":22.4271851,"x":67.66991,"y":35.3169479},"Text":"COFFEE","Type":"text"},{"Color":"rgb(0,0,0)","FontSize":57.3338852,"Mode":"stroke","Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":7.244502,"width":15.6310682,"x":70,"y":44.7606735},"Text":" SHOP","Type":"text"},{"Color":"rgb(0,0,0)","FontSize":50.99408,"Mode":"stroke","Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.856404,"width":22.0388355,"x":68.2524261,"y":53.6869354},"Text":"OPENING","Type":"text"},{"Color":"rgb(0,0,0)","FontSize":50.3740425,"Mode":"stroke","Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.98576975,"width":14.07767,"x":71.65048,"y":62.87193},"Text":"SOON","Type":"text"},{"Color":"rgb(255,255,255)","FontSize":30.0548286,"Mode":"stroke","Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":4.139715,"width":15.3398056,"x":71.35922,"y":84.86417},"Text":"","Type":"text"}]}
|
|
@ -0,0 +1 @@
|
|||
{"BackgroundColor":"rgb(255,255,255)","IsVisible":true,"shapes":[{"Color":"rgb(255,255,255)","FontSize":30,"Mode":"fill","Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":74.12678,"width":54.6601944,"x":22.4271851,"y":13.4540749},"Text":"Text","Thickness":5,"Type":"circle"},{"Color":"rgb(132,115,43)","FontSize":63.2510719,"Mode":"stroke","Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":8.796895,"width":38.6407776,"x":31.7475719,"y":33.24709},"Text":"Cheap & Easy","Type":"text"},{"Color":"rgb(43,45,66)","FontSize":129.3876,"Mode":"stroke","Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":17.8525219,"width":50.67961,"x":26.0194168,"y":44.7606735},"Text":"RECIPES","Type":"text"},{"Color":"rgb(237,28,36)","FontSize":57.7272453,"Mode":"stroke","Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":7.89133263,"width":32.8155327,"x":35.63107,"y":64.424324},"Text":"FOR DINNER","Type":"text"}]}
|
|
@ -0,0 +1 @@
|
|||
{"BackgroundColor":"rgb(255,255,255)","IsVisible":true,"shapes":[{"Color":"rgb(255,255,255)","FontSize":71.33393,"Mode":"stroke","Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":9.702458,"width":35.4368935,"x":3.883495,"y":18.1112556},"Text":"Planning to","Type":"text"},{"Color":"rgb(255,255,255)","FontSize":66.5325546,"Mode":"stroke","Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":9.055628,"width":47.76699,"x":3.39805818,"y":30.0129375},"Text":"develop a cross-","Type":"text"},{"Color":"rgb(255,255,255)","FontSize":70.3903656,"Mode":"stroke","Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":9.702458,"width":43.2038841,"x":3.592233,"y":41.0090561},"Text":"platform app?","Type":"text"}]}
|
После Ширина: | Высота: | Размер: 2.1 KiB |
|
@ -0,0 +1,17 @@
|
|||
{"BackgroundColor":"rgb(255,255,255)","IsVisible":true,"shapes":[
|
||||
{"Color":"rgb(0,0,0)","FontSize":20,"Mode":"fill","PathPoints":[],"Points":[{"x":7.46847725,"y":90.18088},{"x":6.983511,"y":5.16795874}],"RatioFrame":{"height":100,"width":100,"x":0,"y":0},"Text":"Text","Thickness":5,"Type":"arrow"},
|
||||
{"Color":"rgb(0,0,0)","FontSize":20,"Mode":"fill","PathPoints":[],"Points":[{"x":7.56547,"y":90.95607},{"x":88.5548,"y":90.05168}],"RatioFrame":{"height":100,"width":100,"x":0,"y":0},"Text":"Text","Thickness":5,"Type":"arrow"},
|
||||
{"Color":"rgb(251,176,59)","FontSize":18,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.589147,"width":8.729389,"x":13.4820566,"y":40.1808777},"Text":"160","Type":"text"},
|
||||
{"Color":"rgb(251,176,59)","FontSize":18,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.847545,"width":9.020369,"x":30.26188,"y":18.9922485},"Text":"175","Type":"text"},
|
||||
{"Color":"rgb(251,176,59)","FontSize":18,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.589147,"width":8.729389,"x":45.97478,"y":35.14212},"Text":"165","Type":"text"},
|
||||
{"Color":"rgb(251,176,59)","FontSize":18,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.589147,"width":8.729389,"x":61.8816681,"y":18.9922485},"Text":"173","Type":"text"},
|
||||
{"Color":"rgb(251,176,59)","FontSize":18,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.589147,"width":13.0940838,"x":13.773036,"y":93.2816544},"Text":"Adam","Type":"text"},
|
||||
{"Color":"rgb(251,176,59)","FontSize":18,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.589147,"width":10.6692533,"x":29.3889427,"y":93.2816544},"Text":"Jack","Type":"text"},
|
||||
{"Color":"rgb(251,176,59)","FontSize":18,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.589147,"width":12.99709,"x":44.907856,"y":93.2816544},"Text":"Smith","Type":"text"},
|
||||
{"Color":"rgb(251,176,59)","FontSize":18,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.589147,"width":9.990301,"x":61.8816681,"y":93.2816544},"Text":"Paul","Type":"text"},
|
||||
{"Color":"rgb(251,176,59)","FontSize":20,"Mode":"fill","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":44.1860466,"width":9.699321,"x":13.6760426,"y":45.99483},"Text":"Text","Thickness":5,"Type":"rectangle"},
|
||||
{"Color":"rgb(251,176,59)","FontSize":20,"Mode":"fill","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":63.43669,"width":9.699321,"x":29.7769165,"y":26.22739},"Text":"Text","Thickness":5,"Type":"rectangle"},
|
||||
{"Color":"rgb(251,176,59)","FontSize":20,"Mode":"fill","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":47.9328156,"width":9.699321,"x":45.29583,"y":41.860466},"Text":"Text","Thickness":5,"Type":"rectangle"},
|
||||
{"Color":"rgb(251,176,59)","FontSize":20,"Mode":"fill","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":61.36951,"width":9.699321,"x":61.6876831,"y":28.2945728},"Text":"Text","Thickness":5,"Type":"rectangle"}
|
||||
]
|
||||
}
|
После Ширина: | Высота: | Размер: 2.6 KiB |
После Ширина: | Высота: | Размер: 2.0 KiB |
После Ширина: | Высота: | Размер: 1.8 KiB |
После Ширина: | Высота: | Размер: 1.8 KiB |
После Ширина: | Высота: | Размер: 2.0 KiB |
После Ширина: | Высота: | Размер: 2.7 KiB |
|
@ -0,0 +1,13 @@
|
|||
{"BackgroundColor":"rgb(255,255,255)","IsVisible":true,"shapes":[{"Color":"rgb(139,0,0)","FontSize":20,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":70.93023,"width":55.57711,"x":5.14064026,"y":3.22997427},"Text":"Text","Thickness":5,"Type":"circle"},
|
||||
{"Color":"rgb(0,113,188)","FontSize":20,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":70.67184,"width":55.7710953,"x":38.7972832,"y":3.74677014},"Text":"Text","Thickness":5,"Type":"circle"},
|
||||
{"Color":"rgb(251,176,59)","FontSize":20,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":73.12662,"width":55.6741028,"x":20.9505329,"y":26.09819},"Text":"Text","Thickness":5,"Type":"circle"},
|
||||
{"Color":"rgb(139,0,0)","FontSize":18,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.589147,"width":6.11057234,"x":16.5858383,"y":20.1550388},"Text":"9","Type":"text"},
|
||||
{"Color":"rgb(139,0,0)","FontSize":18,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.589147,"width":6.11057234,"x":45.97478,"y":19.3798447},"Text":"6","Type":"text"},
|
||||
{"Color":"rgb(139,0,0)","FontSize":18,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.589147,"width":6.11057234,"x":44.71387,"y":42.2480621},"Text":"5","Type":"text"},
|
||||
{"Color":"rgb(139,0,0)","FontSize":18,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.589147,"width":6.11057234,"x":66.9253159,"y":24.4186039},"Text":"3","Type":"text"},
|
||||
{"Color":"rgb(0,113,188)","FontSize":18,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.589147,"width":6.11057234,"x":28.8069839,"y":61.4987068},"Text":"2","Type":"text"},
|
||||
{"Color":"rgb(251,176,59)","FontSize":18,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":8.78553,"width":6.11057234,"x":45.7807961,"y":79.97416},"Text":"1","Type":"text"},
|
||||
{"Color":"rgb(251,176,59)","FontSize":18,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.589147,"width":6.11057234,"x":59.0688667,"y":59.0439262},"Text":"7","Type":"text"},
|
||||
{"Color":"rgb(0,113,188)","FontSize":18,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.589147,"width":10.378274,"x":0,"y":61.6279068},"Text":"Cats","Type":"text"},
|
||||
{"Color":"rgb(0,113,188)","FontSize":18,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.589147,"width":11.639185,"x":66.24636,"y":92.7648544},"Text":"Dogs","Type":"text"},
|
||||
{"Color":"rgb(0,113,188)","FontSize":18,"Mode":"stroke","PathPoints":[],"Points":[{"x":0,"y":0},{"x":0,"y":0}],"RatioFrame":{"height":6.589147,"width":11.5421925,"x":77.69156,"y":2.06718349},"Text":"Birds","Type":"text"}]}
|
После Ширина: | Высота: | Размер: 1.9 KiB |
|
@ -0,0 +1,196 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System;
|
||||
using Android.App;
|
||||
using Android.Content.PM;
|
||||
using Android.Graphics;
|
||||
using Android.Graphics.Drawables;
|
||||
using Android.OS;
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
|
||||
namespace SampleBrowser
|
||||
{
|
||||
[Activity(Theme = "@style/PropertyApp", MainLauncher = false, ScreenOrientation = ScreenOrientation.Portrait)]
|
||||
public class AllControlsSamplePage : Activity
|
||||
{
|
||||
#region fields
|
||||
|
||||
private bool isselected = true;
|
||||
|
||||
#endregion
|
||||
|
||||
#region properties
|
||||
|
||||
internal SampleModel SelectedGroup { get; set; }
|
||||
|
||||
internal SamplePage CurrentSamplePage { get; set; }
|
||||
|
||||
internal RelativeLayout SettingsButton { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region methods
|
||||
|
||||
public override void OnBackPressed()
|
||||
{
|
||||
Finish();
|
||||
base.OnBackPressed();
|
||||
}
|
||||
|
||||
public override void Finish()
|
||||
{
|
||||
if (CurrentSamplePage != null)
|
||||
{
|
||||
CurrentSamplePage.Destroy();
|
||||
CurrentSamplePage = null;
|
||||
}
|
||||
|
||||
base.Finish();
|
||||
}
|
||||
|
||||
public override bool OnOptionsItemSelected(IMenuItem item)
|
||||
{
|
||||
if (item.ItemId == Android.Resource.Id.Home)
|
||||
{
|
||||
Finish();
|
||||
}
|
||||
|
||||
return base.OnOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
protected override void OnCreate(Bundle savedInstanceState)
|
||||
{
|
||||
ActionBar.SetDisplayHomeAsUpEnabled(true);
|
||||
ActionBar.SetDisplayShowCustomEnabled(true);
|
||||
ActionBar.SetIcon(new ColorDrawable(Color.Transparent));
|
||||
ActionBar.SetDisplayShowTitleEnabled(false);
|
||||
|
||||
LayoutInflater layoutInflater = LayoutInflater.From(this);
|
||||
View customActionBar = layoutInflater.Inflate(Resource.Layout.CustomActionBar, null);
|
||||
RelativeLayout imageButton = (RelativeLayout)customActionBar.FindViewById(Resource.Id.imageButton);
|
||||
|
||||
View propertyWindow = layoutInflater.Inflate(Resource.Layout.Propertywindow, null);
|
||||
View mainView = layoutInflater.Inflate(Resource.Layout.layout, null);
|
||||
SettingsButton = imageButton;
|
||||
SetContentView(mainView);
|
||||
|
||||
var popup = new PopupWindow(propertyWindow, ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
|
||||
popup.Focusable = true;
|
||||
|
||||
popup.DismissEvent += (s, e) => isselected = true;
|
||||
imageButton.Click += delegate
|
||||
{
|
||||
popup.ContentView = propertyWindow;
|
||||
if (CurrentSamplePage.PropertyView == null)
|
||||
{
|
||||
CurrentSamplePage.PropertyView = CurrentSamplePage.GetPropertyWindowLayout(this);
|
||||
}
|
||||
|
||||
var linear = (LinearLayout)propertyWindow.FindViewById(Resource.Id.container);
|
||||
linear.RemoveAllViews();
|
||||
linear.AddView(CurrentSamplePage.PropertyView);
|
||||
if (isselected)
|
||||
{
|
||||
popup.ShowAsDropDown(imageButton, 0, 280);
|
||||
popup.Focusable = true;
|
||||
popup.Update();
|
||||
isselected = false;
|
||||
}
|
||||
|
||||
ImageView iconclose = (ImageView)propertyWindow.FindViewById(Resource.Id.close);
|
||||
Button discard = (Button)propertyWindow.FindViewById(Resource.Id.discard);
|
||||
Button apply = (Button)propertyWindow.FindViewById(Resource.Id.apply);
|
||||
|
||||
iconclose.Click += delegate
|
||||
{
|
||||
popup.Dismiss();
|
||||
isselected = true;
|
||||
};
|
||||
|
||||
discard.Click += delegate
|
||||
{
|
||||
popup.Dismiss();
|
||||
isselected = true;
|
||||
};
|
||||
|
||||
apply.Click += delegate
|
||||
{
|
||||
CurrentSamplePage.OnApplyChanges(CurrentSamplePage.SampleView);
|
||||
popup.Dismiss();
|
||||
isselected = true;
|
||||
};
|
||||
};
|
||||
|
||||
ActionBar.CustomView = customActionBar;
|
||||
SelectedGroup = (ControlModel)MainActivity.SelectedIntent.GetSerializableExtra("sample");
|
||||
var textView = (TextView)FindViewById(Resource.Id.title_text);
|
||||
textView.Text = SelectedGroup.Title;
|
||||
var textParent = (RelativeLayout)FindViewById(Resource.Id.textParent);
|
||||
textParent.Click += (s, e) => Finish();
|
||||
|
||||
if ((SelectedGroup as ControlModel).Features.Count > 0)
|
||||
{
|
||||
ActionBar.NavigationMode = ActionBarNavigationMode.Tabs;
|
||||
AddTab("Types", new ChartFragment((SelectedGroup as ControlModel).Samples, this));
|
||||
AddTab("Features", new ChartFragment((SelectedGroup as ControlModel).Features, this));
|
||||
}
|
||||
else
|
||||
{
|
||||
ActionBar.NavigationMode = ActionBarNavigationMode.Standard;
|
||||
FrameLayout frameLayout = (FrameLayout)mainView.FindViewById(Resource.Id.fragment_content);
|
||||
var sampleViewActivity = new SampleViewActivity((SelectedGroup as ControlModel).Samples, frameLayout, this, 0);
|
||||
if ((SelectedGroup as ControlModel).Samples.Count > 0)
|
||||
{
|
||||
textView.Text = (SelectedGroup as ControlModel).Samples[0].Title;
|
||||
}
|
||||
|
||||
sampleViewActivity.BaseTextView = textView;
|
||||
}
|
||||
|
||||
if (savedInstanceState != null && ActionBar.TabCount > 0)
|
||||
{
|
||||
ActionBar.SelectTab(this.ActionBar.GetTabAt(savedInstanceState.GetInt("tab")));
|
||||
}
|
||||
|
||||
base.OnCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
protected override void OnSaveInstanceState(Bundle outState)
|
||||
{
|
||||
outState.PutInt("tab", this.ActionBar.SelectedNavigationIndex);
|
||||
base.OnSaveInstanceState(outState);
|
||||
}
|
||||
|
||||
private void AddTab(string tabText, Fragment view)
|
||||
{
|
||||
var tab = ActionBar.NewTab();
|
||||
tab.SetText(tabText);
|
||||
|
||||
tab.TabSelected += delegate(object sender, ActionBar.TabEventArgs e)
|
||||
{
|
||||
var fragment = FragmentManager.FindFragmentById(Resource.Id.fragment_content);
|
||||
if (fragment != null)
|
||||
{
|
||||
e.FragmentTransaction.Remove(fragment);
|
||||
}
|
||||
|
||||
e.FragmentTransaction.Add(Resource.Id.fragment_content, view);
|
||||
};
|
||||
|
||||
tab.TabUnselected += delegate(object sender, ActionBar.TabEventArgs e)
|
||||
{
|
||||
e.FragmentTransaction.Remove(view);
|
||||
};
|
||||
|
||||
ActionBar.AddTab(tab);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Android.App;
|
||||
using Android.Graphics;
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
using AndroidX.RecyclerView.Widget;
|
||||
|
||||
namespace SampleBrowser
|
||||
{
|
||||
public class SampleViewActivity
|
||||
{
|
||||
#region fields
|
||||
|
||||
private Activity activity;
|
||||
|
||||
private FrameLayout sampleView;
|
||||
|
||||
private List<SampleModel> samples;
|
||||
|
||||
private SampleModel selectedSample;
|
||||
|
||||
private RecyclerViewAdapter adapter;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ctor
|
||||
|
||||
public SampleViewActivity(List<SampleModel> sampleCollection, FrameLayout mainView, Activity act, int index)
|
||||
{
|
||||
activity = act;
|
||||
samples = sampleCollection;
|
||||
if (samples.Count > 0)
|
||||
{
|
||||
selectedSample = samples[index];
|
||||
}
|
||||
|
||||
View view = LayoutInflater.From(mainView.Context).Inflate(Resource.Layout.SamplePageLayout, null);
|
||||
mainView.AddView(view);
|
||||
OnViewCreated(view);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region properties
|
||||
|
||||
internal TextView BaseTextView { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region methods
|
||||
|
||||
public void OnViewCreated(View view)
|
||||
{
|
||||
sampleView = (FrameLayout)view.FindViewById(Resource.Id.SampleView);
|
||||
var layoutManager = new LinearLayoutManager(activity, LinearLayoutManager.Horizontal, false);
|
||||
|
||||
var recyclerView = view.FindViewById<RecyclerView>(Resource.Id.horizontal_RecyclerView);
|
||||
recyclerView.SetBackgroundResource(Resource.Layout.listviewborder);
|
||||
recyclerView.SetLayoutManager(layoutManager);
|
||||
|
||||
if (samples.Count == 1)
|
||||
{
|
||||
recyclerView.Visibility = ViewStates.Gone;
|
||||
}
|
||||
else
|
||||
{
|
||||
adapter = new RecyclerViewAdapter(samples);
|
||||
adapter.ItemClick += Adapter_ItemClick;
|
||||
recyclerView.SetAdapter(adapter);
|
||||
}
|
||||
|
||||
Refresh(selectedSample);
|
||||
}
|
||||
|
||||
private void Adapter_ItemClick(object sender, ListViewSelectionChangedEventArgs e)
|
||||
{
|
||||
TextView selectedItem = e.SelectedItem, prevSelectedItem = e.PreviousSelectedItem;
|
||||
if (selectedItem.Text != prevSelectedItem?.Text)
|
||||
{
|
||||
selectedSample = samples[e.SelectedIndex];
|
||||
Refresh(selectedSample);
|
||||
selectedItem.SetTextColor(Color.ParseColor("#0277F5"));
|
||||
prevSelectedItem?.SetTextColor(Color.Black);
|
||||
}
|
||||
}
|
||||
|
||||
private void Refresh(SampleModel selectedSample)
|
||||
{
|
||||
SamplePage samplePage;
|
||||
if (BaseTextView != null)
|
||||
{
|
||||
BaseTextView.Text = selectedSample.Title;
|
||||
}
|
||||
|
||||
bool isClassExists = Type.GetType("SampleBrowser." + selectedSample.Name) != null;
|
||||
if (isClassExists)
|
||||
{
|
||||
var handle = Activator.CreateInstance(null, "SampleBrowser." + selectedSample.Name);
|
||||
samplePage = (SamplePage)handle.Unwrap();
|
||||
|
||||
sampleView.RemoveAllViews();
|
||||
sampleView.AddView(samplePage.GetSampleContent(activity));
|
||||
var allControlsSamplePage = activity as AllControlsSamplePage;
|
||||
if (allControlsSamplePage != null)
|
||||
{
|
||||
if (allControlsSamplePage.CurrentSamplePage != null)
|
||||
{
|
||||
allControlsSamplePage.CurrentSamplePage.Destroy();
|
||||
}
|
||||
|
||||
allControlsSamplePage.CurrentSamplePage = samplePage;
|
||||
|
||||
allControlsSamplePage.SettingsButton.Visibility = samplePage.GetPropertyWindowLayout(activity) != null
|
||||
? ViewStates.Visible : ViewStates.Invisible;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System.Collections.Generic;
|
||||
using Android.App;
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
|
||||
namespace SampleBrowser
|
||||
{
|
||||
public class HomeScreenAdapter : BaseAdapter<SampleModel>
|
||||
{
|
||||
#region fields
|
||||
|
||||
private List<SampleModel> items;
|
||||
|
||||
private Activity context;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ctor
|
||||
|
||||
public HomeScreenAdapter(Activity context, List<SampleModel> items)
|
||||
: base()
|
||||
{
|
||||
this.context = context;
|
||||
this.items = items;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region properties
|
||||
|
||||
public override int Count
|
||||
{
|
||||
get { return items.Count; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region methods
|
||||
|
||||
public override SampleModel this[int position]
|
||||
{
|
||||
get { return items[position]; }
|
||||
}
|
||||
|
||||
public override long GetItemId(int position)
|
||||
{
|
||||
return position;
|
||||
}
|
||||
|
||||
public override View GetView(int position, View convertView, ViewGroup parent)
|
||||
{
|
||||
View view = convertView;
|
||||
var item = items[position];
|
||||
if (view == null)
|
||||
{
|
||||
view = context.LayoutInflater.Inflate(Resource.Layout.CustomView, null);
|
||||
}
|
||||
|
||||
view.FindViewById<TextView>(Resource.Id.Text1).Text = item.Title;
|
||||
view.FindViewById<TextView>(Resource.Id.Text2).Text = item.Description;
|
||||
int resourceid = context.Resources.GetIdentifier("drawable/" + item.ImageId, null, context.PackageName);
|
||||
|
||||
if (resourceid == 0)
|
||||
{
|
||||
resourceid = context.Resources.GetIdentifier("drawable/rangenavigator", null, context.PackageName);
|
||||
}
|
||||
|
||||
view.FindViewById<ImageView>(Resource.Id.Image).SetImageResource(resourceid);
|
||||
TextView textView = (TextView)view.FindViewById(Resource.Id.tagText);
|
||||
|
||||
if (!string.IsNullOrEmpty(item.Type))
|
||||
{
|
||||
textView.Visibility = ViewStates.Visible;
|
||||
if (item.Type.ToLower().Equals("new"))
|
||||
{
|
||||
textView.Text = "New";
|
||||
textView.SetBackgroundResource(Resource.Drawable.newtagbackground);
|
||||
}
|
||||
else if (item.Type.ToLower().Equals("updated"))
|
||||
{
|
||||
textView.Text = "Updated";
|
||||
textView.SetBackgroundResource(Resource.Drawable.updatetagbackground);
|
||||
}
|
||||
else if (item.Type.ToLower().Equals("preview"))
|
||||
{
|
||||
textView.Text = "Preview";
|
||||
textView.SetBackgroundResource(Resource.Drawable.previewtagbackground);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
textView.Visibility = ViewStates.Invisible;
|
||||
}
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,151 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Android.Graphics;
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
using AndroidX.RecyclerView.Widget;
|
||||
|
||||
namespace SampleBrowser
|
||||
{
|
||||
public class RecyclerViewAdapter : RecyclerView.Adapter
|
||||
{
|
||||
#region fields
|
||||
|
||||
private List<SampleModel> items;
|
||||
|
||||
private TextView prevSelectedView;
|
||||
|
||||
private int selectedIndex = -1;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ctor
|
||||
|
||||
public RecyclerViewAdapter(List<SampleModel> values)
|
||||
{
|
||||
items = values;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region event
|
||||
|
||||
public event EventHandler<ListViewSelectionChangedEventArgs> ItemClick;
|
||||
|
||||
#endregion
|
||||
|
||||
#region properties
|
||||
|
||||
public override int ItemCount
|
||||
{
|
||||
get { return items.Count; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region methods
|
||||
|
||||
public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
|
||||
{
|
||||
var viewHolder = holder as RecyclerViewViewItemHolder;
|
||||
|
||||
var item = items[position];
|
||||
viewHolder.SampleNameView.Text = item.Title;
|
||||
if (selectedIndex != position)
|
||||
{
|
||||
viewHolder.SampleNameView.SetTextColor(Color.Black);
|
||||
}
|
||||
|
||||
if (selectedIndex == -1 && position == 0)
|
||||
{
|
||||
prevSelectedView = viewHolder.SampleNameView;
|
||||
viewHolder.SampleNameView.SetTextColor(Color.ParseColor("#0277F5"));
|
||||
}
|
||||
|
||||
if (selectedIndex == position)
|
||||
{
|
||||
viewHolder.SampleNameView.SetTextColor(Color.ParseColor("#0277F5"));
|
||||
}
|
||||
|
||||
var textView = viewHolder.UpdateTagView;
|
||||
var layoutParams = textView.LayoutParameters as ViewGroup.LayoutParams;
|
||||
if (string.IsNullOrEmpty(item.Type))
|
||||
{
|
||||
textView.Visibility = ViewStates.Gone;
|
||||
}
|
||||
else
|
||||
{
|
||||
textView.Visibility = ViewStates.Visible;
|
||||
if (item.Type.ToLower().Equals("updated"))
|
||||
{
|
||||
textView.Text = "U";
|
||||
textView.SetBackgroundResource(Resource.Drawable.updatetagcircle);
|
||||
}
|
||||
else if (item.Type.ToLower().Equals("new"))
|
||||
{
|
||||
textView.Text = "N";
|
||||
textView.SetBackgroundResource(Resource.Drawable.newtagcircle);
|
||||
}
|
||||
else if (item.Type.ToLower().Equals("preview"))
|
||||
{
|
||||
textView.Text = "P";
|
||||
textView.SetBackgroundResource(Resource.Drawable.previewtagcircle);
|
||||
}
|
||||
|
||||
layoutParams.Width = (int)(20 * MainActivity.Density);
|
||||
layoutParams.Height = (int)(20 * MainActivity.Density);
|
||||
textView.LayoutParameters = layoutParams;
|
||||
}
|
||||
}
|
||||
|
||||
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
|
||||
{
|
||||
var itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.CustomListViewLayout, parent, false);
|
||||
|
||||
var viewHolder = new RecyclerViewViewItemHolder(itemView, OnClick);
|
||||
|
||||
return viewHolder;
|
||||
}
|
||||
|
||||
private void OnClick(TextView selectedView, int position)
|
||||
{
|
||||
var eventArgs = new ListViewSelectionChangedEventArgs
|
||||
{
|
||||
PreviousSelectedItem = prevSelectedView,
|
||||
SelectedItem = selectedView,
|
||||
SelectedIndex = position
|
||||
};
|
||||
selectedIndex = position;
|
||||
if (prevSelectedView == selectedView)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ItemClick?.Invoke(this, eventArgs);
|
||||
|
||||
prevSelectedView = selectedView;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class ListViewSelectionChangedEventArgs : EventArgs
|
||||
{
|
||||
#region properties
|
||||
|
||||
public int SelectedIndex { get; set; }
|
||||
|
||||
public TextView SelectedItem { get; set; }
|
||||
|
||||
public TextView PreviousSelectedItem { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System;
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
using AndroidX.RecyclerView.Widget;
|
||||
|
||||
namespace SampleBrowser
|
||||
{
|
||||
public class RecyclerViewViewItemHolder : RecyclerView.ViewHolder
|
||||
{
|
||||
#region ctor
|
||||
|
||||
public RecyclerViewViewItemHolder(View itemView, Action<TextView, int> listener) : base(itemView)
|
||||
{
|
||||
UpdateTagView = itemView.FindViewById<TextView>(Resource.Id.updateImage);
|
||||
|
||||
SampleNameView = itemView.FindViewById<TextView>(Resource.Id.sampleName);
|
||||
|
||||
itemView.Click += (sender, e) => listener(SampleNameView, AdapterPosition);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region properties
|
||||
|
||||
internal TextView UpdateTagView { get; set; }
|
||||
|
||||
internal TextView SampleNameView { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Android.App;
|
||||
using Android.Graphics;
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
using Android.OS;
|
||||
using AndroidX.RecyclerView.Widget;
|
||||
|
||||
namespace SampleBrowser
|
||||
{
|
||||
public class ChartFragment : Fragment
|
||||
{
|
||||
#region fields
|
||||
|
||||
private FrameLayout sampleView;
|
||||
|
||||
private SampleModel selectedSample;
|
||||
|
||||
private AllControlsSamplePage allControlsSamplePage;
|
||||
|
||||
private List<SampleModel> chartSamples;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ctor
|
||||
|
||||
public ChartFragment(List<SampleModel> samples, AllControlsSamplePage activity)
|
||||
{
|
||||
chartSamples = samples;
|
||||
|
||||
allControlsSamplePage = activity;
|
||||
|
||||
if (chartSamples.Count > 0)
|
||||
{
|
||||
selectedSample = chartSamples[0];
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region methods
|
||||
|
||||
public override void OnViewCreated(View view, Bundle savedInstanceState)
|
||||
{
|
||||
sampleView = (FrameLayout)view.FindViewById(Resource.Id.SampleView);
|
||||
var layoutManager = new LinearLayoutManager(allControlsSamplePage, LinearLayoutManager.Horizontal, false);
|
||||
|
||||
var recyclerView = view.FindViewById<RecyclerView>(Resource.Id.horizontal_RecyclerView);
|
||||
recyclerView.SetLayoutManager(layoutManager);
|
||||
|
||||
var selectedIndex = chartSamples.IndexOf(selectedSample);
|
||||
|
||||
var adapter = new RecyclerViewAdapter(chartSamples);
|
||||
adapter.ItemClick += Adapter_ItemClick;
|
||||
recyclerView.SetAdapter(adapter);
|
||||
RefreshSample(selectedSample);
|
||||
|
||||
if (selectedIndex > 0)
|
||||
{
|
||||
new Handler().PostDelayed(() => recyclerView.FindViewHolderForLayoutPosition(selectedIndex).ItemView.PerformClick(), 100);
|
||||
}
|
||||
}
|
||||
|
||||
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
|
||||
{
|
||||
return inflater.Inflate(Resource.Layout.TypesLayout, null);
|
||||
}
|
||||
|
||||
private void Adapter_ItemClick(object sender, ListViewSelectionChangedEventArgs e)
|
||||
{
|
||||
var index = e.SelectedIndex;
|
||||
TextView selectedItem = e.SelectedItem, prevSelectedItem = e.PreviousSelectedItem;
|
||||
if (selectedItem.Text != prevSelectedItem?.Text)
|
||||
{
|
||||
selectedSample = chartSamples[index];
|
||||
RefreshSample(selectedSample);
|
||||
}
|
||||
|
||||
selectedItem?.SetTextColor(Color.ParseColor("#0277F5"));
|
||||
prevSelectedItem?.SetTextColor(Color.Black);
|
||||
}
|
||||
|
||||
private void RefreshSample(SampleModel selectedSample)
|
||||
{
|
||||
SamplePage samplePage;
|
||||
bool isClassExists = Type.GetType("SampleBrowser." + selectedSample.Name) != null;
|
||||
|
||||
if (isClassExists)
|
||||
{
|
||||
var handle = Activator.CreateInstance(null, "SampleBrowser." + selectedSample.Name);
|
||||
samplePage = (SamplePage)handle.Unwrap();
|
||||
sampleView.RemoveAllViews();
|
||||
|
||||
if (allControlsSamplePage.CurrentSamplePage != null)
|
||||
{
|
||||
allControlsSamplePage.CurrentSamplePage.Destroy();
|
||||
}
|
||||
|
||||
allControlsSamplePage.CurrentSamplePage = samplePage;
|
||||
sampleView.AddView(samplePage.GetSampleContent(View.Context));
|
||||
|
||||
allControlsSamplePage.SettingsButton.Visibility = samplePage.GetPropertyWindowLayout(allControlsSamplePage) != null
|
||||
? ViewStates.Visible : ViewStates.Invisible;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Android.Content;
|
||||
using Android.Runtime;
|
||||
using Android.Util;
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
|
||||
namespace SampleBrowser
|
||||
{
|
||||
|
||||
[Preserve(AllMembers = true)]
|
||||
[Register("SampleBrowser.SampleBrowser.horizontalScroll")]
|
||||
public class SamplesListView : HorizontalScrollView
|
||||
{
|
||||
|
||||
Context listViewContext;
|
||||
|
||||
public SamplesListView(Context context) : base(context)
|
||||
{
|
||||
listViewContext = context;
|
||||
}
|
||||
|
||||
public SamplesListView(Context context, IAttributeSet attrs) : base(context, attrs)
|
||||
{
|
||||
listViewContext = context;
|
||||
}
|
||||
|
||||
public SamplesListView(Context context, IAttributeSet attrs, int defStyleAttr) : base(context, attrs, defStyleAttr)
|
||||
{
|
||||
listViewContext = context;
|
||||
}
|
||||
|
||||
public SamplesListView(Context context, IAttributeSet attrs, int defStyleAttr, int defStyleRes) : base(context, attrs, defStyleAttr, defStyleRes)
|
||||
{
|
||||
listViewContext = context;
|
||||
}
|
||||
|
||||
protected SamplesListView(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer)
|
||||
{
|
||||
}
|
||||
|
||||
public void Add(List<SampleBase> samples)
|
||||
{
|
||||
int count = samples.Count;
|
||||
for (int i = 0; i < samples.Count; i++)
|
||||
{
|
||||
AddView(GetView(samples[i].Title));
|
||||
}
|
||||
}
|
||||
|
||||
public TextView GetView(string sampleName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(sampleName))
|
||||
return null;
|
||||
|
||||
TextView view = new TextView(listViewContext)
|
||||
{
|
||||
LayoutParameters = new ViewGroup.LayoutParams(200, 200)
|
||||
};
|
||||
view.Text = sampleName;
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SampleBrowser
|
||||
{
|
||||
public class SampleModel : Java.Lang.Object, Java.IO.ISerializable
|
||||
{
|
||||
#region ctor
|
||||
|
||||
public SampleModel()
|
||||
{
|
||||
Type = string.Empty;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region properties
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Type { get; set; }
|
||||
|
||||
public string Title { get; set; }
|
||||
|
||||
public string ImageId { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class ControlModel : SampleModel
|
||||
{
|
||||
#region ctor
|
||||
|
||||
public ControlModel()
|
||||
{
|
||||
Features = new List<SampleModel>();
|
||||
Samples = new List<SampleModel>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region properties
|
||||
|
||||
public List<SampleModel> Features { get; set; }
|
||||
|
||||
public List<SampleModel> Samples { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using Android.Views;
|
||||
using Android.Content;
|
||||
|
||||
namespace SampleBrowser
|
||||
{
|
||||
public class SamplePage
|
||||
{
|
||||
#region properties
|
||||
|
||||
public View SampleView { get; set; }
|
||||
|
||||
internal View PropertyView { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region methods
|
||||
|
||||
public virtual View GetSampleContent(Context context)
|
||||
{
|
||||
return new View(context);
|
||||
}
|
||||
|
||||
public virtual void OnApplyChanges(View view)
|
||||
{
|
||||
OnApplyChanges();
|
||||
}
|
||||
|
||||
public virtual void OnApplyChanges()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual View GetPropertyWindowLayout(Context context)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual void Destroy()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
xcopy /s /y ..\essentialstudio-common\Data\DocIO\BkmkDocumentPart_Template.docx Samples\DocIO\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\DocIO\Bookmark_Template.docx Samples\DocIO\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\DocIO\Excel_Template.xlsx Samples\DocIO\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\DocIO\Products.xml Samples\DocIO\Templates\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\DocIO\Letter Formatting.docx" Samples\DocIO\Templates\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\DocIO\Doc to HTML.doc" Samples\DocIO\Templates\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\DocIO\ContentControlTemplate.docx" Samples\DocIO\Templates\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\DocIO\WordtoPDF.docx" Samples\DocIO\Templates\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\DocIO\MarkdownToWord.md" Samples\DocIO\Templates\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\DocIO\CreateEquation.docx" Samples\DocIO\Templates\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\DocIO\Security Settings.docx" Samples\DocIO\Templates\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\DocIO\Employees.xml" Samples\DocIO\Templates\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\DocIO\EmployeesReportDemo.doc" Samples\DocIO\Templates\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\DocIO\Template.doc" Samples\DocIO\Templates\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\DocIO\Template_Letter.doc" Samples\DocIO\Templates\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\DocIO\TrackChangesTemplate.docx" Samples\DocIO\Templates\
|
||||
ren "Samples\DocIO\Templates\Doc to HTML.doc" WordtoHTML.doc
|
||||
xcopy /s /y ..\essentialstudio-common\Images\DocIO\AdventureCycle.jpg Samples\DocIO\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Images\DocIO\Mountain-200.jpg Samples\DocIO\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Images\DocIO\Mountain-300.jpg Samples\DocIO\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Images\DocIO\Northwind.png Samples\DocIO\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Images\DocIO\Road-550-W.jpg Samples\DocIO\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Images\DocIO\SampleImage.png Samples\DocIO\Templates\
|
||||
|
||||
xcopy /s /y "..\essentialstudio-common\Data\PDF\GIS Succinctly.pdf" Samples\PDFViewer\Assets\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\PDF\F# Succinctly.pdf" Samples\PDFViewer\Assets\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\PDF\HTTP Succinctly.pdf" Samples\PDFViewer\Assets\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\PDF\JavaScript Succinctly.pdf" Samples\PDFViewer\Assets\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\PDF\FormFillingDocument.pdf" Samples\PDFViewer\Assets\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\PDF\Encrypted Document.pdf" Samples\PDFViewer\Assets\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\PDF\Xamarin Forms Succinctly.pdf" Samples\PDFViewer\Assets\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\PDF\Products.xml Samples\PDF\Assets\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\PDF\InvoiceProductList.xml Samples\PDF\Assets\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\PDF\Report.xml Samples\PDF\Assets\
|
||||
xcopy /s /y ..\essentialstudio-common\Images\PDF\Xamarin_bannerEdit.jpg Samples\PDF\Assets\
|
||||
xcopy /s /y ..\essentialstudio-common\Images\PDF\Xamarin_PNG.png Samples\PDF\Assets\
|
||||
xcopy /s /y ..\essentialstudio-common\Images\PDF\Xamarin_JPEG.jpg Samples\PDF\Assets\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\PDF\PDF.pfx Samples\PDF\Assets\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\PDF\SignedDocument.pdf Samples\PDF\Assets\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\PDF\Product Catalog.pdf" Samples\PDF\Assets\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\PDF\JavaScript Succinctly.pdf" Samples\PDF\Assets\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\PDF\SalesOrderDetail.pdf" Samples\PDF\Assets\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\PDF\Xamarin_JPEG.jpg" Samples\PDF\Assets\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\PDF\Xamarin_PNG.png" Samples\PDF\Assets\
|
||||
xcopy /s /y "..\essentialstudio-common\Images\PDF\qrcodelogo.png" Samples\PDF\Assets\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\PDF\arial.ttf" Samples\PDF\Assets\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\PDF\arabic.txt" Samples\PDF\Assets\
|
||||
xcopy /s /y "..\essentialstudio-common\Data\PDF\NotoSerif-Black.otf" Samples\PDF\Assets\
|
||||
|
||||
xcopy /s /y ..\essentialstudio-common\Data\Presentation\HelloWorld.pptx Samples\Presentation\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\Presentation\Images.pptx Samples\Presentation\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\Presentation\NewCharts.pptx Samples\Presentation\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\Presentation\Slides.pptx Samples\Presentation\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Images\Presentation\tablet.jpg Samples\Presentation\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\Presentation\Products.xml Samples\Presentation\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\Presentation\TableData.xml Samples\Presentation\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\Presentation\SlideTableData.xml Samples\Presentation\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\Presentation\ShapeWithAnimation.pptx Samples\Presentation\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\Presentation\Animation.pptx Samples\Presentation\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\Presentation\Transition.pptx Samples\Presentation\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\Presentation\Template.pptx Samples\Presentation\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\Presentation\HeaderFooter.pptx Samples\Presentation\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\Presentation\EmbeddedOleObject.pptx Samples\Presentation\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\Presentation\OlePicture.png Samples\Presentation\Templates\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\Presentation\OleTemplate.docx Samples\Presentation\Templates\
|
||||
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\FilterData.xlsx Samples\XlsIO\Template\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\IconFilterData.xlsx Samples\XlsIO\Template\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\FilterData_Color.xlsx Samples\XlsIO\Template\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\ReplaceOptions.xlsx Samples\XlsIO\Template\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\AdvancedFilterData.xlsx Samples\XlsIO\Template\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\ChartData.xlsx Samples\XlsIO\Template\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\CLRObjects.xml Samples\XlsIO\Template\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\customers.xml Samples\XlsIO\Template\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\ExcelToPDF.xlsx Samples\XlsIO\Template\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\ExcelToJSON.xlsx Samples\XlsIO\Template\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\ExportSales.xlsx Samples\XlsIO\Template\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\ExportData.xlsx Samples\XlsIO\Template\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\ExportData.xml Samples\XlsIO\Template\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\ExpenseReport.xlsx Samples\XlsIO\Template\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\NorthwindTemplate.xlsx Samples\XlsIO\Template\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\bahnschrift.ttf Samples\XlsIO\Template\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\georgiab.ttf Samples\XlsIO\Template\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\InvoiceTemplate.xlsx Samples\XlsIO\Template\
|
||||
xcopy /s /y ..\essentialstudio-common\Data\XlsIO\ImportHTMLTable.html Samples\XlsIO\Template\
|
|
@ -0,0 +1,79 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RuleSet Name="Encryption Base Rule Set" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. You should include this rule set in any custom rule set you create for your projects." ToolsVersion="14.0">
|
||||
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
|
||||
<Rule Id="CA1001" Action="Warning" />
|
||||
<Rule Id="CA1009" Action="Warning" />
|
||||
<Rule Id="CA1016" Action="Warning" />
|
||||
<Rule Id="CA1033" Action="Warning" />
|
||||
<Rule Id="CA1049" Action="Warning" />
|
||||
<Rule Id="CA1060" Action="Warning" />
|
||||
<Rule Id="CA1061" Action="Warning" />
|
||||
<Rule Id="CA1065" Action="Warning" />
|
||||
<Rule Id="CA1301" Action="Warning" />
|
||||
<Rule Id="CA1400" Action="Warning" />
|
||||
<Rule Id="CA1401" Action="Warning" />
|
||||
<Rule Id="CA1403" Action="Warning" />
|
||||
<Rule Id="CA1404" Action="Warning" />
|
||||
<Rule Id="CA1405" Action="Warning" />
|
||||
<Rule Id="CA1410" Action="Warning" />
|
||||
<Rule Id="CA1415" Action="Warning" />
|
||||
<Rule Id="CA1800" Action="Warning" />
|
||||
<Rule Id="CA1802" Action="Warning" />
|
||||
<Rule Id="CA1804" Action="Warning" />
|
||||
<Rule Id="CA1809" Action="Warning" />
|
||||
<Rule Id="CA1810" Action="Warning" />
|
||||
<Rule Id="CA1811" Action="Warning" />
|
||||
<Rule Id="CA1812" Action="Warning" />
|
||||
<Rule Id="CA1813" Action="Warning" />
|
||||
<Rule Id="CA1814" Action="Warning" />
|
||||
<Rule Id="CA1815" Action="Warning" />
|
||||
<Rule Id="CA1819" Action="Warning" />
|
||||
<Rule Id="CA1820" Action="Warning" />
|
||||
<Rule Id="CA1821" Action="Warning" />
|
||||
<Rule Id="CA1822" Action="Warning" />
|
||||
<Rule Id="CA1823" Action="Warning" />
|
||||
<Rule Id="CA1824" Action="Warning" />
|
||||
<Rule Id="CA1900" Action="Warning" />
|
||||
<Rule Id="CA1901" Action="Warning" />
|
||||
<Rule Id="CA2002" Action="Warning" />
|
||||
<Rule Id="CA2100" Action="Warning" />
|
||||
<Rule Id="CA2101" Action="Warning" />
|
||||
<Rule Id="CA2108" Action="Warning" />
|
||||
<Rule Id="CA2111" Action="Warning" />
|
||||
<Rule Id="CA2112" Action="Warning" />
|
||||
<Rule Id="CA2114" Action="Warning" />
|
||||
<Rule Id="CA2116" Action="Warning" />
|
||||
<Rule Id="CA2117" Action="Warning" />
|
||||
<Rule Id="CA2122" Action="Warning" />
|
||||
<Rule Id="CA2124" Action="Warning" />
|
||||
<Rule Id="CA2126" Action="Warning" />
|
||||
<Rule Id="CA2131" Action="Warning" />
|
||||
<Rule Id="CA2132" Action="Warning" />
|
||||
<Rule Id="CA2133" Action="Warning" />
|
||||
<Rule Id="CA2137" Action="Warning" />
|
||||
<Rule Id="CA2138" Action="Warning" />
|
||||
<Rule Id="CA2140" Action="Warning" />
|
||||
<Rule Id="CA2141" Action="Warning" />
|
||||
<Rule Id="CA2146" Action="Warning" />
|
||||
<Rule Id="CA2147" Action="Warning" />
|
||||
<Rule Id="CA2149" Action="Warning" />
|
||||
<Rule Id="CA2200" Action="Warning" />
|
||||
<Rule Id="CA2202" Action="Warning" />
|
||||
<Rule Id="CA2207" Action="Warning" />
|
||||
<Rule Id="CA2212" Action="Warning" />
|
||||
<Rule Id="CA2213" Action="Warning" />
|
||||
<Rule Id="CA2214" Action="Warning" />
|
||||
<Rule Id="CA2216" Action="Warning" />
|
||||
<Rule Id="CA2220" Action="Warning" />
|
||||
<Rule Id="CA2229" Action="Warning" />
|
||||
<Rule Id="CA2231" Action="Warning" />
|
||||
<Rule Id="CA2232" Action="Warning" />
|
||||
<Rule Id="CA2235" Action="Warning" />
|
||||
<Rule Id="CA2236" Action="Warning" />
|
||||
<Rule Id="CA2237" Action="Warning" />
|
||||
<Rule Id="CA2238" Action="Warning" />
|
||||
<Rule Id="CA2240" Action="Warning" />
|
||||
<Rule Id="CA2241" Action="Warning" />
|
||||
<Rule Id="CA2242" Action="Warning" />
|
||||
</Rules>
|
||||
</RuleSet>
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
@ -0,0 +1,37 @@
|
|||
function waitUntillInstallation {
|
||||
Write-Host "Function has been called"
|
||||
|
||||
$installComplete = 0
|
||||
|
||||
while($installComplete -le 1)
|
||||
{
|
||||
Write-Host "Test"
|
||||
$msi = Get-Process msiexec -ErrorAction SilentlyContinue
|
||||
if ($msi) {
|
||||
Sleep(10)
|
||||
}
|
||||
else
|
||||
{
|
||||
$installComplete = 2
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#Create Software folder for download
|
||||
New-Item -ItemType Directory -Force -Path C:/Software
|
||||
& { (New-Object System.Net.WebClient).DownloadFile('https://r4---sn-i5uif5t-h55s.gvt1.com/edgedl/android/studio/install/2021.3.1.16/android-studio-2021.3.1.16-windows.exe', 'C:/Software/android-studio-2021.3.1.16-windows.exe') }
|
||||
dir C:/Software
|
||||
C:/Software/android-studio-2021.3.1.16-windows.exe /S
|
||||
Sleep(100)
|
||||
|
||||
waitUntillInstallation
|
||||
|
||||
# SDK installation
|
||||
& { (New-Object System.Net.WebClient).DownloadFile('https://www.syncfusion.com/downloads/support/directtrac/general/ze/android-29-271814436', 'C:/Software/android-29-271814436.zip') }
|
||||
|
||||
#Extract zip file
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory('C:/Software/android-29-271814436.zip', 'C:\Program Files (x86)\Android\android-sdk\platforms')
|
||||
|
||||
waitUntillInstallation
|
|
@ -0,0 +1,116 @@
|
|||
node ('xamarin')
|
||||
{
|
||||
timestamps{
|
||||
stage 'Checkout'
|
||||
try {
|
||||
//checkout the xamarinandroid-samplebrowser Source
|
||||
checkout([$class: 'GitSCM', branches: [[name: '*/$githubSourceBranch']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'xamarinandroid-samplebrowser']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: env.githubCredentialId, url: 'https://github.com/essential-studio/xamarinandroid-samplebrowser.git']]])
|
||||
|
||||
//checkout the essentialstudio-common Source
|
||||
checkout([$class: 'GitSCM', branches: [[name: '*/development']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'essentialstudio-common']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: env.githubCredentialId, url: 'https://github.com/essential-studio/essentialstudio-common.git']]])
|
||||
|
||||
}
|
||||
catch(Exception e) {
|
||||
echo "Exception in 'Checkout' stage \r\n"+ e
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
if(currentBuild.result != 'FAILURE')
|
||||
{
|
||||
stage('Install Software') {
|
||||
try
|
||||
{
|
||||
|
||||
nodejs(nodeJSInstallationName: 'nodejs-16.17.1') {
|
||||
bat 'npm config ls'
|
||||
}
|
||||
|
||||
env.PATH = "C:\\tools\\jenkins.plugins.nodejs.tools.NodeJSInstallation\\nodejs-16.17.1;${env.PATH}"
|
||||
bat 'npm -v'
|
||||
bat 'npm install --location=global appcenter-cli'
|
||||
|
||||
bat 'powershell.exe -ExecutionPolicy ByPass -File ./xamarinandroid-samplebrowser/Install.ps1'
|
||||
echo "Software installation completed"
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
echo "Exception in software installation stage \r\n"+e
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
if(currentBuild.result != 'FAILURE')
|
||||
{
|
||||
stage 'Build Source'
|
||||
try {
|
||||
|
||||
gitlabCommitStatus("Build")
|
||||
{
|
||||
|
||||
bat 'powershell.exe -ExecutionPolicy ByPass -File xamarinandroid-samplebrowser/build/build.ps1 -Script '+env.WORKSPACE+"/xamarinandroid-samplebrowser/build/build.cake -Target build -nugetserverurl "+env.nugetserverurls +' -StudioVersion '+env.studio_version
|
||||
|
||||
}
|
||||
|
||||
def files = findFiles(glob: '**/cireports/errorlogs/*.txt')
|
||||
|
||||
if(files.size() > 0)
|
||||
{
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
echo "Exception in 'Build' stage \r\n"+ e
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
|
||||
if(currentBuild.result != 'FAILURE' && env.publishBranch.contains(githubSourceBranch))
|
||||
{
|
||||
stage 'Publish'
|
||||
try
|
||||
{
|
||||
//method to get release notes content
|
||||
env.PATH = "C:\\Program Files\\Git\\mingw64\\bin;${env.PATH}"
|
||||
def branchCommit = '"'+'https://api.github.com/repos/essential-studio/xamarinandroid-samplebrowser/pulls/'+ env.pullRequestId +'/commits'
|
||||
String branchCommitDetails = bat returnStdout: true, script: 'curl -H "Accept: application/vnd.github.v3+json" -u SyncfusionBuild:' +env.GithubBuildAutomation_PrivateToken+" "+branchCommit
|
||||
def splitMessageDetails = branchCommitDetails.split('"message": "')
|
||||
def releaseNotesContent="";
|
||||
for(int k=1; k<splitMessageDetails.size();k++)
|
||||
{
|
||||
releaseNotesContent += splitMessageDetails[k].split('"tree":')[0].replace("\",","");
|
||||
}
|
||||
if (releaseNotesContent)
|
||||
{
|
||||
writeFile file: env.WORKSPACE+"/cireports/releasenotes/releasenotes.txt", text: releaseNotesContent
|
||||
}
|
||||
else
|
||||
{
|
||||
writeFile file: env.WORKSPACE+"/cireports/releasenotes/releasenotes.txt", text: "No commit details found for this job."
|
||||
}
|
||||
|
||||
|
||||
gitlabCommitStatus("Publish")
|
||||
{
|
||||
bat 'powershell.exe -ExecutionPolicy ByPass -File xamarinandroid-samplebrowser/build/build.ps1 -Script '+env.WORKSPACE+"/xamarinandroid-samplebrowser/build/build.cake -Target publish -apitoken " +env.Hockey_apitoken + " -Scheduler "+env.isScheduler +" -MachineIP "+env.MachineIP+" -SourceBranch "+env.githubSourceBranch
|
||||
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
echo "Exception in 'Publish' stage \r\n"+ e
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
stage 'Delete Workspace'
|
||||
|
||||
// Archiving artifacts when the folder was not empty
|
||||
def files = findFiles(glob: '**/cireports/**/*.*')
|
||||
|
||||
if(files.size() > 0)
|
||||
{
|
||||
archiveArtifacts artifacts: 'cireports/', excludes: null
|
||||
}
|
||||
|
||||
step([$class: 'WsCleanup'])
|
||||
}
|
||||
}
|
|
@ -0,0 +1,326 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System;
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.Widget;
|
||||
using Android.OS;
|
||||
using System.Xml;
|
||||
using System.Collections.Generic;
|
||||
using Android.Telephony;
|
||||
using Android.Content.PM;
|
||||
using Android.Content.Res;
|
||||
using System.Linq;
|
||||
using AndroidX.DrawerLayout.Widget;
|
||||
using AndroidX.Core.View;
|
||||
|
||||
namespace SampleBrowser
|
||||
{
|
||||
[Activity(Label = "Essential Studio", ScreenOrientation = ScreenOrientation.Portrait, Theme = "@style/PropertyApp", Icon = "@drawable/icon")]
|
||||
public class MainActivity : Activity
|
||||
{
|
||||
#region fields
|
||||
|
||||
private GridView listView;
|
||||
|
||||
private LinearLayout drawer;
|
||||
|
||||
private ImageView imageView;
|
||||
|
||||
private List<SampleModel> controls;
|
||||
|
||||
private DrawerLayout drawerLayout;
|
||||
|
||||
private LinearLayout productpage, documentationPage, whatsNewPage;
|
||||
|
||||
#endregion
|
||||
|
||||
#region properties
|
||||
|
||||
public static Intent SelectedIntent { get; set; }
|
||||
|
||||
public static MainActivity BaseActivity { get; set; }
|
||||
|
||||
public static float Factor { get; set; }
|
||||
|
||||
public static float Density { get; set; }
|
||||
|
||||
internal static bool IsTablet { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region methods
|
||||
|
||||
public static bool GetDeviceType(Context context)
|
||||
{
|
||||
return (context.Resources.Configuration.ScreenLayout
|
||||
& ScreenLayout.SizeMask)
|
||||
>= ScreenLayout.SizeLarge;
|
||||
}
|
||||
|
||||
public override void OnBackPressed()
|
||||
{
|
||||
Finish();
|
||||
base.OnBackPressed();
|
||||
}
|
||||
|
||||
protected void OnListItemClick(object sender, AdapterView.ItemClickEventArgs e)
|
||||
{
|
||||
var intent = new Intent(this, typeof(AllControlsSamplePage));
|
||||
SelectedIntent = intent;
|
||||
intent.PutExtra("sample", controls[e.Position]);
|
||||
StartActivity(intent);
|
||||
}
|
||||
|
||||
protected override void OnCreate(Bundle bundle)
|
||||
{
|
||||
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(string.Empty);
|
||||
|
||||
float deviceDenstiy = Resources.DisplayMetrics.Density;
|
||||
Density = deviceDenstiy;
|
||||
Factor = deviceDenstiy / 2.55f;
|
||||
|
||||
base.OnCreate(bundle);
|
||||
|
||||
ParseXML();
|
||||
if (Build.VERSION.SdkInt < BuildVersionCodes.Lollipop)
|
||||
{
|
||||
controls.Remove(controls.First(x => x.Title == "PDFViewer"));
|
||||
}
|
||||
|
||||
SetContentView(Resource.Layout.HomeScreen);
|
||||
ActionBar.Hide();
|
||||
listView = FindViewById<GridView>(Resource.Id.List);
|
||||
BaseActivity = this;
|
||||
|
||||
listView.Adapter = new HomeScreenAdapter(this, controls);
|
||||
listView.ItemClick += OnListItemClick;
|
||||
|
||||
IsTablet = GetDeviceType(this);
|
||||
if (IsTablet)
|
||||
{
|
||||
listView.SetNumColumns(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
listView.SetNumColumns(1);
|
||||
}
|
||||
|
||||
drawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
|
||||
drawer = FindViewById<LinearLayout>(Resource.Id.left_drawer);
|
||||
imageView = FindViewById<ImageView>(Resource.Id.navDrawIcon);
|
||||
productpage = FindViewById<LinearLayout>(Resource.Id.productpagelayout);
|
||||
documentationPage = FindViewById<LinearLayout>(Resource.Id.documentlayout);
|
||||
whatsNewPage = FindViewById<LinearLayout>(Resource.Id.whatsnewlayout);
|
||||
|
||||
var versionText = FindViewById<TextView>(Resource.Id.versionText);
|
||||
versionText.Text = versionText.Text + Resources.GetString(Resource.String.version);
|
||||
drawer.BringToFront();
|
||||
int width = Resources.DisplayMetrics.WidthPixels * 3 / 4;
|
||||
|
||||
if (IsTablet)
|
||||
{
|
||||
width = int.Parse((Resources.DisplayMetrics.WidthPixels * 0.5f).ToString());
|
||||
}
|
||||
|
||||
drawer.LayoutParameters.Width = (int)width;
|
||||
|
||||
imageView.Click += delegate
|
||||
{
|
||||
drawerLayout.OpenDrawer(GravityCompat.Start);
|
||||
};
|
||||
|
||||
productpage.Click += delegate
|
||||
{
|
||||
GoToUrl("https://www.syncfusion.com/products/xamarin");
|
||||
};
|
||||
|
||||
documentationPage.Click += delegate
|
||||
{
|
||||
GoToUrl("https://help.syncfusion.com/xamarin-android/introduction/overview");
|
||||
};
|
||||
|
||||
whatsNewPage.Click += delegate
|
||||
{
|
||||
GoToUrl("https://www.syncfusion.com/products/whatsnew/xamarin-android");
|
||||
};
|
||||
}
|
||||
|
||||
protected override void OnSaveInstanceState(Bundle outState)
|
||||
{
|
||||
outState.PutInt("tab", this.ActionBar.SelectedNavigationIndex);
|
||||
|
||||
base.OnSaveInstanceState(outState);
|
||||
}
|
||||
|
||||
private void GoToUrl(string url)
|
||||
{
|
||||
var intent = new Intent(Intent.ActionView, Android.Net.Uri.Parse(url));
|
||||
StartActivity(intent);
|
||||
}
|
||||
|
||||
private void ParseXML()
|
||||
{
|
||||
var xtr = Resources.GetXml(Resource.Xml.samplelist);
|
||||
xtr.Read();
|
||||
bool featuresamplescompleted = false, controlsamplecompleted = false;
|
||||
while (!xtr.EOF && xtr.Name != null)
|
||||
{
|
||||
var groups = new List<SampleModel>();
|
||||
xtr.Read();
|
||||
|
||||
if (xtr.Name == "FeatureSamples" && !xtr.IsStartElement())
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
xtr.Read();
|
||||
|
||||
while (!featuresamplescompleted)
|
||||
{
|
||||
if (xtr.Name == "Sample" && xtr.IsStartElement())
|
||||
{
|
||||
var tc = new SampleModel();
|
||||
SetSample(tc, xtr);
|
||||
xtr.Read();
|
||||
xtr.Read();
|
||||
}
|
||||
|
||||
if (xtr.Name == "FeatureSamples" && !xtr.IsStartElement())
|
||||
{
|
||||
featuresamplescompleted = true;
|
||||
xtr.Read();
|
||||
}
|
||||
}
|
||||
|
||||
if (xtr.Name == "ControlSamples" && xtr.IsStartElement())
|
||||
{
|
||||
xtr.Read();
|
||||
while (!controlsamplecompleted)
|
||||
{
|
||||
bool grouped = false;
|
||||
while (!grouped)
|
||||
{
|
||||
if (xtr.Name == "Group" && xtr.IsStartElement())
|
||||
{
|
||||
var group = new ControlModel();
|
||||
|
||||
SetSample(group, xtr);
|
||||
xtr.Read();
|
||||
|
||||
var samples = new List<SampleModel>();
|
||||
var features = new List<SampleModel>();
|
||||
bool samplescompleted = false, featurescompleted = false;
|
||||
while (!samplescompleted || !featurescompleted)
|
||||
{
|
||||
if (xtr.Name == "Samples" && xtr.IsStartElement())
|
||||
{
|
||||
xtr.Read();
|
||||
while (!samplescompleted)
|
||||
{
|
||||
if (xtr.Name == "Sample" && xtr.IsStartElement())
|
||||
{
|
||||
var tc = new SampleModel();
|
||||
SetSample(tc, xtr);
|
||||
samples.Add(tc);
|
||||
xtr.Read();
|
||||
xtr.Read();
|
||||
}
|
||||
|
||||
if (xtr.Name == "Samples" && !xtr.IsStartElement())
|
||||
{
|
||||
samplescompleted = true;
|
||||
xtr.Read();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (xtr.Name == "Features" && xtr.IsStartElement())
|
||||
{
|
||||
xtr.Read();
|
||||
while (!featurescompleted)
|
||||
{
|
||||
if (xtr.Name == "Feature" && xtr.IsStartElement())
|
||||
{
|
||||
var tc = new SampleModel();
|
||||
SetSample(tc, xtr);
|
||||
features.Add(tc);
|
||||
xtr.Read();
|
||||
xtr.Read();
|
||||
}
|
||||
|
||||
if (xtr.Name == "Features" && !xtr.IsStartElement())
|
||||
{
|
||||
featurescompleted = true;
|
||||
xtr.Read();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (xtr.Name == "Group" && !xtr.IsStartElement())
|
||||
{
|
||||
grouped = true;
|
||||
groups.Add(group);
|
||||
xtr.Read();
|
||||
featurescompleted = true;
|
||||
samplescompleted = true;
|
||||
group.Samples = samples;
|
||||
group.Features = features;
|
||||
}
|
||||
|
||||
if (xtr.Name == "ControlSamples" && !xtr.IsStartElement())
|
||||
{
|
||||
controlsamplecompleted = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
xtr.Read();
|
||||
if (xtr.Name == "SampleList" && !xtr.IsStartElement())
|
||||
{
|
||||
xtr.Read();
|
||||
}
|
||||
|
||||
controls = groups;
|
||||
}
|
||||
|
||||
xtr.Close();
|
||||
}
|
||||
|
||||
private static void SetSample(SampleModel sample, XmlReader reader)
|
||||
{
|
||||
reader.MoveToAttribute("Name");
|
||||
sample.Name = GetValueFromReader(reader);
|
||||
reader.MoveToAttribute("Title");
|
||||
sample.Title = GetValueFromReader(reader);
|
||||
reader.MoveToAttribute("Description");
|
||||
sample.Description = GetValueFromReader(reader);
|
||||
reader.MoveToAttribute("Type");
|
||||
if (reader.Name == "Type")
|
||||
{
|
||||
sample.Type = GetValueFromReader(reader);
|
||||
}
|
||||
|
||||
reader.MoveToAttribute("ImageId");
|
||||
if (reader.Name == "ImageId")
|
||||
{
|
||||
sample.ImageId = GetValueFromReader(reader);
|
||||
}
|
||||
}
|
||||
|
||||
private static string GetValueFromReader(XmlReader reader)
|
||||
{
|
||||
return reader.Value ?? null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageRestore>
|
||||
<add key="enabled" value="True"/>
|
||||
<add key="automatic" value="True"/>
|
||||
</packageRestore>
|
||||
<packageSources>
|
||||
<add key="Syncfusion Xamarin Source Package 24.1.41" value="https://api.nuget.org/v3/index.json"/></packageSources>
|
||||
<activePackageSource>
|
||||
</activePackageSource>
|
||||
<bindingRedirects>
|
||||
<add key="skip" value="False"/>
|
||||
</bindingRedirects>
|
||||
</configuration>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="16.1" package="XamarinAndroid.SampleBrowser" android:installLocation="auto">
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/>
|
||||
<application android:label="Syncfusion Components for Xamarin.Android" android:largeHeap="true">
|
||||
<provider android:name="androidx.core.content.FileProvider" android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true">
|
||||
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths" />
|
||||
</provider>
|
||||
</application>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
</manifest>
|
|
@ -0,0 +1,20 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyTitle("SampleBrowser")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Syncfusion Inc.")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2001-2023 Syncfusion Inc.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.0.0")]
|
||||
[assembly: ComVisible(false)]
|
|
@ -0,0 +1,44 @@
|
|||
Images, layout descriptions, binary blobs and string dictionaries can be included
|
||||
in your application as resource files. Various Android APIs are designed to
|
||||
operate on the resource IDs instead of dealing with images, strings or binary blobs
|
||||
directly.
|
||||
|
||||
For example, a sample Android app that contains a user interface layout (main.axml),
|
||||
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
|
||||
would keep its resources in the "Resources" directory of the application:
|
||||
|
||||
Resources/
|
||||
drawable/
|
||||
icon.png
|
||||
|
||||
layout/
|
||||
main.axml
|
||||
|
||||
values/
|
||||
strings.xml
|
||||
|
||||
In order to get the build system to recognize Android resources, set the build action to
|
||||
"AndroidResource". The native Android APIs do not operate directly with filenames, but
|
||||
instead operate on resource IDs. When you compile an Android application that uses resources,
|
||||
the build system will package the resources for distribution and generate a class called "R"
|
||||
(this is an Android convention) that contains the tokens for each one of the resources
|
||||
included. For example, for the above Resources layout, this is what the R class would expose:
|
||||
|
||||
public class R {
|
||||
public class drawable {
|
||||
public const int icon = 0x123;
|
||||
}
|
||||
|
||||
public class layout {
|
||||
public const int main = 0x456;
|
||||
}
|
||||
|
||||
public class strings {
|
||||
public const int first_string = 0xabc;
|
||||
public const int second_string = 0xbcd;
|
||||
}
|
||||
}
|
||||
|
||||
You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
|
||||
to reference the layout/main.axml file, or R.strings.first_string to reference the first
|
||||
string in the dictionary file values/strings.xml.
|
После Ширина: | Высота: | Размер: 492 B |
|
@ -0,0 +1,8 @@
|
|||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shareInterpolator="false">
|
||||
<translate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="500"
|
||||
android:fromXDelta="-100%"
|
||||
android:toXDelta="0%" >
|
||||
</translate>
|
||||
</set>
|
|
@ -0,0 +1,8 @@
|
|||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shareInterpolator="false">
|
||||
<translate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="500"
|
||||
android:fromXDelta="0%"
|
||||
android:toXDelta="-100%" >
|
||||
</translate>
|
||||
</set>
|
|
@ -0,0 +1,8 @@
|
|||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shareInterpolator="false">
|
||||
<translate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="500"
|
||||
android:fromXDelta="0%"
|
||||
android:toXDelta="100%" >
|
||||
</translate>
|
||||
</set>
|
|
@ -0,0 +1,8 @@
|
|||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shareInterpolator="false">
|
||||
<translate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="500"
|
||||
android:fromXDelta="100%"
|
||||
android:toXDelta="0%" >
|
||||
</translate>
|
||||
</set>
|
После Ширина: | Высота: | Размер: 1.8 KiB |
После Ширина: | Высота: | Размер: 2.8 KiB |
После Ширина: | Высота: | Размер: 3.1 KiB |
После Ширина: | Высота: | Размер: 2.5 KiB |
После Ширина: | Высота: | Размер: 1.8 KiB |
После Ширина: | Высота: | Размер: 1.9 KiB |
После Ширина: | Высота: | Размер: 2.2 KiB |
После Ширина: | Высота: | Размер: 4.0 KiB |
После Ширина: | Высота: | Размер: 2.0 KiB |
После Ширина: | Высота: | Размер: 2.7 KiB |
После Ширина: | Высота: | Размер: 605 B |
После Ширина: | Высота: | Размер: 556 B |