android - How to remove Black Rectangle box in Dialog? -


i used following code prepare custom dialog,it showing custom layout in black colored rectangle box.

final dialog dialog = new dialog(getparent(),r.style.pausedialog); dialog.requestwindowfeature(window.feature_no_title);  dialog.setcontentview(r.layout.social_share); dialog.settitle("social sharing"); dialog.setcancelable(true); 

how remove box,which should show custom layout.

thanks!

you can set background <shape> per requirement in customize dialog

in custom_dialog_layout.xml:

android:background = "@layout/dialog_shape" 

then in dialog_shape.xml:

<?xml version="1.0" encoding="utf-8"?>  <shape xmlns:android="http://schemas.android.com/apk/res/android"       android:shape="rectangle" >       <gradient android:startcolor="#ff0e2e57"       android:endcolor="#ff0e2e57"              android:angle="225" android:paddingleft="20dip"/>  </shape> 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -