Example usage for android.widget Spinner equals

List of usage examples for android.widget Spinner equals

Introduction

In this page you can find the example usage for android.widget Spinner equals.

Prototype

public boolean equals(Object obj) 

Source Link

Document

Indicates whether some other object is "equal to" this one.

Usage

From source file:cc.siara.csv_ml_demo.MainActivity.java

@Override
public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
    // Sets Input text and XPath text based on selected example
    Spinner spinner = (Spinner) findViewById(R.id.spExamples);
    if (spinner.equals(arg0)) {
        EditText etInput = (EditText) findViewById(R.id.etInput);
        EditText etXPath = (EditText) findViewById(R.id.etXPath);
        int selectedPos = spinner.getSelectedItemPosition();
        etInput.setText(aExampleCSV[selectedPos]);
        etXPath.setText(aExampleXPath[selectedPos]);
        Button btnXML = (Button) findViewById(R.id.btnXML);
        btnXML.requestFocus();/*from   www  . j av  a  2s  . c  o  m*/
    }
}