**** BEGIN LOGGING AT Tue Jun 16 02:59:57 2009 Jun 16 03:04:54 man, monkey always starts music that causes a force close dialog for music... Jun 16 03:09:59 callahad: there are a couple of ways to get at it... Jun 16 03:11:36 jasta: Such as? :) Jun 16 03:11:37 you can access the drawable directly as android.R.drawable.divider_horizontal_dark, which is the one used by the default andorid system Theme Jun 16 03:12:53 or, if you really want to be clever about it, you can use TypedArray a = context.obtainStyledAttributes(null, android.R.styleable.ListView, android.R.attr.listViewStyle, 0); a.getDrawable(android.R.styleable.ListView_divider); Jun 16 03:13:05 the latter approach will get the drawable no matter what theme you've selected Jun 16 03:13:08 or has been selected for you Jun 16 03:13:32 the other will just access the drawable in framework-res with that name. the former approach might fail to keep up with theme changes depending on how google configures things moving forward Jun 16 03:13:36 the latter will always get the current themes. Jun 16 03:14:17 the latter, however, has runtime overhead. Jun 16 03:15:43 Is there a way to pick the current theme's divider in an xml layout? (Say I wanted to create a LinearLayout that mimiced the appearance of a List) Jun 16 03:16:22 callahad: via @android:drawable/divider_horizontal_dark, but that is the former method. Jun 16 03:16:23 @android:drawable/divider_horizontal_dark grabs the current default theme's divider, but I'd rather not presume that other themes will be equivalent. Jun 16 03:17:15 well, the current theme is chosen by you. Jun 16 03:17:35 the risk is if google changes the default theme not to use literally that asset anymore, but keeps it there for some other reason Jun 16 03:18:06 there would be no way to runtime resolve the current themes list divider in XML though Jun 16 03:18:21 normally any style they want you to access they expose via an attr, which would mean you could do ?android:attr/fooBar Jun 16 03:18:29 but in this case, they have given you nothing to my knowledge Jun 16 03:18:30 oh wait, yes they have Jun 16 03:18:42 * jasta peruses styles.xml Jun 16 03:19:00 ahh yes, you can use ?android:attr/listDivider. they do define this by the theme. Jun 16 03:19:15 this value will be configured by the current theme, and that syntax will look it up that way. Jun 16 03:19:32 ! Excellent Jun 16 03:19:40 for more fancy magic, see the android source under frameworks/base/core/res/res/values/themes.xml. any value defined there can be accessed this way Jun 16 03:20:17 but avoid overusing these features, most of them are given to you automatically Jun 16 03:20:23 Ooh, thanks for that reference. I'm still working on stumbling through the forest of git repos up at android.git.kernel.org Jun 16 03:20:28 for instance, you need not make textviews with style="?android:attr/buttonStyle".