WIFI = (Spinner) findViewById(R.id.WIFI);
// Create an ArrayAdapter using the string array and a default spinner layout
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,
R.array.WIFI, android.R.layout.simple_dropdown_item_1line);
// Specify the layout to use when the list of choices appears
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
// Apply the adapter to the spinner
WIFI.setAdapter(adapter);
WIFI.setOnItemSelectedListener(new MyOnItemSelectedListener());
如何通过从微调器中选择来启用wifi。我会感谢你的