Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NullPointerException at android.widget.AutoCompleteTextView.performFiltering(AutoCompleteTextView.java:858) #77

Open
thebluemagician opened this issue Jun 22, 2017 · 3 comments

Comments

@thebluemagician
Copy link

thebluemagician commented Jun 22, 2017

Every time i use a listener, it gives the the NullPointer Exception. below is code extract

`final ArrayAdapter adapter = new ArrayAdapter(MainActivity.this, android.R.layout.simple_dropdown_item_1line, SPINNER_DATA);
spinnerItem = (MaterialBetterSpinner)findViewById(R.id.choose_course);
spinnerItem.setAdapter(adapter);
spinnerItem.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@OverRide
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
item = adapterView.getItemAtPosition(i).toString();
Toast.makeText(adapterView.getContext(),item,Toast.LENGTH_SHORT).show();
Intent intent = new Intent(MainActivity.this, SemesterActivity.class);
startActivity(intent);

        }
    });

`

@truongluuxuan
Copy link

Open class BetterSpinner, find method "onFocusChanged", change this code if (focused) to if (focused==true&&previouslyFocusedRect!=null), Done

@asif1261
Copy link

But BetterSpinner class is write protected class, then how do i change it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants