forked from organicmaps/organicmaps
New drawable for direction.
This commit is contained in:
parent
e27ff2c95c
commit
d8976d751b
9 changed files with 15 additions and 13 deletions
Binary file not shown.
Before Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8.1 KiB |
|
@ -54,7 +54,7 @@
|
|||
android:textSize="@dimen/place_page_subtitle"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/iv__direction"
|
||||
android:id="@+id/av__direction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/clickableBackground"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
android:orientation="horizontal"
|
||||
android:paddingBottom="@dimen/margin_small_and_half"
|
||||
android:paddingLeft="@dimen/margin_medium"
|
||||
android:paddingRight="@dimen/margin_medium"
|
||||
android:paddingRight="@dimen/margin_small"
|
||||
android:paddingTop="@dimen/margin_medium_and_half">
|
||||
|
||||
<RelativeLayout
|
||||
|
@ -52,17 +52,15 @@
|
|||
android:id="@+id/tv__straight_distance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/margin_small"
|
||||
android:text="TEST"
|
||||
android:textSize="@dimen/place_page_subtitle"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/iv__direction"
|
||||
<com.mapswithme.maps.widget.ArrowView
|
||||
android:id="@+id/av__direction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/clickableBackground"
|
||||
android:contentDescription="direction"
|
||||
android:src="@drawable/ic_direction_pagepreview"/>
|
||||
android:padding="@dimen/margin_small"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ public class ArrowView extends ImageView
|
|||
{
|
||||
super(context, attrs);
|
||||
|
||||
setImageResource(R.drawable.ic_direction);
|
||||
setImageResource(R.drawable.ic_direction_pagepreview);
|
||||
}
|
||||
|
||||
public void setDrawCircle(boolean draw)
|
||||
|
|
|
@ -40,6 +40,7 @@ import com.mapswithme.maps.bookmarks.data.MapObject.MapObjectType;
|
|||
import com.mapswithme.maps.bookmarks.data.MapObject.Poi;
|
||||
import com.mapswithme.maps.bookmarks.data.MapObject.SearchResult;
|
||||
import com.mapswithme.maps.location.LocationHelper;
|
||||
import com.mapswithme.maps.widget.ArrowView;
|
||||
import com.mapswithme.util.ShareAction;
|
||||
import com.mapswithme.util.Utils;
|
||||
import com.mapswithme.util.statistics.Statistics;
|
||||
|
@ -52,7 +53,7 @@ public class PlacePageView extends LinearLayout implements View.OnClickListener,
|
|||
private TextView mTvTitle;
|
||||
private TextView mTvSubtitle;
|
||||
private TextView mTvOpened;
|
||||
private ImageView mAvDirection;
|
||||
private ArrowView mAvDirection;
|
||||
private TextView mTvDistance;
|
||||
// Place page details
|
||||
private ViewGroup mPpDetails;
|
||||
|
@ -127,7 +128,7 @@ public class PlacePageView extends LinearLayout implements View.OnClickListener,
|
|||
mTvSubtitle = (TextView) ppPreview.findViewById(R.id.tv__subtitle);
|
||||
mTvOpened = (TextView) ppPreview.findViewById(R.id.tv__opened_till);
|
||||
mTvDistance = (TextView) ppPreview.findViewById(R.id.tv__straight_distance);
|
||||
mAvDirection = (ImageView) ppPreview.findViewById(R.id.iv__direction);
|
||||
mAvDirection = (ArrowView) ppPreview.findViewById(R.id.av__direction);
|
||||
// TODO direction arrow & screen
|
||||
|
||||
mPpDetails = (ViewGroup) mView.findViewById(R.id.pp__details);
|
||||
|
@ -287,8 +288,6 @@ public class PlacePageView extends LinearLayout implements View.OnClickListener,
|
|||
mTvSubtitle.setText(mMapObject.getPoiTypeName());
|
||||
// TODO
|
||||
// mTvOpened
|
||||
// mTvDistance
|
||||
// mAvDirection
|
||||
}
|
||||
|
||||
private void refreshDetails()
|
||||
|
@ -326,6 +325,7 @@ public class PlacePageView extends LinearLayout implements View.OnClickListener,
|
|||
mMapObject.setLat(l.getLatitude());
|
||||
mMapObject.setLon(l.getLongitude());
|
||||
refreshLatLon();
|
||||
mAvDirection.setVisibility(View.GONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -337,7 +337,10 @@ public class PlacePageView extends LinearLayout implements View.OnClickListener,
|
|||
mTvDistance.setText(distanceAndAzimuth.getDistance());
|
||||
}
|
||||
else
|
||||
{
|
||||
mAvDirection.setVisibility(View.GONE);
|
||||
mTvDistance.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -364,7 +367,8 @@ public class PlacePageView extends LinearLayout implements View.OnClickListener,
|
|||
|
||||
if (da.getAthimuth() >= 0)
|
||||
{
|
||||
// TODO update direction
|
||||
mAvDirection.setVisibility(View.VISIBLE);
|
||||
mAvDirection.setAzimut(da.getAthimuth());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue