How to write file name using spinner selection?

hi, i created a select country selection using spinner. when user select the spinner selection, how i pass the selection to filename.

example : if user select the Argentina, filename should be Argentina-firstname.txt

You might want to use if-then-else blocks....

thanks for your reply. Actually i implemented if else before. but my app not read the text file after implementing if else with spinner

see this

can you show your codes??

initially i used the check box . so it worked correctly. but the selection is longer. so i tried spinner with if else . but now it not reading the text file.only the afganistan file read

How about this:

And Netherland should be Netherlands...