added a simple android test application (using xamarin)
This commit is contained in:
1 parent
eb9e17d2e6
commit
0a4d1ebe61
11 files changed
+597
No files matched your search
@@ -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.
|
||||
@@ -0,0 +1,194 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.18034
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
[assembly: global::Android.Runtime.ResourceDesignerAttribute("AndroidRemote.Resource", IsApplication=true)]
|
||||
|
||||
namespace AndroidRemote
|
||||
{
|
||||
|
||||
|
||||
[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()
|
||||
{
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
// aapt resource value: 0x7f020001
|
||||
public const int monoandroidsplash = 2130837505;
|
||||
|
||||
static Drawable()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
}
|
||||
|
||||
private Drawable()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Id
|
||||
{
|
||||
|
||||
// aapt resource value: 0x7f060002
|
||||
public const int btConnect = 2131099650;
|
||||
|
||||
// aapt resource value: 0x7f060007
|
||||
public const int btDown = 2131099655;
|
||||
|
||||
// aapt resource value: 0x7f060005
|
||||
public const int btLogin = 2131099653;
|
||||
|
||||
// aapt resource value: 0x7f060006
|
||||
public const int btUp = 2131099654;
|
||||
|
||||
// aapt resource value: 0x7f060001
|
||||
public const int tbIP = 2131099649;
|
||||
|
||||
// aapt resource value: 0x7f060004
|
||||
public const int tbPassword = 2131099652;
|
||||
|
||||
// aapt resource value: 0x7f060000
|
||||
public const int textView1 = 2131099648;
|
||||
|
||||
// aapt resource value: 0x7f060003
|
||||
public const int textView2 = 2131099651;
|
||||
|
||||
static Id()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
}
|
||||
|
||||
private Id()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Layout
|
||||
{
|
||||
|
||||
// aapt resource value: 0x7f030000
|
||||
public const int Main = 2130903040;
|
||||
|
||||
// aapt resource value: 0x7f030001
|
||||
public const int monoandroidsplash = 2130903041;
|
||||
|
||||
static Layout()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
}
|
||||
|
||||
private Layout()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public partial class String
|
||||
{
|
||||
|
||||
// aapt resource value: 0x7f040000
|
||||
public const int app_name = 2130968576;
|
||||
|
||||
// aapt resource value: 0x7f040001
|
||||
public const int button_connect = 2130968577;
|
||||
|
||||
// aapt resource value: 0x7f040002
|
||||
public const int button_disconnect = 2130968578;
|
||||
|
||||
// aapt resource value: 0x7f040006
|
||||
public const int button_down = 2130968582;
|
||||
|
||||
// aapt resource value: 0x7f040003
|
||||
public const int button_login = 2130968579;
|
||||
|
||||
// aapt resource value: 0x7f040004
|
||||
public const int button_logout = 2130968580;
|
||||
|
||||
// aapt resource value: 0x7f040005
|
||||
public const int button_up = 2130968581;
|
||||
|
||||
// aapt resource value: 0x7f04000d
|
||||
public const int ip_address = 2130968589;
|
||||
|
||||
// aapt resource value: 0x7f040007
|
||||
public const int message_connected = 2130968583;
|
||||
|
||||
// aapt resource value: 0x7f040008
|
||||
public const int message_disconnected = 2130968584;
|
||||
|
||||
// aapt resource value: 0x7f040009
|
||||
public const int message_logged_in = 2130968585;
|
||||
|
||||
// aapt resource value: 0x7f04000a
|
||||
public const int message_logged_out = 2130968586;
|
||||
|
||||
// aapt resource value: 0x7f04000e
|
||||
public const int password = 2130968590;
|
||||
|
||||
// aapt resource value: 0x7f04000b
|
||||
public const int text_ip_address = 2130968587;
|
||||
|
||||
// aapt resource value: 0x7f04000c
|
||||
public const int text_password = 2130968588;
|
||||
|
||||
static String()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
}
|
||||
|
||||
private String()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Style
|
||||
{
|
||||
|
||||
// aapt resource value: 0x7f050000
|
||||
public const int Mono_Android_Theme_Splash = 2131034112;
|
||||
|
||||
static Style()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
}
|
||||
|
||||
private Style()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<TextView
|
||||
android:text="@string/text_ip_address"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/textView1"
|
||||
android:linksClickable="false" />
|
||||
<EditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tbIP"
|
||||
android:text="@string/ip_address" />
|
||||
<Button
|
||||
android:text="@string/button_connect"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/btConnect" />
|
||||
<TextView
|
||||
android:text="@string/text_password"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/textView2" />
|
||||
<EditText
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tbPassword"
|
||||
android:text="@string/password" />
|
||||
<Button
|
||||
android:text="@string/button_login"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/btLogin"
|
||||
android:enabled="false" />
|
||||
<Button
|
||||
android:text="@string/button_up"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/btUp"
|
||||
android:enabled="false" />
|
||||
<Button
|
||||
android:text="@string/button_down"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/btDown"
|
||||
android:enabled="false" />
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">AndroidRemote</string>
|
||||
<string name="button_connect">Connect</string>
|
||||
<string name="button_disconnect">Disconnect</string>
|
||||
<string name="button_login">Login</string>
|
||||
<string name="button_logout">Logout</string>
|
||||
<string name="button_up">Up</string>
|
||||
<string name="button_down">Down</string>
|
||||
<string name="message_connected">Connected</string>
|
||||
<string name="message_disconnected">Disconnected</string>
|
||||
<string name="message_logged_in">Logged in</string>
|
||||
<string name="message_logged_out">Logged out</string>
|
||||
<string name="text_ip_address">IP Address of Vocaluxe Server:</string>
|
||||
<string name="text_password">Password:</string>
|
||||
<string name="ip_address">192.168.178.57</string>
|
||||
<string name="password">vocaluxe</string>
|
||||
</resources>
|
||||
Reference in new issue
Block a user