开发者

How to use spinner in popup window when clicking one of the tabs in android?

I am new to android. My current task it to create an app for my client. I am using Tab layout, When clicking one of the tab I wants to show popup window with spinner in it. I refered some sample tutorials but I couldnot achieve it. Please help me with the sample codes.

开发者_StackOverflow社区

Thanks in advance. Vinodh.G


Make a custom view with a spinner inside of it. Then create a dialog and set the dialog's view to your custom view

LayoutInflater inflater = (LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.custom_dialog, null);
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setView(layout);
AlertDialog CustomDialog = builder.create();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