simplifiy code
This commit is contained in:
parent
c7cff599c0
commit
a60cd2a835
2 changed files with 6 additions and 30 deletions
|
@ -108,9 +108,9 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
|||
private static final int SHOW_ON_MAP = 1;
|
||||
private static final int FILTER = 2;
|
||||
|
||||
private static final int ORIENTATION_0 = 0;
|
||||
private static final int ORIENTATION_90 = 3;
|
||||
private static final int ORIENTATION_270 = 1;
|
||||
private static final int ORIENTATION_0 = 0; // Portrait
|
||||
private static final int ORIENTATION_90 = 90; // Landscape right
|
||||
private static final int ORIENTATION_270 = 270; // Landscape left
|
||||
|
||||
private PoiFilter filter;
|
||||
private AmenityAdapter amenityAdapter;
|
||||
|
@ -787,18 +787,6 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
|||
//TODO: getOrientation() needs to be used for API<8, deprecated after that
|
||||
int screenOrientation = 0;
|
||||
screenOrientation = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getRotation();
|
||||
switch (screenOrientation)
|
||||
{
|
||||
case ORIENTATION_0: // Portrait
|
||||
screenOrientation = 0;
|
||||
break;
|
||||
case ORIENTATION_90: // Landscape right
|
||||
screenOrientation = 90;
|
||||
break;
|
||||
case ORIENTATION_270: // Landscape left
|
||||
screenOrientation = 270;
|
||||
break;
|
||||
}
|
||||
draw.setAngle(mes[1] - a + 180 + screenOrientation);
|
||||
|
||||
draw.setOpenedColor(opened);
|
||||
|
|
|
@ -42,9 +42,9 @@ public class DashFavoritesFragment extends DashBaseFragment {
|
|||
private LatLon loc = null;
|
||||
private Float heading = null;
|
||||
|
||||
private static final int ORIENTATION_0 = 0;
|
||||
private static final int ORIENTATION_90 = 3;
|
||||
private static final int ORIENTATION_270 = 1;
|
||||
private static final int ORIENTATION_0 = 0; // Portrait
|
||||
private static final int ORIENTATION_90 = 90; // Landscape right
|
||||
private static final int ORIENTATION_270 = 270; // Landscape left
|
||||
|
||||
private List<ImageView> arrows = new ArrayList<ImageView>();
|
||||
List<FavouritePoint> points = new ArrayList<FavouritePoint>();
|
||||
|
@ -187,18 +187,6 @@ public class DashFavoritesFragment extends DashBaseFragment {
|
|||
//TODO: getOrientation() needs to be used for API<8, deprecated after that
|
||||
int screenOrientation = 0;
|
||||
//screenOrientation = ((WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getRotation();
|
||||
switch (screenOrientation)
|
||||
{
|
||||
case ORIENTATION_0: // Portrait
|
||||
screenOrientation = 0;
|
||||
break;
|
||||
case ORIENTATION_90: // Landscape right
|
||||
screenOrientation = 90;
|
||||
break;
|
||||
case ORIENTATION_270: // Landscape left
|
||||
screenOrientation = 270;
|
||||
break;
|
||||
}
|
||||
draw.setAngle(mes[1] - a + 180 + screenOrientation);
|
||||
|
||||
direction.setImageDrawable(draw);
|
||||
|
|
Loading…
Reference in a new issue