mirror of
https://github.com/bitwarden/mobile
synced 2025-12-25 20:53:25 +00:00
Moved android test project
This commit is contained in:
44
test/Android.Test/Resources/AboutResources.txt
Normal file
44
test/Android.Test/Resources/AboutResources.txt
Normal file
@@ -0,0 +1,44 @@
|
||||
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.axml),
|
||||
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/
|
||||
icon.png
|
||||
|
||||
layout/
|
||||
main.axml
|
||||
|
||||
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 "R"
|
||||
(this is an Android convention) that contains the tokens for each one of the resources
|
||||
included. For example, for the above Resources layout, this is what the R class would expose:
|
||||
|
||||
public class R {
|
||||
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 R.layout.main
|
||||
to reference the layout/main.axml file, or R.strings.first_string to reference the first
|
||||
string in the dictionary file values/strings.xml.
|
||||
194
test/Android.Test/Resources/Resource.Designer.cs
generated
Normal file
194
test/Android.Test/Resources/Resource.Designer.cs
generated
Normal file
@@ -0,0 +1,194 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
[assembly: global::Android.Runtime.ResourceDesignerAttribute("Bit.Android.Test.Resource", IsApplication=true)]
|
||||
|
||||
namespace Bit.Android.Test
|
||||
{
|
||||
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
|
||||
public partial class Resource
|
||||
{
|
||||
|
||||
static Resource()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
}
|
||||
|
||||
public static void UpdateIdValues()
|
||||
{
|
||||
global::Xamarin.Android.NUnitLite.Resource.Id.OptionHostName = global::Bit.Android.Test.Resource.Id.OptionHostName;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Id.OptionPort = global::Bit.Android.Test.Resource.Id.OptionPort;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Id.OptionRemoteServer = global::Bit.Android.Test.Resource.Id.OptionRemoteServer;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Id.OptionsButton = global::Bit.Android.Test.Resource.Id.OptionsButton;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Id.ResultFullName = global::Bit.Android.Test.Resource.Id.ResultFullName;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Id.ResultMessage = global::Bit.Android.Test.Resource.Id.ResultMessage;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Id.ResultResultState = global::Bit.Android.Test.Resource.Id.ResultResultState;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Id.ResultRunSingleMethodTest = global::Bit.Android.Test.Resource.Id.ResultRunSingleMethodTest;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Id.ResultStackTrace = global::Bit.Android.Test.Resource.Id.ResultStackTrace;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Id.ResultsFailed = global::Bit.Android.Test.Resource.Id.ResultsFailed;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Id.ResultsId = global::Bit.Android.Test.Resource.Id.ResultsId;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Id.ResultsIgnored = global::Bit.Android.Test.Resource.Id.ResultsIgnored;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Id.ResultsInconclusive = global::Bit.Android.Test.Resource.Id.ResultsInconclusive;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Id.ResultsMessage = global::Bit.Android.Test.Resource.Id.ResultsMessage;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Id.ResultsPassed = global::Bit.Android.Test.Resource.Id.ResultsPassed;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Id.ResultsResult = global::Bit.Android.Test.Resource.Id.ResultsResult;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Id.RunTestsButton = global::Bit.Android.Test.Resource.Id.RunTestsButton;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Id.TestSuiteListView = global::Bit.Android.Test.Resource.Id.TestSuiteListView;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Layout.options = global::Bit.Android.Test.Resource.Layout.options;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Layout.results = global::Bit.Android.Test.Resource.Layout.results;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Layout.test_result = global::Bit.Android.Test.Resource.Layout.test_result;
|
||||
global::Xamarin.Android.NUnitLite.Resource.Layout.test_suite = global::Bit.Android.Test.Resource.Layout.test_suite;
|
||||
}
|
||||
|
||||
public partial class Attribute
|
||||
{
|
||||
|
||||
static Attribute()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
}
|
||||
|
||||
private Attribute()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Drawable
|
||||
{
|
||||
|
||||
// aapt resource value: 0x7f020000
|
||||
public const int Icon = 2130837504;
|
||||
|
||||
static Drawable()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
}
|
||||
|
||||
private Drawable()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Id
|
||||
{
|
||||
|
||||
// aapt resource value: 0x7f050001
|
||||
public const int OptionHostName = 2131034113;
|
||||
|
||||
// aapt resource value: 0x7f050002
|
||||
public const int OptionPort = 2131034114;
|
||||
|
||||
// aapt resource value: 0x7f050000
|
||||
public const int OptionRemoteServer = 2131034112;
|
||||
|
||||
// aapt resource value: 0x7f050010
|
||||
public const int OptionsButton = 2131034128;
|
||||
|
||||
// aapt resource value: 0x7f05000b
|
||||
public const int ResultFullName = 2131034123;
|
||||
|
||||
// aapt resource value: 0x7f05000d
|
||||
public const int ResultMessage = 2131034125;
|
||||
|
||||
// aapt resource value: 0x7f05000c
|
||||
public const int ResultResultState = 2131034124;
|
||||
|
||||
// aapt resource value: 0x7f05000a
|
||||
public const int ResultRunSingleMethodTest = 2131034122;
|
||||
|
||||
// aapt resource value: 0x7f05000e
|
||||
public const int ResultStackTrace = 2131034126;
|
||||
|
||||
// aapt resource value: 0x7f050006
|
||||
public const int ResultsFailed = 2131034118;
|
||||
|
||||
// aapt resource value: 0x7f050003
|
||||
public const int ResultsId = 2131034115;
|
||||
|
||||
// aapt resource value: 0x7f050007
|
||||
public const int ResultsIgnored = 2131034119;
|
||||
|
||||
// aapt resource value: 0x7f050008
|
||||
public const int ResultsInconclusive = 2131034120;
|
||||
|
||||
// aapt resource value: 0x7f050009
|
||||
public const int ResultsMessage = 2131034121;
|
||||
|
||||
// aapt resource value: 0x7f050005
|
||||
public const int ResultsPassed = 2131034117;
|
||||
|
||||
// aapt resource value: 0x7f050004
|
||||
public const int ResultsResult = 2131034116;
|
||||
|
||||
// aapt resource value: 0x7f05000f
|
||||
public const int RunTestsButton = 2131034127;
|
||||
|
||||
// aapt resource value: 0x7f050011
|
||||
public const int TestSuiteListView = 2131034129;
|
||||
|
||||
static Id()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
}
|
||||
|
||||
private Id()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Layout
|
||||
{
|
||||
|
||||
// aapt resource value: 0x7f030000
|
||||
public const int options = 2130903040;
|
||||
|
||||
// aapt resource value: 0x7f030001
|
||||
public const int results = 2130903041;
|
||||
|
||||
// aapt resource value: 0x7f030002
|
||||
public const int test_result = 2130903042;
|
||||
|
||||
// aapt resource value: 0x7f030003
|
||||
public const int test_suite = 2130903043;
|
||||
|
||||
static Layout()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
}
|
||||
|
||||
private Layout()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public partial class String
|
||||
{
|
||||
|
||||
// aapt resource value: 0x7f040001
|
||||
public const int ApplicationName = 2130968577;
|
||||
|
||||
// aapt resource value: 0x7f040000
|
||||
public const int Hello = 2130968576;
|
||||
|
||||
static String()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
}
|
||||
|
||||
private String()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
BIN
test/Android.Test/Resources/drawable/Icon.png
Normal file
BIN
test/Android.Test/Resources/drawable/Icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
5
test/Android.Test/Resources/values/Strings.xml
Normal file
5
test/Android.Test/Resources/values/Strings.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="Hello">Hello World, Click Me!</string>
|
||||
<string name="ApplicationName">Android.Test</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user