Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga committed Dec 26, 2023
1 parent b4460ea commit 96f104e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public class WindowProxy extends TiWindowProxy implements TiActivityWindow
protected static final int MSG_LAST_ID = MSG_FIRST_ID + 999;

private static int id_toolbar;
private int barColor = -1;

private WeakReference<TiBaseActivity> windowActivity;

Expand Down Expand Up @@ -349,6 +350,7 @@ private void changeTitleColor(ActionBar actionBar, int colorInt)
ssb = new SpannableStringBuilder(abTitle);
}

barColor = colorInt;
ssb.setSpan(new ForegroundColorSpan(colorInt),
0, ssb.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE);
actionBar.setTitle(ssb);
Expand Down Expand Up @@ -534,6 +536,10 @@ public boolean handleMessage(Message msg)
SpannableStringBuilder ssb;
ssb = (SpannableStringBuilder) actionBar.getTitle();
ssb = new SpannableStringBuilder(TiConvert.toString((Object) (msg.obj), ""));
if (barColor != -1) {
ssb.setSpan(new ForegroundColorSpan(barColor),
0, ssb.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE);
}
actionBar.setTitle(ssb);
} else {
actionBar.setTitle(TiConvert.toString((Object) (msg.obj), ""));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,11 @@ protected void updateTitle()
public void run()
{
setTitle(fnewTitle);

/* TODO fix this
ActionBarProxy actionBarProxy = activityProxy.getActionBar();
if (actionBarProxy != null) {
actionBarProxy.setTitle(fnewTitle);
}
}*/
}
});
}
Expand Down

0 comments on commit 96f104e

Please sign in to comment.