-
-
Notifications
You must be signed in to change notification settings - Fork 285
Upgrade Babel sample (WPF & Android) #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PoLaKoSz
wants to merge
5
commits into
MvvmCross:master
Choose a base branch
from
PoLaKoSz:develop/Babel
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6ad58a4
Upgrade Babel.Core to MvvmCross 6.2.3
PoLaKoSz 53fa4f4
Upgrade Babel.WPF to MvvmCross 6.2.3
PoLaKoSz 8d65043
Upgrade Babel.Droid to MvvmCross 6.2.3
PoLaKoSz abc538e
Use PackageReference in Babel.Droid.csproj
PoLaKoSz 42433f0
Set targetSDK version to 28 for Babel.Droid
PoLaKoSz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
Babel/Babel.Droid/Bootstrap/JsonLocalizationPluginBootstrap.cs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,45 +1,37 @@ | ||
| using System; | ||
| using System.Collections.Specialized; | ||
| using System.ComponentModel; | ||
| using System.Windows.Input; | ||
| using Android.App; | ||
| using Android.Runtime; | ||
| using Android.Views; | ||
| using Android.Widget; | ||
| using MvvmCross.Binding.BindingContext; | ||
| using MvvmCross.IoC; | ||
| using MvvmCross.Navigation; | ||
| using MvvmCross.ViewModels; | ||
|
|
||
| namespace Babel.Droid | ||
| { | ||
| // This class is never actually executed, but when Xamarin linking is enabled it does how to ensure types and properties | ||
| // are preserved in the deployed app | ||
| [Preserve(AllMembers = true)] | ||
| public class LinkerPleaseInclude | ||
| { | ||
| public void Include(Button button) | ||
| { | ||
| button.Click += (s,e) => button.Text = button.Text + ""; | ||
| } | ||
|
|
||
| public void Include(CheckBox checkBox) | ||
| { | ||
| checkBox.CheckedChange += (sender, args) => checkBox.Checked = !checkBox.Checked; | ||
| } | ||
|
|
||
| public void Include(Switch @switch) | ||
| { | ||
| @switch.CheckedChange += (sender, args) => @switch.Checked = [email protected]; | ||
| button.Click += (s, e) => button.Text = $"{button.Text}"; | ||
| } | ||
|
|
||
| public void Include(View view) | ||
| { | ||
| view.Click += (s, e) => view.ContentDescription = view.ContentDescription + ""; | ||
| view.Click += (s, e) => view.ContentDescription = $"{view.ContentDescription}"; | ||
| } | ||
|
|
||
| public void Include(TextView text) | ||
| { | ||
| text.TextChanged += (sender, args) => text.Text = "" + text.Text; | ||
| text.Hint = "" + text.Hint; | ||
| } | ||
|
|
||
| public void Include(CheckedTextView text) | ||
| { | ||
| text.TextChanged += (sender, args) => text.Text = "" + text.Text; | ||
| text.Hint = "" + text.Hint; | ||
| text.AfterTextChanged += (sender, args) => text.Text = $"{text.Text}"; | ||
| text.Hint = $"{text.Hint}"; | ||
| } | ||
|
|
||
| public void Include(CompoundButton cb) | ||
|
|
@@ -52,31 +44,70 @@ public void Include(SeekBar sb) | |
| sb.ProgressChanged += (sender, args) => sb.Progress = sb.Progress + 1; | ||
| } | ||
|
|
||
| public void Include(Activity act) | ||
| public void Include(RadioGroup radioGroup) | ||
| { | ||
| act.Title = act.Title + ""; | ||
| radioGroup.CheckedChange += (sender, args) => radioGroup.Check(args.CheckedId); | ||
| } | ||
|
|
||
| public void Include(INotifyCollectionChanged changed) | ||
| public void Include(RatingBar ratingBar) | ||
| { | ||
| ratingBar.RatingBarChange += (sender, args) => ratingBar.Rating = 0 + ratingBar.Rating; | ||
| } | ||
|
|
||
| public void Include(Activity act) | ||
| { | ||
| changed.CollectionChanged += (s,e) => { var test = $"{e.Action}{e.NewItems}{e.NewStartingIndex}{e.OldItems}{e.OldStartingIndex}"; }; | ||
| act.Title = $"{act.Title}"; | ||
| } | ||
|
|
||
| public void Include(ICommand command) | ||
| { | ||
| command.CanExecuteChanged += (s, e) => { if (command.CanExecute(null)) command.Execute(null); }; | ||
| } | ||
| public void Include(MvvmCross.Platform.IoC.MvxPropertyInjector injector) | ||
|
|
||
| public void Include(INotifyCollectionChanged changed) | ||
| { | ||
| injector = new MvvmCross.Platform.IoC.MvxPropertyInjector (); | ||
| } | ||
| changed.CollectionChanged += (s, e) => { _ = $"{e.Action}{e.NewItems}{e.NewStartingIndex}{e.OldItems}{e.OldStartingIndex}"; }; | ||
| } | ||
|
|
||
| public void Include(INotifyPropertyChanged changed) | ||
| { | ||
| changed.PropertyChanged += (sender, e) => { _ = e.PropertyName; }; | ||
| } | ||
|
|
||
| public void Include(MvxPropertyInjector injector) | ||
| { | ||
| _ = new MvxPropertyInjector(); | ||
| } | ||
|
|
||
| public void Include(MvxTaskBasedBindingContext context) | ||
| { | ||
| context.Dispose(); | ||
| var context2 = new MvxTaskBasedBindingContext(); | ||
| context2.Dispose(); | ||
| } | ||
|
|
||
| public void Include(MvxViewModelViewTypeFinder viewModelViewTypeFinder) | ||
| { | ||
| _ = new MvxViewModelViewTypeFinder(null, null); | ||
| } | ||
|
|
||
| public void Include(MvxNavigationService service, IMvxViewModelLoader loader) | ||
| { | ||
| _ = new MvxNavigationService(null, loader); | ||
| _ = new MvxAppStart<MvxNullViewModel>(null, null); | ||
| } | ||
|
|
||
| public void Include(System.ComponentModel.INotifyPropertyChanged changed) | ||
| public void Include(ConsoleColor color) | ||
| { | ||
| changed.PropertyChanged += (sender, e) => { | ||
| var test = e.PropertyName; | ||
| }; | ||
| Console.Write(""); | ||
| Console.WriteLine(""); | ||
| _ = Console.ForegroundColor; | ||
| Console.ForegroundColor = ConsoleColor.Red; | ||
| Console.ForegroundColor = ConsoleColor.Yellow; | ||
| Console.ForegroundColor = ConsoleColor.Magenta; | ||
| Console.ForegroundColor = ConsoleColor.White; | ||
| Console.ForegroundColor = ConsoleColor.Gray; | ||
| Console.ForegroundColor = ConsoleColor.DarkGray; | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="21" /> | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto"> | ||
PoLaKoSz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19" /> | ||
| <application></application> | ||
| </manifest> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.