How can I detect a click on the ActionBar title?

The title is non-clickable AFAIK. The icon/logo is clickable — you’ll get that via android.R.id.home in onOptionsItemSelected(). Conceivably, the title also routes this way, though they don’t mention it and I wouldn’t rely upon it. It sounds like you want a Spinner for the user to choose the actions to execute. If so, use setListNavigationCallbacks(). … Read more

How to set a custom font to the title in toolbar android

Since android.support.v7.appcompat 24.2 Toolbar has method setTitleTextAppearance and you can set its font without external textview. create new style in styles.xml <style name=”RobotoBoldTextAppearance”> <item name=”android:fontFamily”>@font/roboto_condensed_bold</item> </style> and use it mToolbar.setTitleTextAppearance(this, R.style.RobotoBoldTextAppearance);

Changing the page title with Jquery

$(document).prop(‘title’, ‘test’); This is simply a JQuery wrapper for: document.title=”test”; To add a > periodically you can do: function changeTitle() { var title = $(document).prop(‘title’); if (title.indexOf(‘>>>’) == -1) { setTimeout(changeTitle, 3000); $(document).prop(‘title’, ‘>’+title); } } changeTitle();

Add a line break in Woocommerce Product Titles

2020 revision – Still works on WordPress 5.5.1 with WooCommerce 4.4.1 Using this custom function hooked in the_title filter hook will do the job (replacing a pipe character | by a <br> in product titles): add_filter( ‘the_title’, ‘custom_product_title’, 10, 2 ); function custom_product_title( $title, $post_id ){ $post_type = get_post_field( ‘post_type’, $post_id, true ); if( in_array( … Read more

UINavigationBar multi-line title

Set the titleView property of the UINavigationItem. For example, in the view controller’s viewDidLoad method you could do something like: UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 480, 44)]; label.backgroundColor = [UIColor clearColor]; label.numberOfLines = 2; label.font = [UIFont boldSystemFontOfSize: 14.0f]; label.shadowColor = [UIColor colorWithWhite:0.0 alpha:0.5]; label.textAlignment = UITextAlignmentCenter; label.textColor = [UIColor whiteColor]; label.text = … Read more

Center Align title in action bar using styles in android.

Simple method to center ActionBarTitle without using custom layout for actionBar. But before that first hide up Icon as : myActionBar.setIcon(new ColorDrawable(Color.TRANSPARENT)); private void centerActionBarTitle() { int titleId = 0; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { titleId = getResources().getIdentifier(“action_bar_title”, “id”, “android”); } else { // This is the id is from your app’s generated R class … Read more