Merge branch 'r3.3'
This commit is contained in:
commit
e6e988f5ab
2 changed files with 14 additions and 6 deletions
|
@ -176,6 +176,14 @@ public abstract class ContextMenuFragment extends BaseOsmAndFragment {
|
||||||
return paused;
|
return paused;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getMenuFullHeightMax() {
|
||||||
|
return menuFullHeightMax;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMenuFullHeight() {
|
||||||
|
return menuFullHeight;
|
||||||
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public MapActivity getMapActivity() {
|
public MapActivity getMapActivity() {
|
||||||
FragmentActivity activity = getActivity();
|
FragmentActivity activity = getActivity();
|
||||||
|
|
|
@ -174,11 +174,11 @@ public class RouteDetailsFragment extends ContextMenuFragment implements PublicT
|
||||||
return transportCard;
|
return transportCard;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void changeMenuState(int currentY, boolean slidingUp, boolean slidingDown, boolean animated) {
|
protected void updateMainViewLayout(int posY) {
|
||||||
super.changeMenuState(currentY, slidingUp, slidingDown, animated);
|
super.updateMainViewLayout(posY);
|
||||||
View mainView = getMainView();
|
if (isPortrait()) {
|
||||||
if (mainView != null && isPortrait()) {
|
|
||||||
updateCardsLayout();
|
updateCardsLayout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -209,8 +209,8 @@ public class RouteDetailsFragment extends ContextMenuFragment implements PublicT
|
||||||
LinearLayout cardsContainer = getCardsContainer();
|
LinearLayout cardsContainer = getCardsContainer();
|
||||||
View topShadow = getTopShadow();
|
View topShadow = getTopShadow();
|
||||||
FrameLayout bottomContainer = getBottomContainer();
|
FrameLayout bottomContainer = getBottomContainer();
|
||||||
int halfScreenY = getMenuStatePosY(MenuState.HALF_SCREEN);
|
int top = Math.max(getMenuStatePosY(MenuState.HALF_SCREEN), getViewHeight() - getMenuFullHeightMax());
|
||||||
if (y > halfScreenY) {
|
if (y > top) {
|
||||||
topShadow.setVisibility(View.INVISIBLE);
|
topShadow.setVisibility(View.INVISIBLE);
|
||||||
bottomContainer.setBackgroundDrawable(null);
|
bottomContainer.setBackgroundDrawable(null);
|
||||||
AndroidUtils.setBackground(mainView.getContext(), cardsContainer, isNightMode(), R.drawable.travel_card_bg_light, R.drawable.travel_card_bg_dark);
|
AndroidUtils.setBackground(mainView.getContext(), cardsContainer, isNightMode(), R.drawable.travel_card_bg_light, R.drawable.travel_card_bg_dark);
|
||||||
|
|
Loading…
Reference in a new issue