fxfuture
fxfuture

Reputation: 1950

Theme.Dialog - style 4.3 to look like 2.3?

I designed my app on a 2.3 device and was really happy with the Theme.Dialog I used for my activities to open them floating above the main activity.

However, when moving to 4.3 I don't like the look of the dialogs - the background is darker and not semi-transparent as before and they lack the white rounded border.

How can I use the old theme or change the default theme to look like 2.3? If I found the source code could I use that to create my own theme?

Thanks

UPDATE:

Perhaps my question wasn't clear enough. I would like my activity dialogs to always look like this image (2.3 style), no matter what version of the OS or manufacturer. How can I achieve this?

enter image description here

Upvotes: 1

Views: 743

Answers (1)

sergej shafarenka
sergej shafarenka

Reputation: 20416

Create style file with a custom theme:

values/styles.xml

<style name="DialogTheme" parent="android:Theme.Dialog">
</style>

... and assign this theme to your activity in android manifest

AndroidManifest.xml

<activity
    android:name="<your activity class name here>"
    android:theme="@style/DialogTheme" />

Upvotes: 1

Related Questions