merge heads

This commit is contained in:
Jimmy Shih
2012-03-21 13:05:41 -07:00
76 changed files with 281 additions and 529 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Before

Width:  |  Height:  |  Size: 671 B

After

Width:  |  Height:  |  Size: 671 B

Before

Width:  |  Height:  |  Size: 680 B

After

Width:  |  Height:  |  Size: 680 B

Before

Width:  |  Height:  |  Size: 738 B

After

Width:  |  Height:  |  Size: 738 B

Before

Width:  |  Height:  |  Size: 783 B

After

Width:  |  Height:  |  Size: 783 B

Before

Width:  |  Height:  |  Size: 746 B

After

Width:  |  Height:  |  Size: 746 B

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 720 B

Before

Width:  |  Height:  |  Size: 703 B

After

Width:  |  Height:  |  Size: 703 B

Before

Width:  |  Height:  |  Size: 671 B

After

Width:  |  Height:  |  Size: 671 B

Before

Width:  |  Height:  |  Size: 810 B

After

Width:  |  Height:  |  Size: 810 B

Before

Width:  |  Height:  |  Size: 698 B

After

Width:  |  Height:  |  Size: 698 B

Before

Width:  |  Height:  |  Size: 694 B

After

Width:  |  Height:  |  Size: 694 B

Before

Width:  |  Height:  |  Size: 725 B

After

Width:  |  Height:  |  Size: 725 B

Before

Width:  |  Height:  |  Size: 805 B

After

Width:  |  Height:  |  Size: 805 B

Before

Width:  |  Height:  |  Size: 812 B

After

Width:  |  Height:  |  Size: 812 B

Before

Width:  |  Height:  |  Size: 689 B

After

Width:  |  Height:  |  Size: 689 B

Before

Width:  |  Height:  |  Size: 760 B

After

Width:  |  Height:  |  Size: 760 B

Before

Width:  |  Height:  |  Size: 707 B

After

Width:  |  Height:  |  Size: 707 B

Before

Width:  |  Height:  |  Size: 743 B

After

Width:  |  Height:  |  Size: 743 B

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before

Width:  |  Height:  |  Size: 384 B

After

Width:  |  Height:  |  Size: 384 B

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Before

Width:  |  Height:  |  Size: 913 B

After

Width:  |  Height:  |  Size: 913 B

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 286 B

After

Width:  |  Height:  |  Size: 286 B

Before

Width:  |  Height:  |  Size: 275 B

After

Width:  |  Height:  |  Size: 275 B

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 974 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 B

