I am opening file pick Intent with, Bellow code
Intent intent_upload = new Intent();
intent_upload.setType("*/*");
intent_upload.setAction(Intent.ACTION_GET_CONTENT);
activity.startActivityForResult(intent_upload, Constants.FILE_PICK_REQUEST_CODE);
I Want remove Contact option from list, please can anyone help.
Thanks
The removeAll () function repeatedly removes the first option in the select box, therefore, it removes all the options. We’ll build a small application that allows users to add a new option from the value of an input text and to remove one or more selected options:
The HTMLSelectElement type represents the <select> element. It has the add () method that dynamically adds an option to the <select> element and the remove () method that removes an option from the <select> element:
You can use a selector to get an option with a specific value, then remove it. The following uses querySelector, but you could also loop over all the options and find the one (s) with the required value and remove them the same way.
When you remove the first option, the select box moves another option as the first option. The removeAll () function repeatedly removes the first option in the select box, therefore, it removes all the options.
Use below code I think it can help you and also refers Link
Intent intent_upload = new Intent();
intent_upload.setType("*/*");
intent_upload.setAction(Intent.ACTION_GET_CONTENT);
intent_upload.addCategory(Intent.CATEGORY_OPENABLE);
activity.startActivityForResult(intent_upload, Constants.FILE_PICK_REQUEST_CODE);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With