3

Here are examples of the application's actionbar title being truncated :

The 2 first ones are truncated, the 2 below are what I have 95% times

This happens randomly, I still don't know what makes it get truncated suddenly. Most of the time, I have no issue but it occurs. It raises no error, nothing.

I asked for 2 lines width in onCreate() method of my activity like this (but I don't know how it could be related) :

//Set the title over 2 lines if needed:
    int titleId = Resources.getSystem()
            .getIdentifier("action_bar_title", "id", "android");
    if (titleId > 0) {
        TextView title = (TextView) findViewById(titleId);
        title.setSingleLine(false);
        title.setMaxLines(2);
        //          title.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
    }

Any ideas? Thanks !

Poutrathor
  • 1,990
  • 2
  • 20
  • 44

0 Answers0