HirayClay / StackLayoutManager

:neckbeard:customized layoutmanager,let item pile up like stackview/类似最美有物卡片堆叠效果
452 stars 64 forks source link

config.align = Align.BOTTOM not working #10

Open shaz-tech opened 6 years ago

shaz-tech commented 6 years ago

config.align = Align.BOTTOM is not working for vertical layout. Please fix it.

shaz-tech commented 6 years ago

I have done this. You you want we can combine this.

Hebin320 commented 5 years ago

How to fix it?

shaz-tech commented 5 years ago

You can create a separate method for bottom stack and add extra margin using device metrics and stacks size for bottom and reduce the margin from top according numberOfStacks * spaceOfStack and others same as TOP. Like this;

int top = (int) (left(i) - (1 - scale) * view.getMeasuredHeight() / 2) - (mSpace * maxStackCount);
int right = view.getMeasuredWidth() + left;
int bottom = (view.getMeasuredHeight() + (2 * metrics.heightPixels)) + (mSpace * maxStackCount);
Hebin320 commented 5 years ago

Can you send it to me by email? My email is hxb1083019222@gmail.com Thanks.

HirayClay commented 5 years ago

oh, man! I am really sorry for this. The first time i want to implement this, i just know little about LayoutManager and RV,so i missed so much details and didn't know the recycling is so hard for StackLayoutManager. I am so sorry ,this is just a toy for fun. Back to the point, BOTTOM is alike to LEFT andTOP ,you just need to do some change according to other direction. I am so sorry , this is my first open project ,i don't know this will be paid attention to ,actually a little flattered. Some issues i know are some kind of out of my control .

Arun1811 commented 4 months ago

@shaz-tech Is there any updated code for config.align = Align.BOTTOM ?