1

I want to display a vertical scroll-bar in alert dialog may be fast. Because it contails thousands of data to display.

AlertDialog.Builder builder = new AlertDialog.Builder(
                PublishingPublisher.this);
        builder.setTitle("Select following:");
    //  builder.setFastScrollEnabled(true); // can i have like this something.
4

2 回答 2

0

的确!您必须制作自定义警报对话框,其中包括您在对话框中的列表和数千个数据,如下所示:

LayoutInflater inflater = ((LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE));
View customView = inflater.inflate(R.layout.dialog_row, null, false);
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setView(customView);
于 2013-01-04T09:32:46.683 回答
0

如果你想显示listViewinalertDialog然后滚动将显示:

builder.setView(<YourListView>);
于 2013-01-04T09:24:47.407 回答