Currently on an Android 4.3 device. I'm using the excellent answer provided here I was able to reduce the font size of an AlertDialog
's individual items:
<style name="AlertDialogTheme" parent="android:Theme.Dialog">
<item name="android:textSize">13sp</item>
</style>
The dialog itself is built with:
ContextThemeWrapper cw = new ContextThemeWrapper( this, R.style.AlertDialogTheme );
AlertDialog.Builder builder = new AlertDialog.Builder(cw);
However, the problem is that the individual height of the items still stays the same — in fact, there is a fifth element that is just shown when you scroll in the dialog:
I tried setting the dividerHeight
but that just increased the spacing. I also set the layout_margin
property to 0dp
without success.
What's the correct style definition for this dialog to reduce the space between the labels?
Note that I do not want to build the whole dialog using a view again. I'd like to keep the existing AlertDialog.