Merge branch 'sasha_pasha_branch' of ssh://github.com/osmandapp/Osmand into sasha_pasha_branch

This commit is contained in:
PavelRatushny 2017-08-08 13:43:11 +03:00
commit 8ffb4688f2
2 changed files with 9 additions and 7 deletions

View file

@ -17,6 +17,7 @@
android:orientation="vertical">
<RelativeLayout
android:id="@+id/up_down_row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="12dp"
@ -36,16 +37,16 @@
android:background="@null"
tools:src="@drawable/ic_action_ruler"/>
<ImageButton
<ImageView
android:id="@+id/up_down_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:background="@null"
android:paddingEnd="16dp"
android:paddingStart="16dp"
tools:src="@drawable/ic_action_arrow_down"/>
<TextView

View file

@ -92,9 +92,10 @@ public class MeasurementToolFragment extends Fragment {
((ImageView) mainView.findViewById(R.id.ruler_icon))
.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_ruler, R.color.color_myloc_distance));
final ImageButton upDownBtn = ((ImageButton) mainView.findViewById(R.id.up_down_button));
final ImageView upDownBtn = ((ImageView) mainView.findViewById(R.id.up_down_button));
upDownBtn.setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_action_arrow_up));
upDownBtn.setOnClickListener(new View.OnClickListener() {
mainView.findViewById(R.id.up_down_row).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (!pointsDetailsOpened) {
@ -232,7 +233,7 @@ public class MeasurementToolFragment extends Fragment {
private void upBtnOnClick(View view, Drawable icon) {
pointsDetailsOpened = true;
view.findViewById(R.id.points_list_container).setVisibility(View.VISIBLE);
((ImageButton) view.findViewById(R.id.up_down_button)).setImageDrawable(icon);
((ImageView) view.findViewById(R.id.up_down_button)).setImageDrawable(icon);
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
OsmandMapTileView tileView = mapActivity.getMapView();
@ -245,7 +246,7 @@ public class MeasurementToolFragment extends Fragment {
private void downBtnOnClick(View view, Drawable icon) {
pointsDetailsOpened = false;
view.findViewById(R.id.points_list_container).setVisibility(View.GONE);
((ImageButton) view.findViewById(R.id.up_down_button)).setImageDrawable(icon);
((ImageView) view.findViewById(R.id.up_down_button)).setImageDrawable(icon);
setPreviousMapPosition();
}