Background and text color

31 views
Skip to first unread message

Julia Childs

unread,
Mar 28, 2015, 11:24:31 PM3/28/15
to mac...@googlegroups.com
Can someone please provide a simple example of setting the backgound color and text color? I'm diddling around with the macroid-starter and every way I try to use BgTweaks.color and TextTweaks.color causes the app to crash when running, android:run in sbt.

Nick Stanchenko

unread,
Mar 29, 2015, 10:52:25 AM3/29/15
to mac...@googlegroups.com
Hi Julia,

Could you show the code that you tried and the log of the errors from logcat?
Setting the color should be as easy as

w[TextView] <~ TextTweaks.color(Color.rgb(130, 40, 50))


Nick

Julia Childs

unread,
Mar 29, 2015, 3:01:36 PM3/29/15
to mac...@googlegroups.com
I cleared the data on the emulator and your text color example worked. Thanks homie. Is it possible to set the background color of the entire app from macroid and if so could you provide a simple example? I'm new to macroid and android development in general. I can set the background color of the TextView widget with no problem, but I tried setting the background color of the whole app by using BgTweaks.color after the layout, but that didn't work, i.e. l[LinearLayout](...) <~ BgTweaks.color(Color.rgb(...)).

Julia Childs

unread,
Mar 29, 2015, 11:38:49 PM3/29/15
to mac...@googlegroups.com
Nevermind dawg, I got it working. Thanks for your help earlier. For anyone reading this that had or has the same issue, I put BgTweaks.color(Color.BLUE) right before the padding tweak in the MainActivity of the macroid-starter.
Reply all
Reply to author
Forward
0 new messages