AndroidResideMenu
AndroidResideMenu copied to clipboard
Left menu over top main view
Help me.
When I change left menu item to other color and I swipe menu show on top like this picture
If menu item color is white, left menu is under main view, in this picture icon is white and title is black
How can set my main view on top of left menu? Thank.
Hello @qhu91it, i am facing the same problem as ur's, please let me know if you find any solution.
Hello @idrisbohra, you need edit in source of library, find func
private void showScrollViewMenu(View scrollViewMenu) {
if (scrollViewMenu != null && scrollViewMenu.getParent() == null) {
addView(scrollViewMenu);
}
}
Change like this, because left and right menu add late and show above main view
private void showScrollViewMenu(View scrollViewMenu) {
if (scrollViewMenu != null && scrollViewMenu.getParent() == null) {
addView(scrollViewMenu, 1); // change here
}
}
Thanks @qhu91it. I implemented your suggested change and it is working like charm..thank a lot..
@qhu91it Thanks.
Hi, sorry to bother you but i am trying to increase the height of main Menu but can't find way to do that. Please help me out if you know about it. Thank you.
You mean height of menu item? Cz whole menu have match parent. So its already have full width.
Hi, sorry for mistyping but i am talking about main view. I want to increase the height of main view which is coming over left menu.
Hi idrisbohra,
in ResideMenu class
goto method
public void openMenu(final int direction) {
try {
setScaleDirection(direction);
if (direction == DIRECTION_LEFT) {
rightMenuView.setVisibility(View.GONE);
leftMenuView.setVisibility(View.VISIBLE);
} else {
leftMenuView.setVisibility(View.GONE);
rightMenuView.setVisibility(View.VISIBLE);
}
isOpened = true;
// AnimatorSet scaleDown_activity = buildScaleDownAnimation(viewActivity, mScaleValue, 0.84f); AnimatorSet scaleDown_activity = buildScaleDownAnimation(viewActivity, mScaleValue, 0.68f); AnimatorSet scaleDown_shadow = buildScaleDownAnimation(imageViewShadow, mScaleValue + shadowAdjustScaleX, mScaleValue + shadowAdjustScaleY); AnimatorSet alpha_menu = buildMenuAnimation(scrollViewMenu, 1.0f); scaleDown_shadow.addListener(animationListener); scaleDown_activity.playTogether(scaleDown_shadow); scaleDown_activity.playTogether(alpha_menu); scaleDown_activity.start();
context.setBlurBackground();
} catch (Exception e) {
e.printStackTrace();
}
//Blurry.with(context).radius(13).sampling(2).onto((ViewGroup) viewActivity );
/*Blurry.with(context)
.radius(10)
.sampling(2)
.async()
.onto(context.getMainContentFrame());*/
}
here is the line AnimatorSet scaleDown_activity = buildScaleDownAnimation(viewActivity, mScaleValue, 0.68f);
change the scale factor between 0 to 1f to change the height.
Hello @hamzaahmedkhan i already tried this by changing the scale value but this makes the view stretched which is not good.
Hi idris, actually you'll have to maintain the balance, this stretching will work for y-axis, for x-axis stretching you'll have to use this method of reside menu.
resideMenu.setScaleValue(0.56f); // for x -axis 0 to 1 range
use this method where you are initializing your Reside menu, like this.
public void setSideMenu(int direction) {
resideMenu = new ResideMenu(this);
resideMenu.setBackground(R.drawable.imgbgdark);
resideMenu.attachToActivity(this);
resideMenu.setScaleValue(0.56f);
resideMenu.setShadowVisible(false);
setMenuItemDirection(direction);
}