S Stern0m1 Member Licensed User Feb 21, 2017 #1 Is there currently an easy way to change the title color? The only I figured out how to do it is with creating a javaobject with: B4X: #IF JAVA import android.graphics.drawable.ColorDrawable; import android.graphics.Color; import android.view.View; public void bar() { ColorDrawable gd = new ColorDrawable(Color.GRAY); View title = getWindow().findViewById(android.R.id.title); View titleBar = (View) title.getParent(); //titleBar.setBackgroundDrawable(new ColorDrawable(Color.Gray)); titleBar.setBackgroundDrawable(gd); } #End If I modified what I found here http://stackoverflow.com/questions/9014944/android-gradient-application-title-bar Thanks
Is there currently an easy way to change the title color? The only I figured out how to do it is with creating a javaobject with: B4X: #IF JAVA import android.graphics.drawable.ColorDrawable; import android.graphics.Color; import android.view.View; public void bar() { ColorDrawable gd = new ColorDrawable(Color.GRAY); View title = getWindow().findViewById(android.R.id.title); View titleBar = (View) title.getParent(); //titleBar.setBackgroundDrawable(new ColorDrawable(Color.Gray)); titleBar.setBackgroundDrawable(gd); } #End If I modified what I found here http://stackoverflow.com/questions/9014944/android-gradient-application-title-bar Thanks
Erel B4X founder Staff member Licensed User Longtime User Feb 22, 2017 #2 With B4A v6.80: B4X: Dim cs As CSBuilder Activity.Title = cs.Initialize.Color(Colors.Red).Append("Hello!").PopAll Upvote 0
With B4A v6.80: B4X: Dim cs As CSBuilder Activity.Title = cs.Initialize.Color(Colors.Red).Append("Hello!").PopAll