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
Intent intent = new Intent(Intent.ACTION_VIEW, | |
Uri.parse("http://maps.google.com/maps?f=d&saddr=53.447,-0.878&daddr=51.448,-0.972")); | |
intent.setComponent(new ComponentName("com.google.android.apps.maps", | |
"com.google.android.maps.MapsActivity")); | |
startActivity(intent); |
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
private void asyncTaskWithInlineCallback() { | |
// display UI progress indicator | |
// ... | |
new MyAsyncTask() { | |
protected void onPostExecute(Boolean result) { | |
// dismiss UI progress indicator | |
// process the result | |
// ... | |
} |
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
private GeoPoint center; | |
private int zoomLevel = -1; | |
@Override | |
public void onPause() { | |
super.onPause(); | |
center = mapView.getMapCenter(); | |
zoomLevel = mapView.getZoomLevel(); | |
} |
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 DoubleTapZoomMapView extends MapView { | |
private static final long TIME_INITIAL = -1; | |
private static final long TIME_DOUBLE_TAP = 250; | |
private long lastTouchTime = TIME_INITIAL; | |
public DoubleTapZoomMapView(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
} |
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
#!/bin/bash | |
A_IMPORT="import com.amazon.geo.maps" | |
G_IMPORT="import com.google.android.maps" | |
A_VIEW="com.amazon.geo.maps.MapView" | |
G_VIEW="com.google.android.maps.MapView" | |
if [ "$1" = "a" ]; then | |
FR=$G_IMPORT |
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
<!-- fixes for broken Holo text appearances on Kindle Fire 2/HD --> | |
<style name="TextAppearance.KindleFix.Small" parent="android:TextAppearance" > | |
<item name="android:textSize">14sp</item> | |
<item name="android:textColor">?android:attr/textColorSecondary</item> | |
</style> | |
<style name="TextAppearance.KindleFix.Small.Inverse" > | |
<item name="android:textColor">?android:attr/textColorSecondaryInverse</item> | |
<item name="android:textColorHint">?android:attr/textColorHintInverse</item> |
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
/*** | |
* Copyright (c) 2012 readyState Software Ltd | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may | |
* not use this file except in compliance with the License. You may obtain | |
* a copy of the License at | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" > | |
<FrameLayout | |
android:layout_width="match_parent" | |
android:layout_height="0dp" | |
android:layout_weight="1" > |
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.readystatesoftware.views; | |
import android.content.Context; | |
import android.graphics.Rect; | |
import android.util.AttributeSet; | |
import android.widget.LinearLayout; | |
public class FittingLinearLayout extends LinearLayout { | |
public FittingLinearLayout(Context context, AttributeSet attrs, int defStyle) { |
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
/******************************************************************************* | |
* Copyright 2011, 2012 Chris Banes. 2013 readyState Software Ltd. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
OlderNewer