updated launcher icon, code cleanup, target 33
|
@ -1,44 +0,0 @@
|
|||
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.
|
40
dashboard/Resources/Resource.designer.cs
generated
|
@ -14,7 +14,7 @@ namespace dashboard
|
|||
{
|
||||
|
||||
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.0.0.73")]
|
||||
public partial class Resource
|
||||
{
|
||||
|
||||
|
@ -40,11 +40,27 @@ namespace dashboard
|
|||
}
|
||||
}
|
||||
|
||||
public partial class Id
|
||||
public partial class Color
|
||||
{
|
||||
|
||||
// aapt resource value: 0x7F010000
|
||||
public const int webView = 2130771968;
|
||||
public const int ic_launcher_background = 2130771968;
|
||||
|
||||
static Color()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
}
|
||||
|
||||
private Color()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Id
|
||||
{
|
||||
|
||||
// aapt resource value: 0x7F020000
|
||||
public const int webView = 2130837504;
|
||||
|
||||
static Id()
|
||||
{
|
||||
|
@ -59,8 +75,8 @@ namespace dashboard
|
|||
public partial class Layout
|
||||
{
|
||||
|
||||
// aapt resource value: 0x7F020000
|
||||
public const int Main = 2130837504;
|
||||
// aapt resource value: 0x7F030000
|
||||
public const int main = 2130903040;
|
||||
|
||||
static Layout()
|
||||
{
|
||||
|
@ -75,8 +91,14 @@ namespace dashboard
|
|||
public partial class Mipmap
|
||||
{
|
||||
|
||||
// aapt resource value: 0x7F030000
|
||||
public const int Icon = 2130903040;
|
||||
// aapt resource value: 0x7F040000
|
||||
public const int ic_launcher = 2130968576;
|
||||
|
||||
// aapt resource value: 0x7F040001
|
||||
public const int ic_launcher_foreground = 2130968577;
|
||||
|
||||
// aapt resource value: 0x7F040002
|
||||
public const int ic_launcher_round = 2130968578;
|
||||
|
||||
static Mipmap()
|
||||
{
|
||||
|
@ -91,8 +113,8 @@ namespace dashboard
|
|||
public partial class String
|
||||
{
|
||||
|
||||
// aapt resource value: 0x7F040000
|
||||
public const int app_name = 2130968576;
|
||||
// aapt resource value: 0x7F050000
|
||||
public const int app_name = 2131034112;
|
||||
|
||||
static String()
|
||||
{
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:minWidth="25px" android:minHeight="25px">
|
||||
<WebView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/webView" />
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:minWidth="25px"
|
||||
android:minHeight="25px">
|
||||
<WebView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/webView" />
|
||||
</LinearLayout>
|
||||
|
|
5
dashboard/Resources/mipmap-anydpi-v26/ic_launcher.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
BIN
dashboard/Resources/mipmap-hdpi/ic_launcher_foreground.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
BIN
dashboard/Resources/mipmap-mdpi/ic_launcher_foreground.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
BIN
dashboard/Resources/mipmap-xhdpi/ic_launcher_foreground.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
BIN
dashboard/Resources/mipmap-xxhdpi/ic_launcher_foreground.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
BIN
dashboard/Resources/mipmap-xxxhdpi/ic_launcher_foreground.png
Normal file
After Width: | Height: | Size: 11 KiB |
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Mayer Dashboard</string>
|
||||
</resources>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Mayer Dashboard</string>
|
||||
</resources>
|
||||
|
|
4
dashboard/Resources/values/ic_launcher_background.xml
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#666666</color>
|
||||
</resources>
|