Added button 'routing go'.

This commit is contained in:
Dmitry Yunitsky 2014-10-03 20:35:10 +03:00 committed by Alex Zolotarev
parent efd549f225
commit 7f89726270
2 changed files with 14 additions and 4 deletions

View file

@ -28,16 +28,22 @@
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_alignParentTop="true"
android:background="@color/bg_top_panels"
android:gravity="center_vertical">
android:background="@color/bg_top_panels">
<Button
android:id="@+id/btn__routing_go"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/margin_medium"
android:text="go, routing, go!"/>
<TextView
android:id="@+id/tv__routing_distance"
style="@style/Holo.TextAppearance.Large.Light"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="42 KM"/>
android:layout_centerInParent="true"/>
<ImageView
android:id="@+id/iv__routing_close"

View file

@ -800,6 +800,7 @@ public class MWMActivity extends NvEventQueueActivity
mRlRoutingBox = (RelativeLayout) findViewById(R.id.rl__routing_box);
mRlRoutingBox.setVisibility(View.GONE);
mRlRoutingBox.findViewById(R.id.iv__routing_close).setOnClickListener(this);
mRlRoutingBox.findViewById(R.id.btn__routing_go).setOnClickListener(this);
mTvRoutingDistance = (TextView) mRlRoutingBox.findViewById(R.id.tv__routing_distance);
}
@ -1380,6 +1381,9 @@ public class MWMActivity extends NvEventQueueActivity
case R.id.iv__routing_close:
stopRouting();
break;
case R.id.btn__routing_go:
// TODO call some native magic
break;
default:
break;
}