Closed jrcacd closed 5 years ago
You can set the navigation bar color as soon as the launcher Activity (e.g. MainActivity) is opened. Place this code under onCreate:
Activity
onCreate
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); getCyanea().edit().shouldTintNavBar(true); ... }
Don't forget to add the public method for getCyanea() to work. Place it in the same Activity:
getCyanea()
@NotNull @Override public Cyanea getCyanea() { return super.getCyanea(); }
This is Java code, by the way.
Ok, thanks
The best way to do this is to create bools.xml and add the following value:
bools.xml
<bool name="should_tint_nav_bar">true</bool>
You can set the navigation bar color as soon as the launcher
Activity
(e.g. MainActivity) is opened. Place this code underonCreate
:Don't forget to add the public method for
getCyanea()
to work. Place it in the sameActivity
:This is Java code, by the way.