setText 能垂直居中吗, 离title有点远
wushange opened this issue · comments
吴善革 commented
你好, setText 能垂直居中吗, 离title有点远 没有subtitle的情况下能否是 text文本在 按钮和title中间显示。
八阿哥 commented
.setOnCreateTitleListener(new OnCreateTitleListener() {
@Override
public void onCreateTitle(ImageView titleIcon, TextView title, TextView subTitle) {
title.setHeight(Integer.MAX_VALUE);
title.setMinLines(0);
ViewGroup.LayoutParams layoutParams = title.getLayoutParams();
layoutParams.width = ViewGroup.LayoutParams.WRAP_CONTENT;
layoutParams.height = ViewGroup.LayoutParams.WRAP_CONTENT;
title.setLayoutParams(layoutParams);
title.setPadding(title.getPaddingLeft(), CircleDimen.TEXT_PADDING[1]
, title.getPaddingRight(), title.getPaddingBottom());
}
})