Fix - open current track

This commit is contained in:
Alexey Kulish 2017-03-14 16:56:17 +03:00
parent 4584ce8228
commit e89785f5e4
2 changed files with 19 additions and 0 deletions

View file

@ -14,8 +14,11 @@
android:background="?attr/bg_color">
<LinearLayout
android:id="@+id/current_track_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:paddingBottom="8dp"
android:orientation="horizontal">
<CheckBox
@ -146,6 +149,13 @@
</LinearLayout>
<View
android:id="@+id/divider_list"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="54dp"
android:background="?attr/dashboard_divider"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

View file

@ -271,6 +271,15 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
if (OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class) != null) {
currentGpxView = inflater.inflate(R.layout.current_gpx_item, null, false);
createCurrentTrackView();
currentGpxView.findViewById(R.id.current_track_info).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent newIntent = new Intent(getActivity(), getMyApplication().getAppCustomization().getTrackActivity());
newIntent.putExtra(TrackActivity.CURRENT_RECORDING, true);
newIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(newIntent);
}
});
listView.addHeaderView(currentGpxView);
/*
currentTrackView.setOnClickListener(new View.OnClickListener() {