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
LatLngBounds.Builder builder = new LatLngBounds.Builder(); | |
for (Marker marker : markers) { | |
builder.include(marker.getPosition()); | |
} | |
LatLngBounds bounds = builder.build(); | |
LatLng currentLoc = _googleMapView.getCameraPosition().target; | |
//make sure that centre location doesn't change | |
double deltaLat = Math.max(Math.abs(bounds.southwest.latitude - currentLoc.latitude), |
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
- (void) drawPlaceholderInRect:(CGRect)rect { | |
if (self.useSmallPlaceholder) { | |
NSDictionary *attributes = @{ | |
NSForegroundColorAttributeName : kInputPlaceholderTextColor, | |
NSFontAttributeName : [UIFont fontWithName:kInputPlaceholderFontName size:kInputPlaceholderFontSize] | |
}; | |
//center vertically | |
CGSize textSize = [self.placeholder sizeWithAttributes:attributes]; | |
CGFloat hdif = rect.size.height - textSize.height; |
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 groovy.json.JsonSlurper | |
task generateStrings { | |
def inputFile = new File("app/src/main/assets/localized_strings.json") | |
def json = new JsonSlurper().parseText(inputFile.text) | |
def sw = new StringWriter() | |
def xml = new groovy.xml.MarkupBuilder(sw) | |
//add json values to the xml builder |