Android custom action bar occasionaly displays a visual glitch -


i'm using custom [support] action bar, displays visual glitch:

final actionbar actionbar = getsupportactionbar(); actionbar.setnavigationmode(actionbar.navigation_mode_tabs);  (int = 0; < msectionspageradapter.getcount(); i++) {         // create tab text corresponding page title defined         // adapter. specify activity object, implements         // tablistener interface, callback (listener) when         // tab selected.         actionbar.addtab(                 actionbar.newtab()                         .settext(msectionspageradapter.getpagetitle(i))                         .settablistener(this)); }      actionbar.setdisplayoptions(actionbar.display_show_custom);     actionbar.setcustomview(r.layout.action_bar_main);     actionbar.setbackgrounddrawable(actionbar.getcustomview().getbackground()); 

and in action_bar_main.xml:

<framelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="50dp" android:background="@color/mycolor" android:id="@+id/actionbarviewroot"> ...</framelayout> //i don't think inside relevant, , unnecessarily long. 

here (and many other users many different devices) sometimes visual glitch blue background doesn't cover whole action bar:

enter image description here

it happens occasionaly, quite rarely, happen, , want make sure never happens. seemingly-random nature of problem makes harder reproduce , test issue. doesn't appear bound specific make, model, or android version. possible causes?


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -