Initial Commit für MTC Sourcen
@ -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 you 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");
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<SelectedDevice>Android_Accelerated_x86_Nougat</SelectedDevice>
|
||||
<DefaultDevice>Android_Accelerated_x86_Nougat</DefaultDevice>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@ -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.
|
After Width: | Height: | Size: 99 KiB |
After Width: | Height: | Size: 7.0 MiB |
After Width: | Height: | Size: 7.5 MiB |
After Width: | Height: | Size: 7.3 MiB |
After Width: | Height: | Size: 7.1 MiB |
After Width: | Height: | Size: 6.3 MiB |
After Width: | Height: | Size: 7.3 MiB |
After Width: | Height: | Size: 6.8 MiB |
After Width: | Height: | Size: 6.6 MiB |
After Width: | Height: | Size: 6.7 MiB |
After Width: | Height: | Size: 6.7 MiB |
After Width: | Height: | Size: 7.2 MiB |
After Width: | Height: | Size: 6.4 MiB |
After Width: | Height: | Size: 7.5 MiB |
After Width: | Height: | Size: 7.0 MiB |
After Width: | Height: | Size: 7.1 MiB |
After Width: | Height: | Size: 7.4 MiB |
After Width: | Height: | Size: 6.7 MiB |
After Width: | Height: | Size: 6.9 MiB |
After Width: | Height: | Size: 7.6 MiB |
After Width: | Height: | Size: 6.9 MiB |
After Width: | Height: | Size: 7.0 MiB |
After Width: | Height: | Size: 7.0 MiB |
After Width: | Height: | Size: 6.3 MiB |
After Width: | Height: | Size: 6.8 MiB |
After Width: | Height: | Size: 6.9 MiB |
After Width: | Height: | Size: 7.2 MiB |
After Width: | Height: | Size: 6.7 MiB |
After Width: | Height: | Size: 7.1 MiB |
After Width: | Height: | Size: 7.1 MiB |
After Width: | Height: | Size: 6.9 MiB |
After Width: | Height: | Size: 7.2 MiB |
After Width: | Height: | Size: 6.6 MiB |
After Width: | Height: | Size: 7.6 MiB |
After Width: | Height: | Size: 6.8 MiB |
After Width: | Height: | Size: 7.1 MiB |
After Width: | Height: | Size: 7.4 MiB |
After Width: | Height: | Size: 6.9 MiB |
After Width: | Height: | Size: 7.0 MiB |
After Width: | Height: | Size: 6.7 MiB |
After Width: | Height: | Size: 6.7 MiB |
After Width: | Height: | Size: 7.3 MiB |
After Width: | Height: | Size: 6.4 MiB |
After Width: | Height: | Size: 7.1 MiB |
After Width: | Height: | Size: 6.8 MiB |
After Width: | Height: | Size: 7.1 MiB |
After Width: | Height: | Size: 7.1 MiB |
After Width: | Height: | Size: 6.9 MiB |
After Width: | Height: | Size: 7.4 MiB |
After Width: | Height: | Size: 6.8 MiB |
After Width: | Height: | Size: 6.8 MiB |
After Width: | Height: | Size: 6.9 MiB |
After Width: | Height: | Size: 7.2 MiB |
After Width: | Height: | Size: 7.1 MiB |
After Width: | Height: | Size: 6.7 MiB |
After Width: | Height: | Size: 6.8 MiB |
After Width: | Height: | Size: 6.4 MiB |
After Width: | Height: | Size: 7.1 MiB |
After Width: | Height: | Size: 6.8 MiB |
After Width: | Height: | Size: 6.6 MiB |
After Width: | Height: | Size: 7.2 MiB |
After Width: | Height: | Size: 6.5 MiB |
After Width: | Height: | Size: 6.3 MiB |
After Width: | Height: | Size: 6.8 MiB |
After Width: | Height: | Size: 7.1 MiB |
After Width: | Height: | Size: 6.5 MiB |
After Width: | Height: | Size: 7.0 MiB |
After Width: | Height: | Size: 6.6 MiB |
After Width: | Height: | Size: 6.6 MiB |
After Width: | Height: | Size: 6.7 MiB |
After Width: | Height: | Size: 7.5 MiB |
After Width: | Height: | Size: 7.4 MiB |
After Width: | Height: | Size: 7.4 MiB |
After Width: | Height: | Size: 7.2 MiB |
After Width: | Height: | Size: 7.1 MiB |
After Width: | Height: | Size: 7.3 MiB |
After Width: | Height: | Size: 7.1 MiB |
After Width: | Height: | Size: 7.0 MiB |
After Width: | Height: | Size: 6.5 MiB |
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.TabLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/sliding_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:tabIndicatorColor="@android:color/white"
|
||||
app:tabGravity="fill"
|
||||
app:tabMode="fixed" />
|
@ -0,0 +1,9 @@
|
||||
<android.support.v7.widget.Toolbar
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
android:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
||||
|
@ -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/launcher_background" />
|
||||
<foreground android:drawable="@mipmap/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/launcher_background" />
|
||||
<foreground android:drawable="@mipmap/launcher_foreground" />
|
||||
</adaptive-icon>
|
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 33 KiB |