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
configurations.all { | |
resolutionStrategy.eachDependency{ | |
DependencyResolveDetails details -> | |
def requested=details.requested | |
if(requested.group=="com.android.support"){ | |
if(!requested.name.startsWith("multidex")){ | |
details.useVersion("26.0.1") | |
} | |
} |
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 PermissionManager { | |
private Context context; | |
private SessionManager sessionManager; | |
public PermissionManager(Context context){ | |
this.context = context; | |
sessionManager = new SessionManager(context); | |
} |
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
import UIKit | |
class TestViewController: UIViewController { | |
@IBOutlet weak var tableView: UITableView! | |
var dataList: [String] = [String]() | |
var fromIndex: Int = 0 | |
let totalEntries: Int = 100 | |
let limit: Int = 20 |
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
API SIDE: | |
1. Server needs to accept two paramters fromIndex and itemsLimit in the API url as query params. | |
2. Server response will provide an extra key totalItems to identify all items received or not. | |
And and array of items from fromIndex to itemsLimit. | |
APP SIDE: | |
1. First loadItem() will be called with fromIndex = 0 and batchSize = 20 (for example in viewDidLoad() |
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
import UIKit | |
public protocol SSTextFieldDelegate { | |
public func texfieldShouldBeginEditing (textField: UITextField) -> Bool | |
public func textFieldShouldEndEditing (textField: UITextField) -> Bool | |
public func textFieldShouldReturn (textField: UITextField) -> Bool |
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
import Foundation | |
import UIKit | |
protocol SSToolbarDatePickerViewDelegate: class { | |
func didTapDone(date: Date) | |
func didTapCancel() | |
} | |
class SSToolbarDatePickerView: UIDatePicker { |
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
func randomString(length: Int) -> String { | |
let letters : NSString = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" | |
let len = UInt32(letters.length) | |
var randomString = "" | |
for _ in 0 ..< length { |
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
import android.provider.Settings.Secure; | |
private String android_id = Secure.getString(getContext().getContentResolver(), | |
Secure.ANDROID_ID); | |
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
import Foundation | |
import UIKit | |
protocol ToolbarPickerViewDelegate: class { | |
func didTapDone() | |
func didTapCancel() | |
} |