Add split button
This commit is contained in:
parent
73a17e271d
commit
8e41f6d861
4 changed files with 73 additions and 25 deletions
|
@ -262,15 +262,31 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:orientation="horizontal"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:gravity="center">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/details_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:id="@+id/split_interval"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:gravity="left|center_vertical"
|
||||
android:textColor="?attr/color_dialog_buttons"
|
||||
android:textSize="@dimen/default_sub_text_size"
|
||||
osmand:textAllCapsCompat="true"
|
||||
osmand:typeface="@string/font_roboto_medium"
|
||||
android:text="@string/gpx_split_interval"/>
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:id="@+id/analyze_on_map"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:gravity="right|center_vertical"
|
||||
android:textColor="?attr/color_dialog_buttons"
|
||||
android:textSize="@dimen/default_sub_text_size"
|
||||
|
|
|
@ -280,15 +280,31 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:orientation="horizontal"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:gravity="center">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/details_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:id="@+id/split_interval"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:gravity="left|center_vertical"
|
||||
android:textColor="?attr/color_dialog_buttons"
|
||||
android:textSize="@dimen/default_sub_text_size"
|
||||
osmand:textAllCapsCompat="true"
|
||||
osmand:typeface="@string/font_roboto_medium"
|
||||
android:text="@string/gpx_split_interval"/>
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:id="@+id/analyze_on_map"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:gravity="right|center_vertical"
|
||||
android:textColor="?attr/color_dialog_buttons"
|
||||
android:textSize="@dimen/default_sub_text_size"
|
||||
|
|
|
@ -262,15 +262,31 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:orientation="horizontal"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:gravity="center">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/details_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:id="@+id/split_interval"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:gravity="left|center_vertical"
|
||||
android:textColor="?attr/color_dialog_buttons"
|
||||
android:textSize="@dimen/default_sub_text_size"
|
||||
osmand:textAllCapsCompat="true"
|
||||
osmand:typeface="@string/font_roboto_medium"
|
||||
android:text="@string/gpx_split_interval"/>
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:id="@+id/analyze_on_map"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:gravity="right|center_vertical"
|
||||
android:textColor="?attr/color_dialog_buttons"
|
||||
android:textSize="@dimen/default_sub_text_size"
|
||||
|
|
|
@ -1172,10 +1172,10 @@ public class TrackSegmentFragment extends OsmAndListFragment {
|
|||
view.findViewById(R.id.list_divider).setVisibility(View.GONE);
|
||||
view.findViewById(R.id.start_end_time).setVisibility(View.GONE);
|
||||
}
|
||||
view.findViewById(R.id.details_view).setOnClickListener(new View.OnClickListener() {
|
||||
view.findViewById(R.id.analyze_on_map).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
openDetails(GPXTabItemType.GPX_TAB_ITEM_GENERAL);
|
||||
openAnalyzeOnMap(GPXTabItemType.GPX_TAB_ITEM_GENERAL);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1216,10 +1216,10 @@ public class TrackSegmentFragment extends OsmAndListFragment {
|
|||
view.findViewById(R.id.list_divider).setVisibility(View.GONE);
|
||||
view.findViewById(R.id.ascent_descent).setVisibility(View.GONE);
|
||||
}
|
||||
view.findViewById(R.id.details_view).setOnClickListener(new View.OnClickListener() {
|
||||
view.findViewById(R.id.analyze_on_map).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
openDetails(GPXTabItemType.GPX_TAB_ITEM_ALTITUDE);
|
||||
openAnalyzeOnMap(GPXTabItemType.GPX_TAB_ITEM_ALTITUDE);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1259,10 +1259,10 @@ public class TrackSegmentFragment extends OsmAndListFragment {
|
|||
view.findViewById(R.id.list_divider).setVisibility(View.GONE);
|
||||
view.findViewById(R.id.time_distance).setVisibility(View.GONE);
|
||||
}
|
||||
view.findViewById(R.id.details_view).setOnClickListener(new View.OnClickListener() {
|
||||
view.findViewById(R.id.analyze_on_map).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
openDetails(GPXTabItemType.GPX_TAB_ITEM_SPEED);
|
||||
openAnalyzeOnMap(GPXTabItemType.GPX_TAB_ITEM_SPEED);
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
@ -1367,7 +1367,7 @@ public class TrackSegmentFragment extends OsmAndListFragment {
|
|||
}
|
||||
}
|
||||
|
||||
void openDetails(GPXTabItemType tabType) {
|
||||
void openAnalyzeOnMap(GPXTabItemType tabType) {
|
||||
LatLon location = null;
|
||||
WptPt wpt = null;
|
||||
gpxItem.chartTypes = null;
|
||||
|
|
Loading…
Reference in a new issue