-
Notifications
You must be signed in to change notification settings - Fork 0
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
dc31fe9
commit 9c1b0c0
Showing
140 changed files
with
41,608 additions
and
5 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
16 changes: 16 additions & 0 deletions
16
Xamarin/SimpleLoginApp/SimpleLoginApp/SimpleLoginApp/HomePage.xaml
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,16 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="SimpleLoginApp.HomePage" | ||
Title="Home Page" | ||
NavigationPage.HasBackButton="False"> | ||
<ContentPage.Content> | ||
<StackLayout> | ||
<Label Text="Welcome to Home Page" | ||
x:Name="lblInfo" | ||
VerticalOptions="CenterAndExpand" | ||
HorizontalOptions="CenterAndExpand" | ||
FontSize="Large"/> | ||
</StackLayout> | ||
</ContentPage.Content> | ||
</ContentPage> |
21 changes: 21 additions & 0 deletions
21
Xamarin/SimpleLoginApp/SimpleLoginApp/SimpleLoginApp/HomePage.xaml.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,21 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
using Xamarin.Forms; | ||
using Xamarin.Forms.Xaml; | ||
|
||
namespace SimpleLoginApp | ||
{ | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
public partial class HomePage : ContentPage | ||
{ | ||
public HomePage(string userName) | ||
{ | ||
InitializeComponent(); | ||
lblInfo.Text = "Welcome to Home Page " + userName; | ||
} | ||
} | ||
} |
3 changes: 2 additions & 1 deletion
3
Xamarin/SimpleLoginApp/SimpleLoginApp/SimpleLoginApp/LoginPage.xaml
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
3 changes: 2 additions & 1 deletion
3
Xamarin/SimpleLoginApp/SimpleLoginApp/SimpleLoginApp/MainPage.xaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.31410.357 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkingWithImages.Android", "WorkingWithImages\WorkingWithImages.Android\WorkingWithImages.Android.csproj", "{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkingWithImages.iOS", "WorkingWithImages\WorkingWithImages.iOS\WorkingWithImages.iOS.csproj", "{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkingWithImages", "WorkingWithImages\WorkingWithImages\WorkingWithImages.csproj", "{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|iPhone = Debug|iPhone | ||
Debug|iPhoneSimulator = Debug|iPhoneSimulator | ||
Release|Any CPU = Release|Any CPU | ||
Release|iPhone = Release|iPhone | ||
Release|iPhoneSimulator = Release|iPhoneSimulator | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}.Debug|Any CPU.Deploy.0 = Debug|Any CPU | ||
{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}.Debug|iPhone.ActiveCfg = Debug|Any CPU | ||
{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}.Debug|iPhone.Build.0 = Debug|Any CPU | ||
{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}.Debug|iPhone.Deploy.0 = Debug|Any CPU | ||
{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU | ||
{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU | ||
{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU | ||
{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}.Release|Any CPU.Deploy.0 = Release|Any CPU | ||
{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}.Release|iPhone.ActiveCfg = Release|Any CPU | ||
{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}.Release|iPhone.Build.0 = Release|Any CPU | ||
{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}.Release|iPhone.Deploy.0 = Release|Any CPU | ||
{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU | ||
{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU | ||
{6950C0DF-4216-4DE4-AF4C-D9EB90493B9B}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU | ||
{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}.Debug|Any CPU.ActiveCfg = Debug|iPhone | ||
{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}.Debug|Any CPU.Build.0 = Debug|iPhone | ||
{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}.Debug|Any CPU.Deploy.0 = Debug|iPhone | ||
{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}.Debug|iPhone.ActiveCfg = Debug|iPhone | ||
{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}.Debug|iPhone.Build.0 = Debug|iPhone | ||
{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}.Debug|iPhone.Deploy.0 = Debug|iPhone | ||
{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator | ||
{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator | ||
{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}.Debug|iPhoneSimulator.Deploy.0 = Debug|iPhoneSimulator | ||
{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator | ||
{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}.Release|Any CPU.Build.0 = Release|iPhoneSimulator | ||
{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}.Release|Any CPU.Deploy.0 = Release|iPhoneSimulator | ||
{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}.Release|iPhone.ActiveCfg = Release|iPhone | ||
{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}.Release|iPhone.Build.0 = Release|iPhone | ||
{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}.Release|iPhone.Deploy.0 = Release|iPhone | ||
{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator | ||
{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator | ||
{8CC31892-C9BF-43A3-A9FB-CC8B553EF38D}.Release|iPhoneSimulator.Deploy.0 = Release|iPhoneSimulator | ||
{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}.Debug|Any CPU.Deploy.0 = Debug|Any CPU | ||
{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}.Debug|iPhone.ActiveCfg = Debug|Any CPU | ||
{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}.Debug|iPhone.Build.0 = Debug|Any CPU | ||
{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}.Debug|iPhone.Deploy.0 = Debug|Any CPU | ||
{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU | ||
{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU | ||
{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU | ||
{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}.Release|Any CPU.Deploy.0 = Release|Any CPU | ||
{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}.Release|iPhone.ActiveCfg = Release|Any CPU | ||
{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}.Release|iPhone.Build.0 = Release|Any CPU | ||
{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}.Release|iPhone.Deploy.0 = Release|Any CPU | ||
{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU | ||
{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}.Release|iPhoneSimulator.Build.0 = Release|Any CPU | ||
{3319C932-01A1-4FD5-B0A8-E160AC56CFD2}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {BCC05597-A0AB-4AFA-B34B-FE5A8CF5F202} | ||
EndGlobalSection | ||
EndGlobal |
19 changes: 19 additions & 0 deletions
19
Xamarin/WorkingWithImages/WorkingWithImages/WorkingWithImages.Android/Assets/AboutAssets.txt
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,19 @@ | ||
Any raw assets you want to be deployed with your application can be placed in | ||
this directory (and child directories) and given a Build Action of "AndroidAsset". | ||
|
||
These files will be deployed with your package and will be accessible using Android's | ||
AssetManager, like this: | ||
|
||
public class ReadAsset : Activity | ||
{ | ||
protected override void OnCreate (Bundle bundle) | ||
{ | ||
base.OnCreate (bundle); | ||
|
||
InputStream input = Assets.Open ("my_asset.txt"); | ||
} | ||
} | ||
|
||
Additionally, some Android functions will automatically load asset files: | ||
|
||
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); |
28 changes: 28 additions & 0 deletions
28
Xamarin/WorkingWithImages/WorkingWithImages/WorkingWithImages.Android/MainActivity.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,28 @@ | ||
using System; | ||
|
||
using Android.App; | ||
using Android.Content.PM; | ||
using Android.Runtime; | ||
using Android.OS; | ||
|
||
namespace WorkingWithImages.Droid | ||
{ | ||
[Activity(Label = "WorkingWithImages", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize )] | ||
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity | ||
{ | ||
protected override void OnCreate(Bundle savedInstanceState) | ||
{ | ||
base.OnCreate(savedInstanceState); | ||
|
||
Xamarin.Essentials.Platform.Init(this, savedInstanceState); | ||
global::Xamarin.Forms.Forms.Init(this, savedInstanceState); | ||
LoadApplication(new App()); | ||
} | ||
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults) | ||
{ | ||
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults); | ||
|
||
base.OnRequestPermissionsResult(requestCode, permissions, grantResults); | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...kingWithImages/WorkingWithImages/WorkingWithImages.Android/Properties/AndroidManifest.xml
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,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="com.companyname.workingwithimages"> | ||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30" /> | ||
<application android:label="WorkingWithImages.Android" android:theme="@style/MainTheme"></application> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
</manifest> |
30 changes: 30 additions & 0 deletions
30
.../WorkingWithImages/WorkingWithImages/WorkingWithImages.Android/Properties/AssemblyInfo.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,30 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
using Android.App; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("WorkingWithImages.Android")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("WorkingWithImages.Android")] | ||
[assembly: AssemblyCopyright("Copyright © 2014")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
[assembly: ComVisible(false)] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] | ||
|
||
// Add some common permissions, these can be removed if not needed | ||
[assembly: UsesPermission(Android.Manifest.Permission.Internet)] | ||
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)] |
50 changes: 50 additions & 0 deletions
50
...orkingWithImages/WorkingWithImages/WorkingWithImages.Android/Resources/AboutResources.txt
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,50 @@ | ||
Images, layout descriptions, binary blobs and string dictionaries can be included | ||
in your application as resource files. Various Android APIs are designed to | ||
operate on the resource IDs instead of dealing with images, strings or binary blobs | ||
directly. | ||
|
||
For example, a sample Android app that contains a user interface layout (main.xml), | ||
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) | ||
would keep its resources in the "Resources" directory of the application: | ||
|
||
Resources/ | ||
drawable-hdpi/ | ||
icon.png | ||
|
||
drawable-ldpi/ | ||
icon.png | ||
|
||
drawable-mdpi/ | ||
icon.png | ||
|
||
layout/ | ||
main.xml | ||
|
||
values/ | ||
strings.xml | ||
|
||
In order to get the build system to recognize Android resources, set the build action to | ||
"AndroidResource". The native Android APIs do not operate directly with filenames, but | ||
instead operate on resource IDs. When you compile an Android application that uses resources, | ||
the build system will package the resources for distribution and generate a class called | ||
"Resource" that contains the tokens for each one of the resources included. For example, | ||
for the above Resources layout, this is what the Resource class would expose: | ||
|
||
public class Resource { | ||
public class drawable { | ||
public const int icon = 0x123; | ||
} | ||
|
||
public class layout { | ||
public const int main = 0x456; | ||
} | ||
|
||
public class strings { | ||
public const int first_string = 0xabc; | ||
public const int second_string = 0xbcd; | ||
} | ||
} | ||
|
||
You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main | ||
to reference the layout/main.xml file, or Resource.strings.first_string to reference the first | ||
string in the dictionary file values/strings.xml. |
Oops, something went wrong.