-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use WeakRef for Single ViewModel Cache (#4661)
* Make reference to cached VM weak * Navigate to CollectionView with parameters * Fix sample ditching FFImageLoading and using Glide * No need for this check * Fix colors not showing on collection view sample
- Loading branch information
1 parent
1850efc
commit b351cfd
Showing
12 changed files
with
102 additions
and
44 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
2 changes: 0 additions & 2 deletions
2
Projects/Playground/Playground.Droid/Activities/CollectionView.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
45 changes: 45 additions & 0 deletions
45
Projects/Playground/Playground.Droid/Activities/GlideImageView.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,45 @@ | ||
using Android.Content; | ||
using Android.Runtime; | ||
using Android.Util; | ||
using Bumptech.Glide; | ||
|
||
namespace Playground.Droid.Activities; | ||
|
||
[Register("playground.droid.GlideImageView")] | ||
public sealed class GlideImageView : ImageView | ||
{ | ||
private string _imagePath; | ||
|
||
public string ImagePath | ||
{ | ||
get => _imagePath; | ||
set | ||
{ | ||
if (value == null) | ||
return; | ||
|
||
_imagePath = value; | ||
Glide.With(Context).Load(_imagePath).Into(this); | ||
} | ||
} | ||
|
||
public GlideImageView(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer) | ||
{ | ||
} | ||
|
||
public GlideImageView(Context context) : base(context) | ||
{ | ||
} | ||
|
||
public GlideImageView(Context context, IAttributeSet attrs) : base(context, attrs) | ||
{ | ||
} | ||
|
||
public GlideImageView(Context context, IAttributeSet attrs, int defStyleAttr) : base(context, attrs, defStyleAttr) | ||
{ | ||
} | ||
|
||
public GlideImageView(Context context, IAttributeSet attrs, int defStyleAttr, int defStyleRes) : base(context, attrs, defStyleAttr, defStyleRes) | ||
{ | ||
} | ||
} |
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