Make items visible on Android 2.x.

This commit is contained in:
James Sanford 2012-12-21 20:53:26 -08:00
parent f5f5a3b70b
commit a873aef4a2
1 changed files with 8 additions and 1 deletions

View File

@ -113,8 +113,15 @@ public class DiskImageFragment extends SherlockDialogFragment {
}
public View getView(int pos, View convertView, ViewGroup parent) {
int layoutid;
if (android.os.Build.VERSION.SDK_INT >= 11) {
layoutid = android.R.layout.simple_list_item_1;
} else {
layoutid = android.R.layout.select_dialog_item;
}
if (convertView == null) {
convertView = mInflater.inflate(android.R.layout.simple_list_item_1, parent, false);
convertView = mInflater.inflate(layoutid, parent, false);
}
int item = pos; // BUG: should be getItem(pos)
String title = mFoundImages.get(item).getTitle();