Skip to content

Commit f288b98

Browse files
committed
Updated sample and read me file
1 parent 006c5c9 commit f288b98

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+928
-2
lines changed

NestedHorizontalListView/HorizontalInVerticalListview.sln

Lines changed: 337 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using System;
2+
3+
using Android.App;
4+
using Android.Content.PM;
5+
using Android.Runtime;
6+
using Android.Views;
7+
using Android.Widget;
8+
using Android.OS;
9+
10+
namespace HorizontalInVerticalListview.Droid
11+
{
12+
[Activity(Label = "HorizontalInVerticalListview", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
13+
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
14+
{
15+
protected override void OnCreate(Bundle savedInstanceState)
16+
{
17+
TabLayoutResource = Resource.Layout.Tabbar;
18+
ToolbarResource = Resource.Layout.Toolbar;
19+
20+
base.OnCreate(savedInstanceState);
21+
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
22+
LoadApplication(new App());
23+
}
24+
}
25+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Application
2+
x:Class="HorizontalInVerticalListview.UWP.App"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:local="using:HorizontalInVerticalListview.UWP"
6+
RequestedTheme="Light">
7+
8+
</Application>
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Linq;
5+
using System.Runtime.InteropServices.WindowsRuntime;
6+
using Windows.ApplicationModel;
7+
using Windows.ApplicationModel.Activation;
8+
using Windows.Foundation;
9+
using Windows.Foundation.Collections;
10+
using Windows.UI.Xaml;
11+
using Windows.UI.Xaml.Controls;
12+
using Windows.UI.Xaml.Controls.Primitives;
13+
using Windows.UI.Xaml.Data;
14+
using Windows.UI.Xaml.Input;
15+
using Windows.UI.Xaml.Media;
16+
using Windows.UI.Xaml.Navigation;
17+
18+
namespace HorizontalInVerticalListview.UWP
19+
{
20+
/// <summary>
21+
/// Provides application-specific behavior to supplement the default Application class.
22+
/// </summary>
23+
sealed partial class App : Application
24+
{
25+
/// <summary>
26+
/// Initializes the singleton application object. This is the first line of authored code
27+
/// executed, and as such is the logical equivalent of main() or WinMain().
28+
/// </summary>
29+
public App()
30+
{
31+
this.InitializeComponent();
32+
this.Suspending += OnSuspending;
33+
}
34+
35+
/// <summary>
36+
/// Invoked when the application is launched normally by the end user. Other entry points
37+
/// will be used such as when the application is launched to open a specific file.
38+
/// </summary>
39+
/// <param name="e">Details about the launch request and process.</param>
40+
protected override void OnLaunched(LaunchActivatedEventArgs e)
41+
{
42+
43+
44+
Frame rootFrame = Window.Current.Content as Frame;
45+
46+
// Do not repeat app initialization when the Window already has content,
47+
// just ensure that the window is active
48+
if (rootFrame == null)
49+
{
50+
// Create a Frame to act as the navigation context and navigate to the first page
51+
rootFrame = new Frame();
52+
53+
rootFrame.NavigationFailed += OnNavigationFailed;
54+
55+
Xamarin.Forms.Forms.Init(e);
56+
57+
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
58+
{
59+
//TODO: Load state from previously suspended application
60+
}
61+
62+
// Place the frame in the current Window
63+
Window.Current.Content = rootFrame;
64+
}
65+
66+
if (rootFrame.Content == null)
67+
{
68+
// When the navigation stack isn't restored navigate to the first page,
69+
// configuring the new page by passing required information as a navigation
70+
// parameter
71+
rootFrame.Navigate(typeof(MainPage), e.Arguments);
72+
}
73+
// Ensure the current window is active
74+
Window.Current.Activate();
75+
}
76+
77+
/// <summary>
78+
/// Invoked when Navigation to a certain page fails
79+
/// </summary>
80+
/// <param name="sender">The Frame which failed navigation</param>
81+
/// <param name="e">Details about the navigation failure</param>
82+
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
83+
{
84+
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
85+
}
86+
87+
/// <summary>
88+
/// Invoked when application execution is being suspended. Application state is saved
89+
/// without knowing whether the application will be terminated or resumed with the contents
90+
/// of memory still intact.
91+
/// </summary>
92+
/// <param name="sender">The source of the suspend request.</param>
93+
/// <param name="e">Details about the suspend request.</param>
94+
private void OnSuspending(object sender, SuspendingEventArgs e)
95+
{
96+
var deferral = e.SuspendingOperation.GetDeferral();
97+
//TODO: Save application state and stop any background activity
98+
deferral.Complete();
99+
}
100+
}
101+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<forms:WindowsPage
2+
x:Class="HorizontalInVerticalListview.UWP.MainPage"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:forms="using:Xamarin.Forms.Platform.UWP"
5+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
6+
xmlns:local="using:HorizontalInVerticalListview.UWP"
7+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
8+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
9+
mc:Ignorable="d"
10+
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
11+
12+
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
13+
14+
</Grid>
15+
</forms:WindowsPage>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Linq;
5+
using System.Runtime.InteropServices.WindowsRuntime;
6+
using Windows.Foundation;
7+
using Windows.Foundation.Collections;
8+
using Windows.UI.Xaml;
9+
using Windows.UI.Xaml.Controls;
10+
using Windows.UI.Xaml.Controls.Primitives;
11+
using Windows.UI.Xaml.Data;
12+
using Windows.UI.Xaml.Input;
13+
using Windows.UI.Xaml.Media;
14+
using Windows.UI.Xaml.Navigation;
15+
16+
namespace HorizontalInVerticalListview.UWP
17+
{
18+
public sealed partial class MainPage
19+
{
20+
public MainPage()
21+
{
22+
this.InitializeComponent();
23+
24+
LoadApplication(new HorizontalInVerticalListview.App());
25+
}
26+
}
27+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<Package
4+
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
5+
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
6+
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
7+
IgnorableNamespaces="uap mp">
8+
9+
<Identity
10+
Name="8f9b96f1-9e72-40f0-abb9-c2a6960519f6"
11+
Publisher="CN=c64d0932-9c0c-4034-bf8c-d3971170fc85"
12+
Version="1.0.0.0" />
13+
14+
<mp:PhoneIdentity PhoneProductId="ec0cc741-fd3e-485c-81be-68815c480690" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
15+
16+
<Properties>
17+
<DisplayName>HorizontalInVerticalListview.UWP</DisplayName>
18+
<PublisherDisplayName>c64d0932-9c0c-4034-bf8c-d3971170fc85</PublisherDisplayName>
19+
<Logo>Assets\StoreLogo.png</Logo>
20+
</Properties>
21+
22+
<Dependencies>
23+
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
24+
</Dependencies>
25+
26+
<Resources>
27+
<Resource Language="x-generate"/>
28+
</Resources>
29+
30+
<Applications>
31+
<Application Id="App"
32+
Executable="$targetnametoken$.exe"
33+
EntryPoint="HorizontalInVerticalListview.UWP.App">
34+
<uap:VisualElements
35+
DisplayName="HorizontalInVerticalListview.UWP"
36+
Square150x150Logo="Assets\Square150x150Logo.png"
37+
Square44x44Logo="Assets\Square44x44Logo.png"
38+
Description="HorizontalInVerticalListview.UWP"
39+
BackgroundColor="transparent">
40+
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" Square310x310Logo="Assets\LargeTile.png" Square71x71Logo="Assets\SmallTile.png">
41+
<uap:ShowNameOnTiles>
42+
<uap:ShowOn Tile="square150x150Logo" />
43+
<uap:ShowOn Tile="wide310x150Logo" />
44+
<uap:ShowOn Tile="square310x310Logo" />
45+
</uap:ShowNameOnTiles>
46+
</uap:DefaultTile>
47+
<uap:SplashScreen Image="Assets\SplashScreen.png" />
48+
</uap:VisualElements>
49+
</Application>
50+
</Applications>
51+
52+
<Capabilities>
53+
<Capability Name="internetClient" />
54+
</Capabilities>
55+
</Package>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
5+
using Foundation;
6+
using Syncfusion.ListView.XForms.iOS;
7+
using UIKit;
8+
9+
namespace HorizontalInVerticalListview.iOS
10+
{
11+
// The UIApplicationDelegate for the application. This class is responsible for launching the
12+
// User Interface of the application, as well as listening (and optionally responding) to
13+
// application events from iOS.
14+
[Register("AppDelegate")]
15+
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
16+
{
17+
//
18+
// This method is invoked when the application has loaded and is ready to run. In this
19+
// method you should instantiate the window, load the UI into it and then make the window
20+
// visible.
21+
//
22+
// You have 17 seconds to return from this method, or iOS will terminate your application.
23+
//
24+
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
25+
{
26+
global::Xamarin.Forms.Forms.Init();
27+
SfListViewRenderer.Init();
28+
LoadApplication(new App());
29+
30+
return base.FinishedLaunching(app, options);
31+
}
32+
}
33+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
</dict>
6+
</plist>
7+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>UIDeviceFamily</key>
6+
<array>
7+
<integer>1</integer>
8+
<integer>2</integer>
9+
</array>
10+
<key>UISupportedInterfaceOrientations</key>
11+
<array>
12+
<string>UIInterfaceOrientationPortrait</string>
13+
<string>UIInterfaceOrientationLandscapeLeft</string>
14+
<string>UIInterfaceOrientationLandscapeRight</string>
15+
</array>
16+
<key>UISupportedInterfaceOrientations~ipad</key>
17+
<array>
18+
<string>UIInterfaceOrientationPortrait</string>
19+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
20+
<string>UIInterfaceOrientationLandscapeLeft</string>
21+
<string>UIInterfaceOrientationLandscapeRight</string>
22+
</array>
23+
<key>MinimumOSVersion</key>
24+
<string>8.0</string>
25+
<key>CFBundleDisplayName</key>
26+
<string>HorizontalInVerticalListview</string>
27+
<key>CFBundleIdentifier</key>
28+
<string>com.companyname.HorizontalInVerticalListview</string>
29+
<key>CFBundleVersion</key>
30+
<string>1.0</string>
31+
<key>UILaunchStoryboardName</key>
32+
<string>LaunchScreen</string>
33+
<key>CFBundleName</key>
34+
<string>HorizontalInVerticalListview</string>
35+
<key>XSAppIconAssets</key>
36+
<string>Assets.xcassets/AppIcon.appiconset</string>
37+
</dict>
38+
</plist>

0 commit comments

Comments
 (0)