MetricsHelper.java 文件源码

java
阅读 45 收藏 0 点赞 0 评论 0

项目:bigbang 作者:
/**
 * Retrieves the toolbar height of the current app theme.
 *
 * @param theme the device {@link Theme}
 * @param actionBarSize the current {@link ActionBar} size
 * @return the toolbar height of the current app theme
 */
@Dimension(unit = Dimension.DP)
public static int getToolbarHeight(@NonNull Theme theme, @AttrRes int actionBarSize) {
  final TypedArray styledAttributes = theme.obtainStyledAttributes(new int[] {actionBarSize});
  int toolbarHeight = (int) styledAttributes.getDimension(0, 0);
  styledAttributes.recycle();
  return toolbarHeight;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号