I need to create a activity which should look like as a dialog box with a rounded corners.
For this requirement I set
android:theme="@android:style/Theme.Dialog"
Now my activity looks like a dialog box but I need its corners to be rounded.
Then I created xml with attribute and set this drawable as my activity theme but now my activity not looks like dialog box.
Please suggest me what can be done so that my activity looks like dialog box with rounded corners.
You could make your own
themethat has rounded corners. First you’ll need adrawablefor theActivitybackground:Next make your own theme that extends the parent
Theme.Dialog:This will be in a file named
styles.xmlin theres/valuesfolder. Use this theme in the android manifest for theActivityyou want: