Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ARC Welder cuts off the action bar

I just finished work on my first Android app, New Daily Quotes. I was excited to hear that I could easily "port" it to Chromebooks and Google Chrome through ARC Welder and the Chrome Web Store, but I've run into a snag.

When I run the app in ARC Welder, the top portion of the action bar is cut off, making the title text impossible to read and the menu button difficult at best. The degree of cutoff varies depending on the form factor selected, with phone being the worst and tablet/maximized producing the same results. Below are screenshots of what I mean. The source code is available here if it helps any.

Phone UI

Droid RAZR

ARC Welder Phone UI - Landscape

ARC Welder Phone UI - Landscape

ARC Welder Phone UI - Portrait

enter image description here

like image 837
Cora Avatar asked May 14 '15 01:05

Cora


1 Answers

Found the answer!

Turns out, using ARC Welder (at least currently) returns API 19 (KitKat), and because I was using jgilfelt's SystemBarTint library, it was setting a nonexistent status bar tint directly over the top of the action bar.

I was able to fix the issue by not only checking to ensure that we are in fact on API 19, but also that the manufacturer build doesn't contain chromium in the contents.

if(Build.VERSION.SDK_INT == 19 && !Build.MANUFACTURER.toLowerCase().contains("chromium")) { ... }
like image 76
Cora Avatar answered Nov 16 '22 22:11

Cora