I'm learning to make the sliding menu ( drawer )

I've tried using various solutions of other friends in the group , but none of them worked.

I can change all the colors of the layout in my app , except the color of the top bar (main ) . I would put the color # 1674d3 as the bottom of the main bar. Any friend can help me solve this?

My coding was based on this tutorial: Click here!

http://i.imgur.com/eRgpn0n.png

有帮助吗?

解决方案

For API level 11 or greater or Lesser API level

if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) {
             // only for HoneyComb and newer versions
            ActionBar bar = getActionBar();

            // title;
            bar.setTitle(Html.fromHtml("<font color='#000000'>Home</font>"));

            //Rgb for yellow.
            bar.setBackgroundDrawable(new ColorDrawable(Color.rgb(255,215,0)));
        }
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top