android - Why isn't my ListView/Dialog transparent? -


edit~ solution found , in response below (last response now) can't mark answer question until 2 days now. in meantime, i'll leave edit here until can mark correct.

where dialog called:

public onclicklistener fieldlistener = new onclicklistener() {     public void onclick(view v) {         fragmentmanager fm = getsupportfragmentmanager();         switch (v.getid()) {         case (0) :          choosedialog agedialog = new choosedialog("age", ageedittext, act);         agedialog.show(fm, "fragment_edit_name"); 

the dialog:

public class choosedialog extends dialogfragment implements dialoginterface.onclicklistener, onmultichoiceclicklistener {  public dialog oncreatedialog(bundle savedinstancestate) {         layoutinflater inflater = (layoutinflater) activity.getsystemservice(context.layout_inflater_service);         view dialoglayout = inflater.inflate(r.layout.dialog, null);          alertdialog.builder builder;         switch (edittext.getid()) {         case (0) :             listview list = (listview) dialoglayout.findviewbyid(r.id.listview1);         list.setadapter(new arrayadapter<string>(activity, r.layout.dialoglist,                  activity.getresources().getstringarray(r.array.agearray)));         list.setbackgroundcolor(00000000);         builder = new alertdialog.builder(activity);         builder.settitle(type);         builder.setnegativebutton("cancel", this);         builder.setview(dialoglayout);         /* builder.setadapter(new arrayadapter<string>(activity, r.layout.dialoglist,                      activity.getresources().getstringarray(r.array.agearray)),                      new dialoginterface.onclicklistener() {                 public void onclick(dialoginterface dialog, int which) {                     edittext.settext(activity.getresources().getstringarray(r.array.agearray)[which]);                 }}                  );*/         return builder.create(); 

dialog.xml:

<?xml version="1.0" encoding="utf-8"?> <listview xmlns:android="http://schemas.android.com/apk/res/android"     android:id="@+id/listview1"     android:background="#00000000"     android:cachecolorhint="#00000000"     android:layout_width="match_parent"     android:layout_height="wrap_content" > </listview> 

dialoglist.xml (just textview adapter):

<?xml version="1.0" encoding="utf-8"?> <textview xmlns:android="http://schemas.android.com/apk/res/android"     android:id="@android:id/text1"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:gravity="center_vertical"     android:minheight="?android:attr/listpreferreditemheight"     android:paddingleft="6dip"     android:textcolor="@color/androidblue"     android:paddingright="10dip"     android:layout_weight="1"     android:textappearance="?android:attr/textappearancelarge" /> 

enter image description here

try

list.setbackgroundcolor(color.transparent); 

edit:

while browsing few issues of ics, came across this , in opinion see might issue ics. thought issue not related question shows developer has problem setting background.

corrections welcome.


Comments