Skip to content

Commit 07c6b22

Browse files
authored
Merge pull request #99 from Gamhub-io/develop
Develop
2 parents 9ea56fe + 8ab60f9 commit 07c6b22

Some content is hidden

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

59 files changed

+10665
-3747
lines changed

AresNews/AresNews.Android/AresNews.Android.csproj

+28-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
1818
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
1919
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
20-
<TargetFrameworkVersion>v12.0</TargetFrameworkVersion>
20+
<TargetFrameworkVersion>v13.0</TargetFrameworkVersion>
2121
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
2222
<AndroidUseAapt2>true</AndroidUseAapt2>
2323
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
@@ -90,26 +90,44 @@
9090
<Reference Include="System.Numerics.Vectors" />
9191
</ItemGroup>
9292
<ItemGroup>
93+
<PackageReference Include="Rg.Plugins.Popup">
94+
<Version>2.1.0</Version>
95+
</PackageReference>
96+
<PackageReference Include="Sharpnado.CollectionView">
97+
<Version>2.1.0</Version>
98+
</PackageReference>
99+
<PackageReference Include="Sharpnado.Tabs">
100+
<Version>2.2.0</Version>
101+
</PackageReference>
93102
<PackageReference Include="sqlite-net-pcl">
94103
<Version>1.8.116</Version>
95104
</PackageReference>
96105
<PackageReference Include="SQLiteNetExtensions">
97106
<Version>2.1.0</Version>
98107
</PackageReference>
108+
<PackageReference Include="System.Net.Http">
109+
<Version>4.3.4</Version>
110+
</PackageReference>
99111
<PackageReference Include="Xam.Plugin.HtmlLabel">
100112
<Version>5.1.0</Version>
101113
</PackageReference>
102114
<PackageReference Include="Xamarin.Android.Support.Design">
103115
<Version>28.0.0.3</Version>
104116
</PackageReference>
117+
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.Core.UI">
118+
<Version>1.0.0.21</Version>
119+
</PackageReference>
120+
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData">
121+
<Version>2.6.2.1</Version>
122+
</PackageReference>
105123
<PackageReference Include="Xamarin.CommunityToolkit">
106-
<Version>2.0.5</Version>
124+
<Version>2.0.6</Version>
107125
</PackageReference>
108126
<PackageReference Include="Xamarin.FFImageLoading.Forms">
109127
<Version>2.4.11.982</Version>
110128
</PackageReference>
111-
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2545" />
112-
<PackageReference Include="Xamarin.Essentials" Version="1.7.4" />
129+
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2612" />
130+
<PackageReference Include="Xamarin.Essentials" Version="1.8.0" />
113131
</ItemGroup>
114132
<ItemGroup>
115133
<Compile Include="MainActivity.cs" />
@@ -159,6 +177,12 @@
159177
<ItemGroup>
160178
<AndroidResource Include="Resources\drawable\GamHubLogo.png" />
161179
</ItemGroup>
180+
<ItemGroup>
181+
<AndroidResource Include="Resources\layout\custom_tab_layout.xml" />
182+
</ItemGroup>
183+
<ItemGroup>
184+
<Folder Include="Layouts\" />
185+
</ItemGroup>
162186
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
163187
<ProjectExtensions>
164188
<VisualStudio>

AresNews/AresNews.Android/MainActivity.cs

+11
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
using Android.Views;
55
using Android.OS;
66
using LabelHtml.Forms.Plugin.Droid;
7+
using Sharpnado.CollectionView.Droid;
8+
using FFImageLoading.Forms.Platform;
9+
using FFImageLoading;
10+
using FFImageLoading.Config;
11+
using System.Net.Http;
712

