add Android version
50
Pixiview.Android/Resources/AboutResources.txt
Normal file
@ -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.
|
14007
Pixiview.Android/Resources/Resource.designer.cs
generated
Normal file
BIN
Pixiview.Android/Resources/drawable/download.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
Pixiview.Android/Resources/drawable/userprofile.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
2
Pixiview.Android/Resources/layout/Tabbar.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?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" />
|
2
Pixiview.Android/Resources/layout/Toolbar.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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" />
|
5
Pixiview.Android/Resources/mipmap-anydpi-v26/icon.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/icon_background"/>
|
||||
<foreground android:drawable="@mipmap/icon_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/icon_background"/>
|
||||
<foreground android:drawable="@mipmap/icon_foreground"/>
|
||||
</adaptive-icon>
|
BIN
Pixiview.Android/Resources/mipmap-hdpi/icon.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
Pixiview.Android/Resources/mipmap-hdpi/icon_foreground.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
Pixiview.Android/Resources/mipmap-hdpi/icon_round.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
Pixiview.Android/Resources/mipmap-mdpi/icon.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
Pixiview.Android/Resources/mipmap-mdpi/icon_foreground.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
Pixiview.Android/Resources/mipmap-mdpi/icon_round.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
Pixiview.Android/Resources/mipmap-xhdpi/icon.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
Pixiview.Android/Resources/mipmap-xhdpi/icon_foreground.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
Pixiview.Android/Resources/mipmap-xhdpi/icon_round.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
Pixiview.Android/Resources/mipmap-xxhdpi/icon.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
Pixiview.Android/Resources/mipmap-xxhdpi/icon_foreground.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
Pixiview.Android/Resources/mipmap-xxhdpi/icon_round.png
Normal file
After Width: | Height: | Size: 8.0 KiB |
BIN
Pixiview.Android/Resources/mipmap-xxxhdpi/icon.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
Pixiview.Android/Resources/mipmap-xxxhdpi/icon_foreground.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
Pixiview.Android/Resources/mipmap-xxxhdpi/icon_round.png
Normal file
After Width: | Height: | Size: 12 KiB |
7
Pixiview.Android/Resources/values/colors.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="icon_background">#1999F7</color>
|
||||
<color name="colorPrimary">#3F51B5</color>
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
<color name="colorAccent">#FF4081</color>
|
||||
</resources>
|
27
Pixiview.Android/Resources/values/styles.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="MainTheme" parent="MainTheme.Base">
|
||||
</style>
|
||||
<!-- Base theme applied no matter what API -->
|
||||
<style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
|
||||
<item name="windowNoTitle">true</item>
|
||||
<!--We will be using the toolbar so no need to show ActionBar-->
|
||||
<item name="windowActionBar">false</item>
|
||||
<!-- Set theme colors from https://aka.ms/material-colors -->
|
||||
<!-- colorPrimary is used for the default action bar background -->
|
||||
<item name="colorPrimary">#2196F3</item>
|
||||
<!-- colorPrimaryDark is used for the status bar -->
|
||||
<item name="colorPrimaryDark">#1976D2</item>
|
||||
<!-- colorAccent is used as the default value for colorControlActivated
|
||||
which is used to tint widgets -->
|
||||
<item name="colorAccent">#FF4081</item>
|
||||
<!-- You can also set colorControlNormal, colorControlActivated
|
||||
colorControlHighlight and colorSwitchThumbNormal. -->
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
|
||||
</style>
|
||||
<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
|
||||
<item name="colorAccent">#FF4081</item>
|
||||
</style>
|
||||
</resources>
|