+77 -82
View File
@@ -14,93 +14,88 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_width="fill_parent" android:layout_width="fill_parent" >
android:orientation="vertical">
<TableLayout <LinearLayout
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:shrinkColumns="0" android:orientation="vertical"
android:stretchColumns="0"> android:padding="8dp" >
<TextView <TextView
android:background="@drawable/list_bar" android:drawableLeft="@drawable/x_axis"
android:drawablePadding="8dp"
android:gravity="bottom"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" android:layout_width="wrap_content"
android:paddingLeft="10dp" style="@android:style/TextAppearance.DeviceDefault.Large"
android:text="@string/menu_chart_view_chart_settings" android:text="@string/chart_settings_x_axis" />
android:textColor="@color/white"
android:textSize="20sp"/> <RadioGroup
</TableLayout> android:id="@+id/chart_settings_x"
<ScrollView
android:layout_height="0dp"
android:layout_weight="1"
android:layout_width="fill_parent">
<LinearLayout
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" android:layout_width="wrap_content" >
android:orientation="vertical"
android:padding="10dp"> <RadioButton
<!-- X axis --> android:id="@+id/chart_settings_by_distance"
<TextView
android:drawableLeft="@drawable/x_axis"
android:drawablePadding="10dp"
android:text="@string/chart_settings_x_axis"
style="@style/ChartSettingsAxisText"/>
<RadioGroup
android:id="@+id/chart_settings_x"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent"> android:layout_width="wrap_content"
<RadioButton style="@android:style/TextAppearance.DeviceDefault.Medium"
android:id="@+id/chart_settings_by_distance" android:text="@string/chart_settings_by_distance" />
android:text="@string/chart_settings_by_distance"
style="@style/ChartSettingsRadioButton"/> <RadioButton
<RadioButton android:id="@+id/chart_settings_by_time"
android:id="@+id/chart_settings_by_time" android:layout_height="wrap_content"
android:text="@string/chart_settings_by_time" android:layout_width="wrap_content"
style="@style/ChartSettingsRadioButton"/> style="@android:style/TextAppearance.DeviceDefault.Medium"
</RadioGroup> android:text="@string/chart_settings_by_time" />
<!-- Y axis --> </RadioGroup>
<TextView
android:drawableLeft="@drawable/y_axis" <TextView
android:drawablePadding="10dp" android:drawableLeft="@drawable/y_axis"
android:paddingTop="10dp" android:drawablePadding="8dp"
android:text="@string/chart_settings_y_axis" android:gravity="bottom"
style="@style/ChartSettingsAxisText"/> android:layout_height="wrap_content"
<CheckBox android:layout_width="wrap_content"
android:id="@+id/chart_settings_elevation" style="@android:style/TextAppearance.DeviceDefault.Large"
android:text="@string/stat_elevation" android:text="@string/chart_settings_y_axis" />
style="@style/ChartSettingsCheckbox"/>
<CheckBox <CheckBox
android:id="@+id/chart_settings_speed" android:id="@+id/chart_settings_elevation"
android:text="@string/stat_speed" android:layout_height="wrap_content"
style="@style/ChartSettingsCheckbox"/> android:layout_width="wrap_content"
<CheckBox style="@android:style/TextAppearance.DeviceDefault.Medium"
android:id="@+id/chart_settings_power" android:text="@string/stat_elevation" />
android:text="@string/sensor_state_power"
style="@style/ChartSettingsCheckbox"/> <CheckBox
<CheckBox android:id="@+id/chart_settings_speed"
android:id="@+id/chart_settings_cadence" android:layout_height="wrap_content"
android:text="@string/sensor_state_cadence" android:layout_width="wrap_content"
style="@style/ChartSettingsCheckbox"/> style="@android:style/TextAppearance.DeviceDefault.Medium"
<CheckBox android:text="@string/stat_speed" />
android:id="@+id/chart_settings_heart_rate"
android:text="@string/sensor_state_heart_rate" <CheckBox
style="@style/ChartSettingsCheckbox"/> android:id="@+id/chart_settings_power"
</LinearLayout> android:layout_height="wrap_content"
</ScrollView> android:layout_width="wrap_content"
<LinearLayout style="@style/ButtonLayout"> style="@android:style/TextAppearance.DeviceDefault.Medium"
<LinearLayout style="@style/ButtonSpacer"/> android:text="@string/sensor_state_power" />
<Button
android:id="@+id/chart_settings_ok" <CheckBox
android:layout_gravity="left" android:id="@+id/chart_settings_cadence"
android:text="@string/generic_ok" android:layout_height="wrap_content"
style="@style/Button"/> android:layout_width="wrap_content"
<Button style="@android:style/TextAppearance.DeviceDefault.Medium"
android:id="@+id/chart_settings_cancel" android:text="@string/sensor_state_cadence" />
android:layout_gravity="right"
android:text="@string/generic_cancel" <CheckBox
style="@style/Button"/> android:id="@+id/chart_settings_heart_rate"
<LinearLayout style="@style/ButtonSpacer"/> android:layout_height="wrap_content"
android:layout_width="wrap_content"
style="@android:style/TextAppearance.DeviceDefault.Medium"
android:text="@string/sensor_state_heart_rate" />
</LinearLayout> </LinearLayout>
</LinearLayout>
</ScrollView>
+82 -83
View File
@@ -14,93 +14,92 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_width="fill_parent" android:layout_width="fill_parent" >
android:orientation="vertical">
<TextView <TableLayout
android:background="@drawable/list_bar"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:paddingLeft="10dp" android:stretchColumns="1" >
android:text="@string/send_google_title"
android:textColor="@color/white"
android:textSize="20sp"/>
<ScrollView
android:layout_height="0dp"
android:layout_margin="5dp"
android:layout_weight="1"
android:layout_width="fill_parent">
<TableLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:stretchColumns="1">
<!-- Google Maps --> <TableRow android:id="@+id/send_google_maps_row" >
<TableRow android:id="@+id/send_google_maps_row">
<ImageView <ImageView
android:contentDescription="@string/send_google_maps" android:contentDescription="@string/send_google_maps"
android:src="@drawable/maps_icon" android:layout_height="wrap_content"
style="@style/SendGoogleImageView"/> android:layout_width="wrap_content"
<CheckBox android:src="@drawable/maps_icon" />
android:id="@+id/send_google_maps"
android:text="@string/send_google_maps" <CheckBox
style="@style/SendGoogleCheckBox"/> android:id="@+id/send_google_maps"
</TableRow> android:layout_gravity="center_vertical"
<TableRow android:id="@+id/send_google_maps_option_row"> android:layout_height="wrap_content"
<RadioGroup android:layout_marginLeft="8dp"
android:layout_column="1" android:layout_width="0dp"
style="@android:style/TextAppearance.DeviceDefault.Medium"
android:text="@string/send_google_maps" />
</TableRow>
<TableRow android:id="@+id/send_google_maps_option_row" >
<RadioGroup
android:layout_column="1"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_width="0dp" >
<RadioButton
android:id="@+id/send_google_new_map"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_width="wrap_content"
android:layout_width="0dp"> style="@android:style/TextAppearance.DeviceDefault.Medium"
<RadioButton android:text="@string/send_google_new_map" />
android:id="@+id/send_google_new_map"
android:text="@string/send_google_new_map"
style="@style/SendGoogleRadioButton"/>
<RadioButton
android:id="@+id/send_google_existing_map"
android:text="@string/send_google_existing_map"
style="@style/SendGoogleRadioButton"/>
</RadioGroup>
</TableRow>
<!-- Google Fusion Tables --> <RadioButton
<TableRow android:id="@+id/send_google_fusion_tables_row"> android:id="@+id/send_google_existing_map"
<ImageView android:layout_height="wrap_content"
android:contentDescription="@string/send_google_fusion_tables" android:layout_width="wrap_content"
android:src="@drawable/googledocs_icon" style="@android:style/TextAppearance.DeviceDefault.Medium"
style="@style/SendGoogleImageView"/> android:text="@string/send_google_existing_map" />
<CheckBox </RadioGroup>
android:id="@+id/send_google_fusion_tables" </TableRow>
android:text="@string/send_google_fusion_tables"
style="@style/SendGoogleCheckBox"/>
</TableRow>
<!-- Google Docs --> <TableRow android:id="@+id/send_google_fusion_tables_row" >
<TableRow android:id="@+id/send_google_docs_row">
<ImageView <ImageView
android:contentDescription="@string/send_google_docs" android:contentDescription="@string/send_google_fusion_tables"
android:src="@drawable/googledocs_icon" android:layout_height="wrap_content"
style="@style/SendGoogleImageView"/> android:layout_width="wrap_content"
<CheckBox android:src="@drawable/googledocs_icon" />
android:id="@+id/send_google_docs"
android:text="@string/send_google_docs" <CheckBox
style="@style/SendGoogleCheckBox"/> android:id="@+id/send_google_fusion_tables"
</TableRow> android:layout_gravity="center_vertical"
</TableLayout> android:layout_height="wrap_content"
</ScrollView> android:layout_marginLeft="8dp"
<LinearLayout style="@style/ButtonLayout"> android:layout_width="0dp"
<LinearLayout style="@style/ButtonSpacer"/> style="@android:style/TextAppearance.DeviceDefault.Medium"
<Button android:text="@string/send_google_fusion_tables" />
android:id="@+id/send_google_send_now" </TableRow>
android:layout_gravity="left" <TableRow android:id="@+id/send_google_docs_row" >
android:text="@string/send_google_send_now"
style="@style/Button"/> <ImageView
<Button android:contentDescription="@string/send_google_docs"
android:id="@+id/send_google_cancel" android:layout_height="wrap_content"
android:layout_gravity="right" android:layout_width="wrap_content"
android:text="@string/generic_cancel" android:src="@drawable/googledocs_icon" />
style="@style/Button"/>
<LinearLayout style="@style/ButtonSpacer"/> <CheckBox
</LinearLayout> android:id="@+id/send_google_docs"
</LinearLayout> android:layout_gravity="center_vertical"
android:layout_height="fill_parent"
android:layout_marginLeft="8dp"
android:layout_width="0dp"
style="@android:style/TextAppearance.DeviceDefault.Medium"
android:text="@string/send_google_docs" />
</TableRow>
</TableLayout>
</ScrollView>
+1 -1
View File
@@ -41,7 +41,7 @@ limitations under the License.
android:title="@string/menu_markers"/> android:title="@string/menu_markers"/>
<item <item
android:icon="@drawable/chart_settings" android:icon="@drawable/ic_menu_chartsettings"
android:id="@+id/menu_chart_settings" android:id="@+id/menu_chart_settings"
android:showAsAction="ifRoom" android:showAsAction="ifRoom"
android:title="@string/menu_chart_view_chart_settings" android:title="@string/menu_chart_view_chart_settings"
+5
View File
@@ -1292,6 +1292,11 @@ limitations under the License.
found."> found.">
No account found No account found
</string> </string>
<string name="send_google_no_service_selected"
translation_description="When sending a track to Google, a message indicating that the user has
not selected any Google service and no data is sent.">
You did not select any service. No data is sent.
</string>
<string name="send_google_progress_title" <string name="send_google_progress_title"
translation_description="When sending a track to a Google service, the title on the progress translation_description="When sending a track to a Google service, the title on the progress
dialog. dialog.
-43
View File
@@ -47,49 +47,6 @@ limitations under the License.
<item name="android:visibility">gone</item> <item name="android:visibility">gone</item>
</style> </style>
<!-- Chart settings axis text -->
<style name="ChartSettingsAxisText">
<item name="android:gravity">bottom</item>
<item name="android:layout_height">fill_parent</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:textSize">20sp</item>
</style>
<!-- Chart settings checkbox -->
<style name="ChartSettingsCheckbox">
<item name="android:checked">true</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
</style>
<!-- Chart settings radio button -->
<style name="ChartSettingsRadioButton">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
</style>
<!-- Send Google CheckBox -->
<style name="SendGoogleCheckBox">
<item name="android:checked">true</item>
<item name="android:layout_height">fill_parent</item>
<item name="android:layout_marginLeft">10dp</item>
<item name="android:layout_width">0dp</item>
<item name="android:textSize">18sp</item>
</style>
<!-- Send Google ImageView -->
<style name="SendGoogleImageView">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
</style>
<!-- Send Google RadioButton -->
<style name="SendGoogleRadioButton">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:textSize">18sp</item>
</style>
<style name="SensorStateLabel"> <style name="SensorStateLabel">
<item name="android:layout_height">wrap_content</item> <item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">fill_parent</item> <item name="android:layout_width">fill_parent</item>
@@ -35,9 +35,9 @@ import com.google.android.maps.mytracks.R;
import com.google.common.annotations.VisibleForTesting; import com.google.common.annotations.VisibleForTesting;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog; import android.app.Dialog;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.location.Location; import android.location.Location;
import android.os.Bundle; import android.os.Bundle;
import android.speech.tts.TextToSpeech; import android.speech.tts.TextToSpeech;
@@ -45,7 +45,9 @@ import android.util.Log;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams; import android.view.ViewGroup.LayoutParams;
import android.widget.CheckBox;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.RadioGroup;
import android.widget.ZoomControls; import android.widget.ZoomControls;
import java.util.ArrayList; import java.util.ArrayList;
@@ -59,7 +61,7 @@ import java.util.EnumSet;
*/ */
public class ChartActivity extends Activity implements TrackDataListener { public class ChartActivity extends Activity implements TrackDataListener {
public static final int CHART_SETTINGS_DIALOG = 1; private static final int DIALOG_CHART_SETTINGS_ID = 0;
private final DoubleBuffer elevationBuffer = private final DoubleBuffer elevationBuffer =
new DoubleBuffer(Constants.ELEVATION_SMOOTHING_FACTOR); new DoubleBuffer(Constants.ELEVATION_SMOOTHING_FACTOR);
@@ -185,43 +187,60 @@ public class ChartActivity extends Activity implements TrackDataListener {
@Override @Override
protected Dialog onCreateDialog(int id) { protected Dialog onCreateDialog(int id) {
if (id == CHART_SETTINGS_DIALOG) { switch (id) {
final ChartSettingsDialog settingsDialog = new ChartSettingsDialog(this); case DIALOG_CHART_SETTINGS_ID:
settingsDialog.setOnClickListener(new OnClickListener() { View view = getLayoutInflater().inflate(R.layout.chart_settings, null);
@Override final RadioGroup radioGroup = (RadioGroup) view.findViewById(R.id.chart_settings_x);
public void onClick(DialogInterface arg0, int which) { radioGroup.check(chartView.getMode() == Mode.BY_DISTANCE
if (which != DialogInterface.BUTTON_POSITIVE) { ? R.id.chart_settings_by_distance : R.id.chart_settings_by_time);
return;
}
for (int i = 0; i < ChartView.NUM_SERIES; i++) { final CheckBox[] checkBoxes = new CheckBox[ChartView.NUM_SERIES];
chartView.setChartValueSeriesEnabled(i, settingsDialog.isSeriesEnabled(i)); checkBoxes[ChartView.ELEVATION_SERIES] = (CheckBox) view.findViewById(
} R.id.chart_settings_elevation);
setMode(settingsDialog.getMode()); checkBoxes[ChartView.SPEED_SERIES] = (CheckBox) view.findViewById(
chartView.postInvalidate(); R.id.chart_settings_speed);
checkBoxes[ChartView.POWER_SERIES] = (CheckBox) view.findViewById(
R.id.chart_settings_power);
checkBoxes[ChartView.CADENCE_SERIES] = (CheckBox) view.findViewById(
R.id.chart_settings_cadence);
checkBoxes[ChartView.HEART_RATE_SERIES] = (CheckBox) view.findViewById(
R.id.chart_settings_heart_rate);
// set checkboxes values
for (int i = 0; i < ChartView.NUM_SERIES; i++) {
checkBoxes[i].setChecked(chartView.isChartValueSeriesEnabled(i));
} }
}); checkBoxes[ChartView.SPEED_SERIES]
return settingsDialog; .setText(reportSpeed ? R.string.stat_speed : R.string.stat_pace);
}
return new AlertDialog.Builder(this)
return super.onCreateDialog(id); .setCancelable(true)
} .setNegativeButton(R.string.generic_cancel, null)
.setPositiveButton(R.string.generic_ok, new DialogInterface.OnClickListener() {
@Override @Override
protected void onPrepareDialog(int id, Dialog dialog) { public void onClick(DialogInterface dialog, int which) {
super.onPrepareDialog(id, dialog); setMode(radioGroup.getCheckedRadioButtonId() == R.id.chart_settings_by_distance
? Mode.BY_DISTANCE
if (id == CHART_SETTINGS_DIALOG) { : Mode.BY_TIME);
prepareSettingsDialog((ChartSettingsDialog) dialog); for (int i = 0; i < ChartView.NUM_SERIES; i++) {
chartView.setChartValueSeriesEnabled(i, checkBoxes[i].isChecked());
}
chartView.postInvalidate();
}
})
.setTitle(R.string.menu_chart_view_chart_settings)
.setView(view)
.create();
default:
return null;
} }
} }
private void prepareSettingsDialog(ChartSettingsDialog settingsDialog) { /**
settingsDialog.setMode(chartView.getMode()); * Shows the chart settings dialog
settingsDialog.setDisplaySpeed(reportSpeed); */
for (int i = 0; i < ChartView.NUM_SERIES; i++) { public void showChartSettingsDialog() {
settingsDialog.setSeriesEnabled(i, chartView.isChartValueSeriesEnabled(i)); showDialog(DIALOG_CHART_SETTINGS_ID);
}
} }
/** /**
@@ -1,127 +0,0 @@
/*
* Copyright 2009 Google Inc.
*
* 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. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.android.apps.mytracks;
import com.google.android.apps.mytracks.ChartView.Mode;
import com.google.android.maps.mytracks.R;
import com.google.common.annotations.VisibleForTesting;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.RadioButton;
import android.widget.RadioGroup;
/**
* An activity that allows the user to set the chart settings.
*
* @author Sandor Dornbush
*/
public class ChartSettingsDialog extends Dialog {
private RadioButton distance;
private CheckBox[] series;
private OnClickListener clickListener;
public ChartSettingsDialog(Context context) {
super(context);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.chart_settings);
Button cancel = (Button) findViewById(R.id.chart_settings_cancel);
cancel.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
if (clickListener != null) {
clickListener.onClick(ChartSettingsDialog.this, BUTTON_NEGATIVE);
}
dismiss();
}
});
Button okButton = (Button) findViewById(R.id.chart_settings_ok);
okButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
if (clickListener != null) {
clickListener.onClick(ChartSettingsDialog.this, BUTTON_POSITIVE);
}
dismiss();
}
});
distance = (RadioButton) findViewById(R.id.chart_settings_by_distance);
series = new CheckBox[ChartView.NUM_SERIES];
series[ChartView.ELEVATION_SERIES] =
(CheckBox) findViewById(R.id.chart_settings_elevation);
series[ChartView.SPEED_SERIES] =
(CheckBox) findViewById(R.id.chart_settings_speed);
series[ChartView.POWER_SERIES] =
(CheckBox) findViewById(R.id.chart_settings_power);
series[ChartView.CADENCE_SERIES] =
(CheckBox) findViewById(R.id.chart_settings_cadence);
series[ChartView.HEART_RATE_SERIES] =
(CheckBox) findViewById(R.id.chart_settings_heart_rate);
}
public void setMode(Mode mode) {
RadioGroup rd = (RadioGroup) findViewById(R.id.chart_settings_x);
rd.check(mode == Mode.BY_DISTANCE
? R.id.chart_settings_by_distance
: R.id.chart_settings_by_time);
}
/**
* Sets whether to display speed or pace.
*
* @param displaySpeed true to display speed
*/
public void setDisplaySpeed(boolean displaySpeed) {
series[ChartView.SPEED_SERIES].setText(displaySpeed ? R.string.stat_speed : R.string.stat_pace);
}
public void setSeriesEnabled(int seriesIdx, boolean enabled) {
series[seriesIdx].setChecked(enabled);
}
public Mode getMode() {
if (distance == null) return Mode.BY_DISTANCE;
return distance.isChecked() ? Mode.BY_DISTANCE : Mode.BY_TIME;
}
public boolean isSeriesEnabled(int seriesIdx) {
if (series == null) return true;
return series[seriesIdx].isChecked();
}
public void setOnClickListener(OnClickListener clickListener) {
this.clickListener = clickListener;
}
@VisibleForTesting
CheckBox[] getSeries() {
return series;
}
}
@@ -167,7 +167,7 @@ public class MyTracks extends TabActivity implements OnTouchListener {
android.R.drawable.ic_menu_mapmode)) android.R.drawable.ic_menu_mapmode))
.setContent(new Intent(this, MapActivity.class))); .setContent(new Intent(this, MapActivity.class)));
tabHost.addTab(tabHost.newTabSpec(STATS_TAB_TAG) tabHost.addTab(tabHost.newTabSpec(STATS_TAB_TAG)
.setIndicator("Stats", res.getDrawable(R.drawable.menu_stats)) .setIndicator("Stats", res.getDrawable(R.drawable.ic_menu_statistics))
.setContent(new Intent(this, StatsActivity.class))); .setContent(new Intent(this, StatsActivity.class)));
tabHost.addTab(tabHost.newTabSpec(CHART_TAB_TAG) tabHost.addTab(tabHost.newTabSpec(CHART_TAB_TAG)
.setIndicator("Chart", res.getDrawable(R.drawable.menu_elevation)) .setIndicator("Chart", res.getDrawable(R.drawable.menu_elevation))
@@ -540,7 +540,7 @@ public class MyTracks extends TabActivity implements OnTouchListener {
public void showChartSettings() { public void showChartSettings() {
ChartActivity chart = getChartTab(); ChartActivity chart = getChartTab();
if (chart != null) { if (chart != null) {
chart.showDialog(ChartActivity.CHART_SETTINGS_DIALOG); chart.showChartSettingsDialog();
} }
} }
@@ -22,6 +22,7 @@ import com.google.android.maps.mytracks.R;
import com.google.common.annotations.VisibleForTesting; import com.google.common.annotations.VisibleForTesting;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog; import android.app.Dialog;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
@@ -30,27 +31,26 @@ import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor; import android.content.SharedPreferences.Editor;
import android.os.Bundle; import android.os.Bundle;
import android.view.View; import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.CheckBox; import android.widget.CheckBox;
import android.widget.CompoundButton; import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener; import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.RadioButton; import android.widget.RadioButton;
import android.widget.TableRow; import android.widget.TableRow;
import android.widget.Toast;
import java.util.ArrayList; import java.util.ArrayList;
/** /**
* A chooser to select the Google services to upload a track to. * A chooser to select the Google services to upload a track to.
* *
* @author Jimmy Shih * @author Jimmy Shih
*/ */
public class UploadServiceChooserActivity extends Activity { public class UploadServiceChooserActivity extends Activity {
private static final int SERVICE_PICKER_DIALOG = 1; private static final int DIALOG_CHOOSER_ID = 0;
private SendRequest sendRequest; private SendRequest sendRequest;
private Dialog dialog; private AlertDialog alertDialog;
private TableRow mapsTableRow; private TableRow mapsTableRow;
private TableRow fusionTablesTableRow; private TableRow fusionTablesTableRow;
@@ -64,9 +64,6 @@ public class UploadServiceChooserActivity extends Activity {
private RadioButton newMapRadioButton; private RadioButton newMapRadioButton;
private RadioButton existingMapRadioButton; private RadioButton existingMapRadioButton;
private Button cancel;
private Button send;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@@ -76,35 +73,26 @@ public class UploadServiceChooserActivity extends Activity {
@Override @Override
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
showDialog(SERVICE_PICKER_DIALOG); showDialog(DIALOG_CHOOSER_ID);
} }
@Override @Override
protected Dialog onCreateDialog(int id) { protected Dialog onCreateDialog(int id) {
switch (id) { switch (id) {
case SERVICE_PICKER_DIALOG: case DIALOG_CHOOSER_ID:
dialog = new Dialog(this); View view = getLayoutInflater().inflate(R.layout.upload_service_chooser, null);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.upload_service_chooser);
dialog.setCancelable(true);
dialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface d) {
finish();
}
});
mapsTableRow = (TableRow) dialog.findViewById(R.id.send_google_maps_row); mapsTableRow = (TableRow) view.findViewById(R.id.send_google_maps_row);
fusionTablesTableRow = (TableRow) dialog.findViewById(R.id.send_google_fusion_tables_row); fusionTablesTableRow = (TableRow) view.findViewById(R.id.send_google_fusion_tables_row);
docsTableRow = (TableRow) dialog.findViewById(R.id.send_google_docs_row); docsTableRow = (TableRow) view.findViewById(R.id.send_google_docs_row);
mapsCheckBox = (CheckBox) dialog.findViewById(R.id.send_google_maps); mapsCheckBox = (CheckBox) view.findViewById(R.id.send_google_maps);
fusionTablesCheckBox = (CheckBox) dialog.findViewById(R.id.send_google_fusion_tables); fusionTablesCheckBox = (CheckBox) view.findViewById(R.id.send_google_fusion_tables);
docsCheckBox = (CheckBox) dialog.findViewById(R.id.send_google_docs); docsCheckBox = (CheckBox) view.findViewById(R.id.send_google_docs);
mapsOptionTableRow = (TableRow) dialog.findViewById(R.id.send_google_maps_option_row); mapsOptionTableRow = (TableRow) view.findViewById(R.id.send_google_maps_option_row);
newMapRadioButton = (RadioButton) dialog.findViewById(R.id.send_google_new_map); newMapRadioButton = (RadioButton) view.findViewById(R.id.send_google_new_map);
existingMapRadioButton = (RadioButton) dialog.findViewById(R.id.send_google_existing_map); existingMapRadioButton = (RadioButton) view.findViewById(R.id.send_google_existing_map);
// Setup checkboxes // Setup checkboxes
OnCheckedChangeListener checkBoxListener = new OnCheckedChangeListener() { OnCheckedChangeListener checkBoxListener = new OnCheckedChangeListener() {
@@ -116,31 +104,48 @@ public class UploadServiceChooserActivity extends Activity {
fusionTablesCheckBox.setOnCheckedChangeListener(checkBoxListener); fusionTablesCheckBox.setOnCheckedChangeListener(checkBoxListener);
docsCheckBox.setOnCheckedChangeListener(checkBoxListener); docsCheckBox.setOnCheckedChangeListener(checkBoxListener);
// Setup buttons
cancel = (Button) dialog.findViewById(R.id.send_google_cancel);
cancel.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
finish();
}
});
send = (Button) dialog.findViewById(R.id.send_google_send_now);
send.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
saveState();
startNextActivity();
}
});
// Setup initial state // Setup initial state
initState(); initState();
// Update state based on sendRequest // Update state based on sendRequest
updateStateBySendRequest(); updateStateBySendRequest();
// Update state based on current user selection // Update state based on current selection
updateStateBySelection(); updateStateBySelection();
return dialog; alertDialog = new AlertDialog.Builder(this)
.setCancelable(true)
.setNegativeButton(R.string.generic_cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
finish();
}
})
.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface d) {
finish();
}
})
.setPositiveButton(
R.string.send_google_send_now, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
saveState();
if (sendMaps() || sendFusionTables() || sendDocs()) {
startNextActivity();
} else {
Toast.makeText(UploadServiceChooserActivity.this,
R.string.send_google_no_service_selected, Toast.LENGTH_LONG).show();
finish();
}
}
})
.setTitle(R.string.send_google_title)
.setView(view)
.create();
return alertDialog;
default: default:
return null; return null;
} }
@@ -186,7 +191,6 @@ public class UploadServiceChooserActivity extends Activity {
*/ */
private void updateStateBySelection() { private void updateStateBySelection() {
mapsOptionTableRow.setVisibility(sendMaps() ? View.VISIBLE : View.GONE); mapsOptionTableRow.setVisibility(sendMaps() ? View.VISIBLE : View.GONE);
send.setEnabled(sendMaps() || sendFusionTables() || sendDocs());
} }
/** /**
@@ -242,7 +246,7 @@ public class UploadServiceChooserActivity extends Activity {
startActivity(intent); startActivity(intent);
finish(); finish();
} }
/** /**
* Sends stats to Google Analytics. * Sends stats to Google Analytics.
*/ */
@@ -259,12 +263,12 @@ public class UploadServiceChooserActivity extends Activity {
} }
AnalyticsUtils.sendPageViews(this, pages.toArray(new String[pages.size()])); AnalyticsUtils.sendPageViews(this, pages.toArray(new String[pages.size()]));
} }
@VisibleForTesting @VisibleForTesting
Dialog getDialog() { AlertDialog getAlertDialog() {
return dialog; return alertDialog;
} }
@VisibleForTesting @VisibleForTesting
SendRequest getSendRequest() { SendRequest getSendRequest() {
return sendRequest; return sendRequest;
@@ -1,82 +0,0 @@
/*
* Copyright 2012 Google Inc.
*
* 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. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.android.apps.mytracks;
import com.google.android.apps.mytracks.ChartView.Mode;
import com.google.android.maps.mytracks.R;
import android.test.ActivityInstrumentationTestCase2;
/**
* Tests the {@link ChartSettingsDialog}.
*
* @author Youtao Liu
*/
public class ChartSettingsDialogTest extends ActivityInstrumentationTestCase2<ChartActivity> {
private ChartSettingsDialog chartSettingsDialog;
public ChartSettingsDialogTest() {
super(ChartActivity.class);
}
@Override
protected void setUp() throws Exception {
super.setUp();
chartSettingsDialog = new ChartSettingsDialog(getActivity());
chartSettingsDialog.show();
}
/**
* Tests the {@link ChartSettingsDialog#setMode} and check the result by
* {@link ChartSettingsDialog#getMode}. Gets all modes of Mode, then set and
* get each mode.
*/
public void testSetMode() {
Mode[] modes = Mode.values();
for (Mode mode : modes) {
chartSettingsDialog.setMode(mode);
assertEquals(mode, chartSettingsDialog.getMode());
}
}
/**
* Tests the {@link ChartSettingsDialog#setDisplaySpeed}.
*/
public void testSetDisplaySpeed() {
chartSettingsDialog.setDisplaySpeed(true);
assertEquals(getActivity().getString(R.string.stat_speed),
chartSettingsDialog.getSeries()[ChartView.SPEED_SERIES].getText());
chartSettingsDialog.setDisplaySpeed(false);
assertEquals(getActivity().getString(R.string.stat_pace),
chartSettingsDialog.getSeries()[ChartView.SPEED_SERIES].getText());
}
/**
* Tests the {@link ChartSettingsDialog#setSeriesEnabled} and check the result
* by {@link ChartSettingsDialog#isSeriesEnabled}.
*/
public void testSetSeriesEnabled() {
for (int i = 0; i < ChartView.NUM_SERIES; i++) {
chartSettingsDialog.setSeriesEnabled(i, true);
assertEquals(true, chartSettingsDialog.getSeries()[i].isChecked());
assertEquals(true, chartSettingsDialog.isSeriesEnabled(i));
chartSettingsDialog.setSeriesEnabled(i, false);
assertEquals(false, chartSettingsDialog.getSeries()[i].isChecked());
assertEquals(false, chartSettingsDialog.isSeriesEnabled(i));
}
}
}
@@ -24,7 +24,6 @@ import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor; import android.content.SharedPreferences.Editor;
import android.test.ActivityInstrumentationTestCase2; import android.test.ActivityInstrumentationTestCase2;
import android.widget.Button;
import android.widget.CheckBox; import android.widget.CheckBox;
import android.widget.RadioButton; import android.widget.RadioButton;
@@ -59,7 +58,6 @@ public class UploadServiceChooserActivityTest extends
assertTrue(getMapsCheckBox().isShown()); assertTrue(getMapsCheckBox().isShown());
assertTrue(getFusionTablesCheckBox().isShown()); assertTrue(getFusionTablesCheckBox().isShown());
assertTrue(getDocsCheckBox().isShown()); assertTrue(getDocsCheckBox().isShown());
assertTrue(getCancelButton().isEnabled());
// Clicks to disable all send items. // Clicks to disable all send items.
uploadServiceChooserActivity.runOnUiThread(new Runnable() { uploadServiceChooserActivity.runOnUiThread(new Runnable() {
@@ -79,11 +77,9 @@ public class UploadServiceChooserActivityTest extends
assertTrue(getMapsCheckBox().isShown()); assertTrue(getMapsCheckBox().isShown());
assertTrue(getFusionTablesCheckBox().isShown()); assertTrue(getFusionTablesCheckBox().isShown());
assertTrue(getDocsCheckBox().isShown()); assertTrue(getDocsCheckBox().isShown());
assertTrue(getCancelButton().isEnabled());
assertFalse(getNewMapRadioButton().isShown()); assertFalse(getNewMapRadioButton().isShown());
assertFalse(getExistingMapRadioButton().isShown()); assertFalse(getExistingMapRadioButton().isShown());
assertFalse(getSendButton().isEnabled());
} }
/** /**
@@ -94,7 +90,6 @@ public class UploadServiceChooserActivityTest extends
initialActivity(true, false, false); initialActivity(true, false, false);
instrumentation.waitForIdleSync(); instrumentation.waitForIdleSync();
assertTrue(getMapsCheckBox().isShown()); assertTrue(getMapsCheckBox().isShown());
assertTrue(getCancelButton().isEnabled());
// Clicks to enable this items. // Clicks to enable this items.
uploadServiceChooserActivity.runOnUiThread(new Runnable() { uploadServiceChooserActivity.runOnUiThread(new Runnable() {
@@ -108,8 +103,6 @@ public class UploadServiceChooserActivityTest extends
assertTrue(getMapsCheckBox().isShown()); assertTrue(getMapsCheckBox().isShown());
assertTrue(getNewMapRadioButton().isShown()); assertTrue(getNewMapRadioButton().isShown());
assertTrue(getExistingMapRadioButton().isShown()); assertTrue(getExistingMapRadioButton().isShown());
assertTrue(getSendButton().isEnabled());
assertTrue(getCancelButton().isEnabled());
} }
/** /**
@@ -120,8 +113,6 @@ public class UploadServiceChooserActivityTest extends
assertFalse(getMapsCheckBox().isShown()); assertFalse(getMapsCheckBox().isShown());
assertFalse(getFusionTablesCheckBox().isShown()); assertFalse(getFusionTablesCheckBox().isShown());
assertFalse(getDocsCheckBox().isShown()); assertFalse(getDocsCheckBox().isShown());
assertFalse(getSendButton().isEnabled());
assertTrue(getCancelButton().isEnabled());
} }
/** /**
@@ -259,35 +250,26 @@ public class UploadServiceChooserActivityTest extends
uploadServiceChooserActivity = this.getActivity(); uploadServiceChooserActivity = this.getActivity();
} }
private Button getSendButton() {
return (Button) uploadServiceChooserActivity.getDialog()
.findViewById(R.id.send_google_send_now);
}
Button getCancelButton() {
return (Button) uploadServiceChooserActivity.getDialog().findViewById(R.id.send_google_cancel);
}
private CheckBox getMapsCheckBox() { private CheckBox getMapsCheckBox() {
return (CheckBox) uploadServiceChooserActivity.getDialog().findViewById(R.id.send_google_maps); return (CheckBox) uploadServiceChooserActivity.getAlertDialog().findViewById(R.id.send_google_maps);
} }
private CheckBox getFusionTablesCheckBox() { private CheckBox getFusionTablesCheckBox() {
return (CheckBox) uploadServiceChooserActivity.getDialog().findViewById( return (CheckBox) uploadServiceChooserActivity.getAlertDialog().findViewById(
R.id.send_google_fusion_tables); R.id.send_google_fusion_tables);
} }
private CheckBox getDocsCheckBox() { private CheckBox getDocsCheckBox() {
return (CheckBox) uploadServiceChooserActivity.getDialog().findViewById(R.id.send_google_docs); return (CheckBox) uploadServiceChooserActivity.getAlertDialog().findViewById(R.id.send_google_docs);
} }
private RadioButton getNewMapRadioButton() { private RadioButton getNewMapRadioButton() {
return (RadioButton) uploadServiceChooserActivity.getDialog().findViewById( return (RadioButton) uploadServiceChooserActivity.getAlertDialog().findViewById(
R.id.send_google_new_map); R.id.send_google_new_map);
} }
private RadioButton getExistingMapRadioButton() { private RadioButton getExistingMapRadioButton() {
return (RadioButton) uploadServiceChooserActivity.getDialog().findViewById( return (RadioButton) uploadServiceChooserActivity.getAlertDialog().findViewById(
R.id.send_google_existing_map); R.id.send_google_existing_map);
} }
} }