Hello all, I have been trying and searching about this problem all evening. How do I access the resource attribute "android.R.attr.listPreferredItemHeight" from my code? I have been trying this:
int preferredItemHeight = Resources.getSystem().getDimensionPixelSize (android.R.attr.listPreferredItemHeight) ... and this: int preferredItemHeight = context.getResources().getDimensionPixelSize (android.R.attr.listPreferredItemHeight) ... and even this: TypedValue value = new TypedValue(); context.getTheme().resolveAttribute (android.R.attr.listPreferredItemHeight, value, true); int preferredItemHeight = context.getResources().getDimensionPixelSize (preferredItemHeightValue.resourceId); In the first two cases, I get a Resource.NotFoundException, in the third one, value.resourceId contains 0. So how do I get this preferred item height in my code? To give you an overview - my problem is part of a bigger problem: I try to build up a ListView with RadioButtons in every row. For that, I use a custom ListAdapter. Every row is basically created on-the-fly: a LinearLayout with a TextView and a RadioButton. It might also be, that my approach is a bit to complicated in that case - I am not that experienced on the android platform (yet). In that case, I'd be happy if you point me to a more elegant solution. I'm using the SDK 1.5. Greetings from Dresden/Germany, Benjamin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---