jjb
jjb

Reputation: 3570

Alternative to Dialog.setOnShowListener in Android api level 7

Does anyone have an idea of an alternative to using the new (as of api level 8) Dialog.setOnShowListener. I would like to adjust some things in the calling activity based on the measured height of the dialog, but in order for that to work, I need access to the measured height of the dialog. It works fine in an OnShowListener() callback, but I'd like to find a solution that will work on api level 7.

Upvotes: 0

Views: 1011

Answers (1)

jjb
jjb

Reputation: 3570

The approach I ended up taking was to override the onLayout for the root layout object in my dialog, and then perform my necessary adjustments in there. Works fine.

Upvotes: 2

Related Questions