-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c643a4a
commit dd1e6b3
Showing
370 changed files
with
20,941 additions
and
19,737 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/ReactiveUI.AndroidSupport/ReactivePagerAdapter{TViewModel,TCollection}.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved. | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for full license information. | ||
|
||
namespace ReactiveUI.AndroidSupport; | ||
|
||
/// <summary> | ||
/// ReactivePagerAdapter is a PagerAdapter that will interface with a | ||
/// Observable change set, in a similar fashion to ReactiveTableViewSource. | ||
/// </summary> | ||
/// <typeparam name="TViewModel">The view model type.</typeparam> | ||
/// <typeparam name="TCollection">The type of collection.</typeparam> | ||
/// <remarks> | ||
/// Initializes a new instance of the <see cref="ReactivePagerAdapter{TViewModel, TCollection}"/> class. | ||
/// </remarks> | ||
/// <param name="collection">The collection to page.</param> | ||
/// <param name="viewCreator">The function which will create the view.</param> | ||
/// <param name="viewInitializer">A action which will initialize the view.</param> | ||
public class ReactivePagerAdapter<TViewModel, TCollection>( | ||
TCollection collection, | ||
Func<TViewModel, ViewGroup, View> viewCreator, | ||
Action<TViewModel, View>? viewInitializer = null) : ReactivePagerAdapter<TViewModel>(collection.ToObservableChangeSet<TCollection, TViewModel>(), viewCreator, viewInitializer) | ||
where TViewModel : class | ||
where TCollection : INotifyCollectionChanged, IEnumerable<TViewModel> | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewAdapter{TViewModel,TCollection}.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved. | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for full license information. | ||
|
||
namespace ReactiveUI.AndroidSupport; | ||
|
||
/// <summary> | ||
/// An adapter for the Android <see cref="RecyclerView"/>. | ||
/// Override the <see cref="RecyclerView.Adapter.CreateViewHolder(ViewGroup, int)"/> method | ||
/// to create the your <see cref="ReactiveRecyclerViewViewHolder{TViewModel}"/> based ViewHolder. | ||
/// </summary> | ||
/// <typeparam name="TViewModel">The type of ViewModel that this adapter holds.</typeparam> | ||
/// <typeparam name="TCollection">The type of collection.</typeparam> | ||
public abstract class ReactiveRecyclerViewAdapter<TViewModel, TCollection> : ReactiveRecyclerViewAdapter<TViewModel> | ||
where TViewModel : class, IReactiveObject | ||
where TCollection : ICollection<TViewModel>, INotifyCollectionChanged | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ReactiveRecyclerViewAdapter{TViewModel, TCollection}"/> class. | ||
/// </summary> | ||
/// <param name="backingList">The backing list.</param> | ||
protected ReactiveRecyclerViewAdapter(TCollection backingList) | ||
: base(backingList.ToObservableChangeSet<TCollection, TViewModel>()) | ||
{ | ||
} | ||
} |
Oops, something went wrong.