Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Commit 8f55863

Browse filesBrowse files
committed
Update Android native sample
1 parent b592d64 commit 8f55863
Copy full SHA for 8f55863

File tree

Expand file treeCollapse file tree

8 files changed

+6666
-3313
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+6666
-3313
lines changed

‎samples/SampleApp/BaseFragment.cs

Copy file name to clipboardExpand all lines: samples/SampleApp/BaseFragment.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Android.Support.V4.App;
1+
using AndroidX.Fragment.App;
22

33
namespace SampleApp
44
{

‎samples/SampleApp/ListFragment.cs

Copy file name to clipboardExpand all lines: samples/SampleApp/ListFragment.cs
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using Android.Content;
2-
using Android.Support.V7.Widget;
32
using Android.Views;
4-
3+
using AndroidX.RecyclerView.Widget;
4+
55
namespace SampleApp
66
{
77
public class ListFragment : BaseFragment
@@ -58,7 +58,7 @@ public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int
5858

5959
class Holder : RecyclerView.ViewHolder
6060
{
61-
public Holder(View itemView) : base(itemView) {}
61+
public Holder(View itemView) : base(itemView) { }
6262
}
6363
}
6464
}

‎samples/SampleApp/MainActivity.cs

Copy file name to clipboardExpand all lines: samples/SampleApp/MainActivity.cs
+11-12Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
using Android.Content.PM;
44
using Android.Graphics.Drawables;
55
using Android.OS;
6-
using Android.Support.Design.Widget;
7-
using Android.Support.V4.App;
8-
using Android.Support.V4.View;
9-
using Android.Support.V7.App;
106
using Android.Views;
117
using Android.Widget;
128
using Java.Lang;
139
using Com.EightbitLab.BlurViewBinding;
14-
//using Com.EightbitLab.SupportRenderScriptBlurBinding;
15-
16-
// Ported from:
17-
// https://github.com/Dimezis/BlurView/blob/master/app/src/main/java/com/eightbitlab/blurview_sample/MainActivity.java
10+
using AndroidX.ViewPager.Widget;
11+
using AndroidX.AppCompat.App;
12+
using Google.Android.Material.Tabs;
13+
using AndroidX.Fragment.App;
14+
//using Com.EightbitLab.SupportRenderScriptBlurBinding;
15+
16+
// Ported from:
17+
// https://github.com/Dimezis/BlurView/blob/b5f6f414ae16885acb709fe5a65d24df05c4c62a/app/src/main/java/com/eightbitlab/blurview_sample/MainActivity.java
1818
namespace SampleApp
1919
{
2020
[Activity(
@@ -63,7 +63,6 @@ void SetupBlurView()
6363
.SetBlurRadius(radius)
6464
.SetHasFixedTransformationMatrix(true);
6565

66-
6766
var bottomViewSettings = bottomBlurView.SetupWith(root)
6867
.SetFrameClearDrawable(windowBackground)
6968
.SetBlurAlgorithm(new RenderScriptBlur(this)) // SupportRenderScriptBlur
@@ -94,8 +93,8 @@ class ViewPagerAdapter : FragmentPagerAdapter
9493
{
9594
List<BaseFragment> pages;
9695

97-
public ViewPagerAdapter(Android.Support.V4.App.FragmentManager fragmentManager)
98-
: base(fragmentManager)
96+
public ViewPagerAdapter(AndroidX.Fragment.App.FragmentManager fragmentManager)
97+
: base(fragmentManager, BehaviorResumeOnlyCurrentFragment)
9998
{
10099
pages = new List<BaseFragment>
101100
{
@@ -107,7 +106,7 @@ public ViewPagerAdapter(Android.Support.V4.App.FragmentManager fragmentManager)
107106

108107
public override int Count => pages.Count;
109108

110-
public override Android.Support.V4.App.Fragment GetItem(int position)
109+
public override AndroidX.Fragment.App.Fragment GetItem(int position)
111110
{
112111
return pages[position];
113112
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.