forked from organicmaps/organicmaps
[android] Fixed review notes here https://github.com/mapsme/omim/pull/10631
This commit is contained in:
parent
e387bf8820
commit
b393f055e3
4 changed files with 10 additions and 12 deletions
|
@ -168,7 +168,7 @@
|
|||
android:id="@+id/driving_options_btn_title"
|
||||
android:layout_centerInParent="true"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorPrimaryInverse"
|
||||
android:textColor="?attr/tipsPrimaryTextColor"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/margin_half_plus_eight"
|
||||
|
|
|
@ -1843,7 +1843,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
if (mNavAnimationController == null)
|
||||
return;
|
||||
|
||||
int totalHeight = calcFloatingViewOffset();
|
||||
int totalHeight = calcFloatingViewsOffset();
|
||||
|
||||
mNavAnimationController.setTopLimit(!show ? 0 : totalHeight);
|
||||
mNavAnimationController.setBottomLimit(!show ? 0 : getCurrentMenu().getFrame().getHeight());
|
||||
|
@ -1931,7 +1931,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
return;
|
||||
|
||||
int toolbarHeight = mSearchController.getToolbar().getHeight();
|
||||
int offset = calcFloatingViewOffset();
|
||||
int offset = calcFloatingViewsOffset();
|
||||
|
||||
adjustCompassAndTraffic(visible ? toolbarHeight : offset);
|
||||
setNavButtonsTopLimit(visible ? toolbarHeight : 0);
|
||||
|
@ -1944,14 +1944,14 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
}
|
||||
}
|
||||
|
||||
private int calcFloatingViewOffset()
|
||||
private int calcFloatingViewsOffset()
|
||||
{
|
||||
int extraOppositeOffset;
|
||||
int offset;
|
||||
if (mRoutingPlanInplaceController == null
|
||||
|| (extraOppositeOffset = mRoutingPlanInplaceController.calcFloatingViewsOffset()) == 0)
|
||||
|| (offset = mRoutingPlanInplaceController.calcHeight()) == 0)
|
||||
return UiUtils.getStatusBarHeight(this);
|
||||
|
||||
return extraOppositeOffset;
|
||||
return offset;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -360,14 +360,14 @@ public class RoutingPlanController extends ToolbarController
|
|||
UiUtils.hide(mDrivingOptionsBtnContainer);
|
||||
}
|
||||
|
||||
public int calcFloatingViewsOffset()
|
||||
public int calcHeight()
|
||||
{
|
||||
int frameHeight = getFrame().getHeight();
|
||||
if (frameHeight == 0)
|
||||
return 0;
|
||||
|
||||
View driverOptionsView = getDrivingOptionsBtnContainer();
|
||||
int extraOppositeOffset = driverOptionsView.getVisibility() == View.VISIBLE
|
||||
int extraOppositeOffset = UiUtils.isVisible(driverOptionsView)
|
||||
? 0
|
||||
: driverOptionsView.getHeight();
|
||||
|
||||
|
@ -380,8 +380,7 @@ public class RoutingPlanController extends ToolbarController
|
|||
public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft,
|
||||
int oldTop, int oldRight, int oldBottom)
|
||||
{
|
||||
mRoutingPlanListener.onRoutingPlanStartAnimate(
|
||||
getFrame().getVisibility() == View.VISIBLE);
|
||||
mRoutingPlanListener.onRoutingPlanStartAnimate(UiUtils.isVisible(getFrame()));
|
||||
mDrivingOptionsBtnContainer.removeOnLayoutChangeListener(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ import java.util.Set;
|
|||
|
||||
public class DrivingOptionsFragment extends BaseMwmToolbarFragment
|
||||
{
|
||||
|
||||
public static final String BUNDLE_ROAD_TYPES = "road_types";
|
||||
@NonNull
|
||||
private Set<RoadType> mRoadTypes = Collections.emptySet();
|
||||
|
|
Loading…
Add table
Reference in a new issue