Add a default Theme for preview in Android Studio

2,079 views
Skip to first unread message

Tristan Waddington

unread,
Oct 10, 2013, 12:36:02 PM10/10/13
to adt...@googlegroups.com
I'm not sure if this is currently possible, but it would be rad if we could set a default Theme to use for layout previews that isn't Holo Dark. For example, we have a manifest theme that I almost always use for the layout previews. Would be nice to just set that as the default for a project.

-Tristan

Tor Norbye

unread,
Oct 10, 2013, 12:47:55 PM10/10/13
to adt...@googlegroups.com
Do you define a theme for the application? The layout editor/preview code is *supposed* to pick that theme up as a default (it actually first looks at the tools:context attribute to see if there's an associated activity, and if so, looks in the manifest for the right theme to use for that activity, and if that's not set, fall back to the application theme, and if that's not set, fall back to holo or theme based on the rendering target api level.

-- Tor

Tristan Waddington

unread,
Oct 10, 2013, 12:51:46 PM10/10/13
to adt...@googlegroups.com
Ah, very cool! We had not defined a theme for our application as we use a mix of several themes depending on the Activity. Thanks!

-Tristan


--
You received this message because you are subscribed to a topic in the Google Groups "adt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adt-dev/wPJSP8yYE_A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages