开发者

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

开发者 https://www.devze.com 2023-03-23 16:11 出处:网络
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 tutor

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

精彩评论

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

关注公众号