In my android app, I would like to have a 3-inch sized title text ( requirement from our designer).
I have actionbar tabs under the title bar.
I tried to make the text big using the below code but it gets clipped off. So, I am not able to make it taller. any help will be appreciated
void setCustomActionBar() {
ActionBar mActionBar = getActionBar();
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
mActionBar.setDisplayShowHomeEnabled(false);
mActionBar.setDisplayShowTitleEnabled(true);
LayoutInflater mInflater = LayoutInflater.from(this);
View mCustomView = mInflater.inflate(R.layout.actionbar_customview,
null);
// actionbarTitle
TextView mTitleTextView = (TextView) mCustomView
.findViewById(R.id.actionbarTitle);
// lp.setMargins(0, 10, 0, 10);
mTitleTextView.setText("Applause Insights");
mTitleTextView.setTextSize(32);
mTitleTextView.setGravity(Gravity.CENTER_HORIZONTAL);
mActionBar.setCustomView(mCustomView);
mTitleTextView.setLayoutParams(lp);
mActionBar.setDisplayShowCustomEnabled(true);
}