mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-13 06:39:54 -04:00
Fix[control-editor]: context buttons reaching out of the screen
This commit is contained in:
parent
b624b3123f
commit
d3263581c3
@ -47,7 +47,7 @@ public class ActionRow extends LinearLayout {
|
||||
};
|
||||
private final ActionButtonInterface[] actionButtons = new ActionButtonInterface[3];
|
||||
private View mFollowedView = null;
|
||||
private final int mSide = SIDE_TOP;
|
||||
private final int mSide = SIDE_AUTO;
|
||||
|
||||
/** Add action buttons and configure them */
|
||||
private void init(){
|
||||
@ -123,10 +123,7 @@ public class ActionRow extends LinearLayout {
|
||||
ViewGroup parent = ((ViewGroup) mFollowedView.getParent());
|
||||
if(parent == null) return mSide;//Value should not matter
|
||||
|
||||
int side = mFollowedView.getX() + getWidth()/2f > parent.getWidth()/2f
|
||||
? SIDE_LEFT
|
||||
: SIDE_RIGHT;
|
||||
|
||||
int side = SIDE_TOP;
|
||||
float futurePos = getYPosition(side);
|
||||
if(futurePos + getHeight() > (parent.getHeight() + getHeight()/2f)){
|
||||
side = SIDE_TOP;
|
||||
|
Loading…
x
Reference in New Issue
Block a user