Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove Contact select option form file select options

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.

Thanksenter image description here

like image 549
Jogendra Gouda Avatar asked Mar 15 '16 10:03

Jogendra Gouda


People also ask

How to remove all the selected options in a select box?

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:

How do I add and remove an option in htmlselectelement?

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:

How do I remove an option with a specific value?

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.

What is the difference between removeall () and remove all options?

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.


1 Answers

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);
like image 146
hharry_tech Avatar answered Nov 05 '22 03:11

hharry_tech