-
Reducing executable size: http://developer.xamarin.com/guides/cross-platform/deployment,_testing,_and_metrics/memory_perf_best_practices/#Reducing_Executable_Size
-
Use the linker (iOS [1], Android [2]) to remove unnecessary code from your assemblies [1] https://developer.xamarin.com/guides/ios/advanced_topics/linker [2] https://developer.xamarin.com/guides/android/advanced_topics/linking
-
Reference third-party libraries judiciously
-
Applying constraints to generics may reduce app size, since less code would need to be included (haven’t verified this)
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
var grid = new Grid(); | |
var label = new Label { Text = "Code:" }; | |
grid.Children.Add(label, 0, 1); | |
var entry = new Entry | |
{ | |
Placeholder = "Enter number", | |
Keyboard = Keyboard.Numeric, | |
BackgroundColor = Color.AliceBlue, |
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
... | |
new Entry { Placeholder = "Sigueme en las redes @luismatosluna", Keyboard = Keyboard.Numeric } | |
.Grid.Row(2) .Grid.ColumnSpan(2) .Margin(myMargin) .Height(20) | |
.Bind(nameof(vm.RegistrationCode), BindingMode.TwoWay), | |
... |
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
... | |
new Entry { Placeholder = "Sigueme en las redes @luismatosluna", Keyboard = Keyboard.Numeric, | |
Margin = myMargin, HeightRequest = 20 } | |
.Grid.Row(2) .Grid.ColumnSpan(2) | |
.Bind(nameof(vm.RegistrationCode), BindingMode.TwoWay), | |
... |
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
... | |
<Entry Placeholder="Sigueme en las redes @luismatosluna" Keyboard="Numeric" | |
Margin="{StaticResource myMargin}" HeightRequest="20" | |
Grid.Row="2" Grid.ColumnSpan="2" | |
Text="{Binding RegistrationCode, Mode=TwoWay}" /> | |
... |
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
... | |
Forms.SetFlags("Visual_Experimental"); | |
... |
A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.
Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.
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
/// XF Project | |
namespace UsingDependencyService | |
{ | |
public interface IToDo { | |
void ToDo (); //note that interface members are public by default | |
} | |
} | |
namespace UsingDependencyService.Service | |
{ |
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
public class RestService : IRestService | |
{ | |
HttpClient client; | |
... | |
public RestService () | |
{ | |
client = new HttpClient (); // Creating the HTTPClient Object | |
} | |
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
<CollectionView ItemsSource="{Binding Blogs}"> | |
<CollectionView.ItemTemplate> | |
<DataTemplate> | |
<Grid Padding="10"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="Auto" /> | |
<RowDefinition Height="Auto" /> | |
</Grid.RowDefinitions> | |