6 package com.google.appinventor.components.runtime.util.theme;
8 import android.app.ActionBar;
9 import android.graphics.Color;
10 import android.text.Html;
11 import android.view.Window;
22 this.activity = activity;
27 if (!activity.getWindow().hasFeature(Window.FEATURE_ACTION_BAR)) {
28 activity.getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
34 ActionBar actionBar = activity.getActionBar();
35 if (actionBar ==
null) {
36 if (activity instanceof
Form) {
50 return activity.getActionBar() !=
null;
55 ActionBar actionBar = activity.getActionBar();
56 if (actionBar !=
null) {
57 actionBar.setTitle(title);
67 public void setTitle(String title,
boolean black) {
68 ActionBar actionBar = activity.getActionBar();
69 if (actionBar !=
null) {
71 actionBar.setTitle(Html.fromHtml(
"<font color=\"black\">" + title +
"</font>"));
74 actionBar.setTitle(title);