Commit 22e35d12 authored by Yusuke Iwaki's avatar Yusuke Iwaki

add comment for layout calculation of badge; fix typo

parent 3fcc23e4
...@@ -157,11 +157,13 @@ public class RoomToolbar extends Toolbar { ...@@ -157,11 +157,13 @@ public class RoomToolbar extends Toolbar {
int iconRight = navButtonView.getRight(); int iconRight = navButtonView.getRight();
int iconBottom = navButtonView.getBottom(); int iconBottom = navButtonView.getBottom();
int budgeLeft = iconLeft + (iconRight - iconLeft) * 5 / 8; // put badge image at right-top side on the NavButtonView,
int budgeRight = iconLeft + (iconRight - iconLeft) * 7 / 8; // with 1/8 margin and 1/4 scale.
int budgeTop = iconTop + (iconBottom - iconTop) / 8; int badgeLeft = iconLeft + (iconRight - iconLeft) * 5 / 8;
int budgeBottom = iconTop + (iconBottom - iconTop) * 3 / 8; int badgeRight = iconLeft + (iconRight - iconLeft) * 7 / 8;
badgeImageView.layout(budgeLeft, budgeTop, budgeRight, budgeBottom); int badgeTop = iconTop + (iconBottom - iconTop) / 8;
int badgeBottom = iconTop + (iconBottom - iconTop) * 3 / 8;
badgeImageView.layout(badgeLeft, badgeTop, badgeRight, badgeBottom);
} catch (Exception exception) { } catch (Exception exception) {
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment