This file contains 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
import Foundation | |
import UIKit | |
final class HomeCoordinator: Coordinator, HomeCoordinatorOutput { | |
var finishHomeCoordinatorFlow: (() -> Void)? | |
var onAddressFlow: (() -> Void)? | |
private let factory: HomeModuleFactory | |
private let coordinatorFactory: CoordinatorFactory | |
private let router: Router | |
This file contains 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
protocol CoordinatorFactory { | |
func makeHomeCoordinator(router: Router) -> Coordinator & HomeCoordinatorOutput | |
func makeAddressCoordinator(router: Router) -> Coordinator & AddressCoordinatorOutput | |
} |
This file contains 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 rootViewController: UINavigationController = UINavigationController() | |
private lazy var applicationCoordinator: BaseCoordinator = self.makeCoordinator() | |
..... | |
..... | |
if let windowScene = scene as? UIWindowScene { | |
let window = UIWindow(windowScene: windowScene) | |
window.rootViewController = rootViewController | |
self.window = window | |
window.makeKeyAndVisible() |
This file contains 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
import Foundation | |
final class ApplicationCoordinator: Coordinator { | |
private let coordinatorFactory: CoordinatorFactory | |
private let router: Router | |
init(router: Router, coordinatorFactory: CoordinatorFactory) { | |
self.router = router | |
self.coordinatorFactory = coordinatorFactory |
This file contains 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
Collections.sort(messages, new Comparator() { | |
@Override | |
public int compare(Object o1, Object o2) { | |
Message p1 = (Message) o1; | |
Message p2 = (Message) o2; | |
if (p1.getCreatedAt().compareTo(p2.getCreatedAt()) > 0) { | |
return -1; | |
} else if (p1.getCreatedAt().compareTo(p2.getCreatedAt()) < 0) { | |
return +1; | |
} else { |
This file contains 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
<Label Text="{Binding NotifyDateTime, StringFormat='{0:dd/MM/yyyy HH:mm:ss}'}" FontFamily="Montserrat" TextColor="White" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" VerticalTextAlignment="Start" HorizontalTextAlignment="Start" FontSize="Small" /> |
This file contains 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
Assembly assembly = Assembly.GetExecutingAssembly(); | |
string[] resources = assembly.GetManifestResourceNames(); | |
foreach (string resource in resources) | |
{ | |
if (resource.EndsWith(".png")) | |
{ | |
Stream stream = assembly.GetManifestResourceStream(resource); | |
if (stream != null) | |
{ | |
This file contains 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
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="EduSample.EduSamplePage" | |
Title = "Calculator - XAML" | |
BackgroundColor="#404040"> | |
<ContentPage.Resources> | |
<ResourceDictionary> | |
<Style x:Key="plainButton" TargetType="Button"> | |
<Setter Property="BackgroundColor" Value="#eee"/> | |
<Setter Property="TextColor" Value="Black" /> |
This file contains 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
long unixDate = (long)item.createdDate; | |
DateTime start = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); | |
DateTime date = start.AddMilliseconds(unixDate).ToLocalTime(); | |
var dateString = date.ToString("dd/MM/yyyy"); |
This file contains 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
The Problem : during listview is unvisible, we want to change padding. but not is changed view. | |
listview.Padding = new Thickness(10,105,10,60 + 275); | |
listview.ForceLayout(); |
NewerOlder