813
namespace AresNews.Droid
914
{
@@ -23,8 +28,14 @@ protected override void OnCreate(Bundle savedInstanceState)
2328

2429
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
2530
HtmlLabelRenderer.Initialize();
31+
Rg.Plugins.Popup.Popup.Init(this);
2632
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
33+
34+
Initializer.Initialize(enableInternalLogger: true, enableInternalDebugLogger: true);
2735
FFImageLoading.Forms.Platform.CachedImageRenderer.Init(true);
36+
CachedImageRenderer.Init(true);
37+
38+
ImageService.Instance.Initialize(new FFImageLoading.Config.Configuration { HttpClient = new HttpClient() });
2839
LoadApplication(new App());
2940

3041
if (Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.Lollipop)

AresNews/AresNews.Android/Resources/Resource.designer.cs

+7,458-3,581
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="wrap_content"
4+
android:layout_height="wrap_content"
5+
android:columnCount="1"
6+
android:rowCount="2"
7+
android:layout_gravity="center">
8+
9+
<ImageView
10+
android:id="@+id/icon"
11+
android:layout_width="wrap_content"
12+
android:layout_height="wrap_content"
13+
android:layout_gravity="center"
14+
android:scaleType="centerInside"
15+
android:layout_row="0"
16+
android:layout_column="0"
17+
android:contentDescription="@android:id/title" />
18+
19+
<TextView
20+
android:id="@+id/title"
21+
android:layout_width="wrap_content"
22+
android:layout_height="wrap_content"
23+
android:textAppearance="?android:attr/textAppearanceSmall"
24+
android:textColor="?android:attr/textColorPrimary"
25+
android:gravity="center"
26+
android:layout_row="1"
27+
android:text="@android:id/title"
28+
android:layout_column="0" />
29+
30+
</GridLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using Android.App;
2+
using Android.Content;
3+
using Android.OS;
4+
using Android.Runtime;
5+
using Android.Views;
6+
using Android.Views.InputMethods;
7+
using Android.Widget;
8+
using AresNews.Helpers.Tools;
9+
using System;
10+
using System.Collections.Generic;
11+
using System.Linq;
12+
using System.Text;
13+
using Xamarin.Forms;
14+
15+
namespace AresNews.Droid.Services
16+
{
17+
public class DroidKeyboardHelper : IKeyboardHelper
18+
{
19+
public void HideKeyboard()
20+
{
21+
var context = Forms.Context;
22+
var inputMethodManager = context.GetSystemService(Context.InputMethodService) as InputMethodManager;
23+
if (inputMethodManager != null && context is Activity)
24+
{
25+
var activity = context as Activity;
26+
var token = activity.CurrentFocus?.WindowToken;
27+
inputMethodManager.HideSoftInputFromWindow(token, HideSoftInputFlags.None);
28+
29+
activity.Window.DecorView.ClearFocus();
30+
}
31+
}
32+
}
33+
34+
}

AresNews/AresNews.iOS/AppDelegate.cs

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
using Foundation;
66
using LabelHtml.Forms.Plugin.iOS;
7+
using Sharpnado.CollectionView.iOS;
78
using UIKit;
89

910
namespace AresNews.iOS
@@ -24,7 +25,10 @@ public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsAppli
2425
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
2526
{
2627
HtmlLabelRenderer.Initialize();
28+
Rg.Plugins.Popup.Popup.Init();
29+
Initializer.Initialize();
2730
global::Xamarin.Forms.Forms.Init();
31+
Sharpnado.Tabs.iOS.Preserver.Preserve();
2832
FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
2933
LoadApplication(new App());
3034

AresNews/AresNews.iOS/AresNews.iOS.csproj

+17-8
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
<ErrorReport>prompt</ErrorReport>
2626
<WarningLevel>4</WarningLevel>
2727
<MtouchArch>x86_64</MtouchArch>
28-
<MtouchLink>None</MtouchLink>
28+
<MtouchLink>SdkOnly</MtouchLink>
2929
<MtouchDebug>true</MtouchDebug>
30-
<CodesignKey>Apple Development: Brice Friha (H63WXT9HFN)</CodesignKey>
31-
<CodesignProvision>VS: WildCard Development</CodesignProvision>
30+
<CodesignKey>iPhone Developer</CodesignKey>
31+
<CodesignProvision>VS: com.bricefriha.aresgaming Development</CodesignProvision>
3232
</PropertyGroup>
3333
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
3434
<DebugType>none</DebugType>
@@ -48,12 +48,12 @@
4848
<ErrorReport>prompt</ErrorReport>
4949
<WarningLevel>4</WarningLevel>
5050
<MtouchArch>ARM64</MtouchArch>
51-
<CodesignKey>Apple Development: Brice Friha (H63WXT9HFN)</CodesignKey>
51+
<CodesignKey>iPhone Developer</CodesignKey>
5252
<MtouchDebug>true</MtouchDebug>
5353
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
5454
<MtouchLink>None</MtouchLink>
5555
<MtouchInterpreter>-all</MtouchInterpreter>
56-
<CodesignProvision>VS: WildCard Development</CodesignProvision>
56+
<CodesignProvision>VS: com.bricefriha.aresgaming Development</CodesignProvision>
5757
</PropertyGroup>
5858
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
5959
<DebugType>none</DebugType>
@@ -164,17 +164,26 @@
164164
<Reference Include="System.Numerics.Vectors" />
165165
</ItemGroup>
166166
<ItemGroup>
167+
<PackageReference Include="Rg.Plugins.Popup">
168+
<Version>2.1.0</Version>
169+
</PackageReference>
170+
<PackageReference Include="Sharpnado.CollectionView">
171+
<Version>2.1.0</Version>
172+
</PackageReference>
173+
<PackageReference Include="Sharpnado.Tabs">
174+
<Version>2.2.0</Version>
175+
</PackageReference>
167176
<PackageReference Include="SQLiteNetExtensions">
168177
<Version>2.1.0</Version>
169178
</PackageReference>
170179
<PackageReference Include="Xamarin.CommunityToolkit">
171-
<Version>2.0.5</Version>
180+
<Version>2.0.6</Version>
172181
</PackageReference>
173182
<PackageReference Include="Xamarin.FFImageLoading.Forms">
174183
<Version>2.4.11.982</Version>
175184
</PackageReference>
176-
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2545" />
177-
<PackageReference Include="Xamarin.Essentials" Version="1.7.4" />
185+
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2612" />
186+
<PackageReference Include="Xamarin.Essentials" Version="1.8.0" />
178187
</ItemGroup>
179188
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
180189
<ItemGroup>

AresNews/AresNews.iOS/Info.plist

+10-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,15 @@
2323
<array>
2424
<string>mailto</string>
2525
</array>
26+
<key>UIApplicationSceneManifest</key>
27+
<dict>
28+
<key>UIApplicationSupportsMultipleScenes</key>
29+
<true/>
30+
<key>UISceneConfigurations</key>
31+
<dict/>
32+
</dict>
2633
<key>MinimumOSVersion</key>
27-
<string>15.4</string>
34+
<string>15.3</string>
2835
<key>CFBundleDisplayName</key>
2936
<string>GamHub</string>
3037
<key>CFBundleIdentifier</key>
@@ -43,8 +50,8 @@
4350
<string>LaunchScreen</string>
4451
<key>UIApplicationSceneManifest</key>
4552
<dict>
46-
<key>UIApplicationSupportsMultipleScenes</key>
47-
<false/>
53+
4854
</dict>
55+
4956
</dict>
5057
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Foundation;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using UIKit;
7+
8+
namespace AresNews.iOS.Services
9+
{
10+
public class iOSKeyboardHelper : IKeyboardHelper
11+
{
12+
public void HideKeyboard()
13+
{
14+
UIApplication.SharedApplication.KeyWindow.EndEditing(true);
15+
}
16+
}
17+
}

AresNews/AresNews/App.xaml

+12-1
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,37 @@
66
<Application.Resources>
77
<ResourceDictionary>
88
<Color x:Key="Primary" >#84D1AC</Color>
9+
<Color x:Key="SelectionColor" >#528e70</Color>
10+
<Color x:Key="PrimaryAccent" >#1DB954</Color>
911
<Color x:Key="Secondary" >#666666</Color>
1012
<Color x:Key="Alternate">#8B8E92</Color>
11-
<Color x:Key="Dark" >#1a1a1a</Color>
13+
<Color x:Key="Dark" >#191414</Color>
1214
<Color x:Key="DarkSecondary" >#4A4A4A</Color>
1315
<Color x:Key="LightDark" >#404348</Color>
1416
<Color x:Key="Light" >#9FDBBE</Color>
1517
<Color x:Key="FontColor" >#ecebeb</Color>
18+
<Color x:Key="BgBannerColor" >#262626</Color>
1619
<!--
1720
Potential future colour scheme:
1821
<Color x:Key="Light">#87afc5</Color>
1922
<Color x:Key="Primary">#5f94b1</Color>
2023
-->
2124
</ResourceDictionary>
25+
26+
<!-- Converters-->
2227
<helpers:BoolToBookmarkConveter x:Key="BoolToBookmarkConveter"/>
2328
<helpers:MultipleTOBoolConverter x:Key="MultipleTOBoolConverter"/>
29+
<helpers:MaxLengthConverter x:Key="MaxLengthConverter"/>
30+
<helpers:ThumbnailConverter x:Key="ThumbnailConverter"/>
31+
<helpers:BoolInverseConverter x:Key="BoolInverseConverter"/>
32+
<helpers:ZeroToFalseConverter x:Key="ZeroToFalseConverter"/>
33+
2434
<ResourceDictionary>
2535
<OnPlatform x:Key="TitleRightMargin"
2636
x:TypeArguments="GridLength"
2737
iOS="2*" Android="1.9*" />
2838
</ResourceDictionary>
39+
2940
<!-- Converter to convert time span to string-->
3041
<helpers:TimeSpanConverter x:Key="TimeSpanConverter"/>
3142

0 commit comments

Comments
 (0)