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
/// A wrapper around `NSUserDefaults` access for settings that are specific to the PlanGrid app. | |
/// `NSUserDefaults` should always be accessed through this type, this way we have a good overview | |
/// of all the settings the app supports and we can document them. | |
@objc final class PlanGridUserDefaults: NSObject { | |
/// Keeps track of whether or not a user has already used the annotation filter feature. | |
static var hasUsedAnnotationFilterFeature = UserDefaultsProperty<Bool>("HasUsedAnnotationFilterFeature") | |
} | |
/// A property that wraps around a value that is persisted to NSUserDefaults. |
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
/** | |
* Created by Ashif on 22/03/17. | |
*/ | |
public class TimeUtils { | |
public static boolean isValidString(String string) { | |
return string != null && !string.isEmpty(); | |
} |
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
package com.example.api; | |
import java.util.Map; | |
import retrofit.Call; | |
import retrofit.http.Body; | |
import retrofit.http.GET; | |
import retrofit.http.POST; | |
public interface Api { |
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
public class Unit { | |
public Unit(EventDispatcher dispatcher) { | |
dispatcher.addHandler(MyEvent.class, new IEventHandler() { | |
public void onEvent(MyEvent event) { | |
// some behavior | |
} | |
}); | |