Skip to content

Commit 6e58e9e

Browse files
first commit develop 🎉
Move XFTranslator project to develop
1 parent 688b115 commit 6e58e9e

File tree

131 files changed

+17566
-10551
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+17566
-10551
lines changed

XFTranslator/.gitignore

+405
Large diffs are not rendered by default.
Binary file not shown.
Binary file not shown.

XamUI.Android/MainActivity.cs XFTranslator/XFTranslator.Android/MainActivity.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
using Android.Widget;
88
using Android.OS;
99

10-
namespace XamUI.Droid
10+
namespace XFTranslator.Droid
1111
{
12-
[Activity(Label = "XamUI", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
12+
[Activity(Label = "XFTranslator", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
1313
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
1414
{
1515
protected override void OnCreate(Bundle savedInstanceState)
@@ -19,7 +19,7 @@ protected override void OnCreate(Bundle savedInstanceState)
1919

2020
base.OnCreate(savedInstanceState);
2121
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
22-
CarouselView.FormsPlugin.Android.CarouselViewRenderer.Init();
22+
global::Xamarin.Forms.FormsMaterial.Init(this, savedInstanceState);
2323
LoadApplication(new App());
2424
}
2525
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.aimoresc.xamui">
3-
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="27" />
4-
<application android:label="XamUI.Android"></application>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.aimoresc.xftranslator">
3+
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
4+
<uses-permission android:name="android.permission.INTERNET" />
5+
<application android:label="XFTranslator.Android"></application>
56
</manifest>

XamUI.Android/Properties/AssemblyInfo.cs XFTranslator/XFTranslator.Android/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
// General Information about an assembly is controlled through the following
77
// set of attributes. Change these attribute values to modify the information
88
// associated with an assembly.
9-
[assembly: AssemblyTitle("XamUI.Android")]
9+
[assembly: AssemblyTitle("XFTranslator.Android")]
1010
[assembly: AssemblyDescription("")]
1111
[assembly: AssemblyConfiguration("")]
1212
[assembly: AssemblyCompany("")]
13-
[assembly: AssemblyProduct("XamUI.Android")]
13+
[assembly: AssemblyProduct("XFTranslator.Android")]
1414
[assembly: AssemblyCopyright("Copyright © 2014")]
1515
[assembly: AssemblyTrademark("")]
1616
[assembly: AssemblyCulture("")]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
using System;
2+
using Android.Content;
3+
using Xamarin.Forms;
4+
using AView = Android.Views.View;
5+
using Xamarin.Forms.Platform.Android;
6+
using Xamarin.Forms.Platform.Android.AppCompat;
7+
using XFTranslator.Controls;
8+
9+
[assembly: ExportRenderer(typeof(CustomNavigationPage), typeof(NavigationPageRenderer))]
10+
namespace XFTranslator.Droid.Renderers
11+
{
12+
public class NavigationPageRendererNavigationPageRenderer : NavigationRenderer
13+
{
14+
public NavigationPageRendererNavigationPageRenderer(Context context) : base(context)
15+
{
16+
17+
}
18+
19+
IPageController PageController => Element as IPageController;
20+
CustomNavigationPage CustomNavigationPage => Element as CustomNavigationPage;
21+
22+
protected override void OnLayout(bool changed, int l, int t, int r, int b)
23+
{
24+
CustomNavigationPage.IgnoreLayoutChange = true;
25+
base.OnLayout(changed, l, t, r, b);
26+
CustomNavigationPage.IgnoreLayoutChange = false;
27+
28+
int containerHeight = b - t;
29+
30+
PageController.ContainerArea = new Rectangle(0, 0, Context.FromPixels(r - l), Context.FromPixels(containerHeight));
31+
32+
for (var i = 0; i < ChildCount; i++)
33+
{
34+
AView child = GetChildAt(i);
35+
36+
if (child is Android.Support.V7.Widget.Toolbar)
37+
{
38+
continue;
39+
}
40+
41+
child.Layout(0, 0, r, b);
42+
}
43+
}
44+
}
45+
}

XFTranslator/XFTranslator.Android/Resources/Resource.designer.cs

+14,796
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24.0"
5+
android:viewportHeight="24.0"
6+
android:tint="?attr/colorControlNormal">
7+
<path
8+
android:fillColor="@android:color/white"
9+
android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/>
10+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24.0"
5+
android:viewportHeight="24.0"
6+
android:tint="?attr/colorControlNormal">
7+
<path
8+
android:fillColor="@android:color/white"
9+
android:pathData="M3,9v6h4l5,5L12,4L7,9L3,9zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM14,3.23v2.06c2.89,0.86 5,3.54 5,6.71s-2.11,5.85 -5,6.71v2.06c4.01,-0.91 7,-4.49 7,-8.77s-2.99,-7.86 -7,-8.77z"/>
10+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<android.support.design.widget.TabLayout
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:app="http://schemas.android.com/apk/res-auto"
5+
android:id="@+id/sliding_tabs"
6+
android:layout_width="match_parent"
7+
android:layout_height="wrap_content"
8+
android:background="?attr/colorPrimary"
9+
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
10+
app:tabIndicatorColor="@android:color/white"
11+
app:tabGravity="fill"
12+
app:tabMode="fixed" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<android.support.v7.widget.Toolbar
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
android:id="@+id/toolbar"
5+
android:layout_width="match_parent"
6+
android:layout_height="wrap_content"
7+
android:background="?attr/colorPrimary"
8+
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
9+
android:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon
3+
xmlns:android="http://schemas.android.com/apk/res/android">
4+
<background
5+
android:drawable="@color/launcher_background" />
6+
<foreground
7+
android:drawable="@mipmap/launcher_foreground" />
8+
</adaptive-icon>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon
3+
xmlns:android="http://schemas.android.com/apk/res/android">
4+
<background
5+
android:drawable="@color/launcher_background" />
6+
<foreground
7+
android:drawable="@mipmap/launcher_foreground" />
8+
</adaptive-icon>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color
4+
name="launcher_background">#FFFFFF</color>
5+
<color
6+
name="colorPrimary">#3F51B5</color>
7+
<color
8+
name="colorPrimaryDark">#303F9F</color>
9+
<color
10+
name="colorAccent">#FF4081</color>
11+
</resources>
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,41 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<style name="MainTheme" parent="MainTheme.Base">
3+
<style
4+
name="MainTheme"
5+
parent="MainTheme.Base">
46
</style>
57
<!-- Base theme applied no matter what API -->
6-
<style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
8+
<style
9+
name="MainTheme.Base"
10+
parent="Theme.AppCompat.Light.DarkActionBar">
711
<!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
8-
<item name="windowNoTitle">true</item>
12+
<item
13+
name="windowNoTitle">true</item>
914
<!--We will be using the toolbar so no need to show ActionBar-->
10-
<item name="windowActionBar">false</item>
15+
<item
16+
name="windowActionBar">false</item>
1117
<!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette -->
1218
<!-- colorPrimary is used for the default action bar background -->
13-
<item name="colorPrimary">#2196F3</item>
19+
<item
20+
name="colorPrimary">#2196F3</item>
1421
<!-- colorPrimaryDark is used for the status bar -->
15-
<item name="colorPrimaryDark">#1976D2</item>
22+
<item
23+
name="colorPrimaryDark">#1976D2</item>
1624
<!-- colorAccent is used as the default value for colorControlActivated
1725
which is used to tint widgets -->
18-
<item name="colorAccent">#FF4081</item>
26+
<item
27+
name="colorAccent">#FF4081</item>
1928
<!-- You can also set colorControlNormal, colorControlActivated
2029
colorControlHighlight and colorSwitchThumbNormal. -->
21-
<item name="windowActionModeOverlay">true</item>
22-
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
30+
<item
31+
name="windowActionModeOverlay">true</item>
32+
<item
33+
name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
2334
</style>
24-
<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
25-
<item name="colorAccent">#FF4081</item>
35+
<style
36+
name="AppCompatDialogStyle"
37+
parent="Theme.AppCompat.Light.Dialog">
38+
<item
39+
name="colorAccent">#FF4081</item>
2640
</style>
2741
</resources>

0 commit comments

Comments
 (0)