Skip to content

Commit

Permalink
Update sample, remove android support dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
SIDOVSKY committed Nov 16, 2020
1 parent 3188116 commit 75d9f41
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<tags>xamarin android monodroid xamarin.android</tags>
<dependencies>
<group targetFramework="MonoAndroid">
<dependency id="Xamarin.Android.Support.Annotations" version="28.0.0" />
</group>
</dependencies>
</metadata>
Expand Down
5 changes: 2 additions & 3 deletions PDFView-Android.Sample/MainActivity.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
using Android.App;
using Android.OS;
using Android.Support.V7.App;

namespace PDFViewAndroid.Sample
{
[Activity(
Label = "@string/app_name",
Theme = "@style/AppTheme.NoActionBar",
Theme = "@style/AppTheme",
MainLauncher = true)]
public class MainActivity : AppCompatActivity
public class MainActivity : Activity
{
protected override void OnCreate(Bundle savedInstanceState)
{
Expand Down
13 changes: 6 additions & 7 deletions PDFView-Android.Sample/PDFView-Android.Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<AndroidResgenClass>Resource</AndroidResgenClass>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v11.0</TargetFrameworkVersion>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
Expand Down Expand Up @@ -52,6 +52,10 @@
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
<EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>
<AndroidSupportedAbis>armeabi-v7a;x86</AndroidSupportedAbis>
<AotAssemblies>false</AotAssemblies>
<EnableLLVM>false</EnableLLVM>
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
<BundleAssemblies>false</BundleAssemblies>
</PropertyGroup>
<ItemGroup>
<Reference Include="Java.Interop" />
Expand All @@ -72,7 +76,7 @@
<None Include="Properties\AndroidManifest.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\activity_main.axml">
<AndroidResource Include="Resources\layout\activity_main.xml">
<SubType>Designer</SubType>
</AndroidResource>
<AndroidResource Include="Resources\values\colors.xml" />
Expand All @@ -98,11 +102,6 @@
<AndroidResource Include="Resources\mipmap-xxxhdpi\ic_launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\ic_launcher_round.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.0" />
<PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="28.0.0.0" />
<PackageReference Include="Xamarin.Android.Support.CustomTabs" Version="28.0.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PDFView-Android.Bindings\PDFView-Android.Bindings.csproj">
<Project>{778f8d74-2e07-42aa-b456-a9b7ec012358}</Project>
Expand Down
4 changes: 2 additions & 2 deletions PDFView-Android.Sample/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="pdfview_android.sample" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"></application>
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30" />
<application android:allowBackup="false" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand All @@ -8,4 +8,4 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />

</android.support.design.widget.CoordinatorLayout>
</FrameLayout>
15 changes: 1 addition & 14 deletions PDFView-Android.Sample/Resources/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<style name="AppTheme" parent="@android:style/Theme.NoTitleBar">
</style>

<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>

<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

</resources>

0 comments on commit 75d9f41

Please sign in to comment.