Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Commit

Permalink
If the name is changed, deselect items
Browse files Browse the repository at this point in the history
  • Loading branch information
spacecowboy committed May 19, 2016
1 parent c8978a9 commit 0e0aab3
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
Expand Down Expand Up @@ -191,6 +193,23 @@ public void onClick(View v) {
mRegularButtonContainer = view.findViewById(R.id.nnf_button_container);

mEditTextFileName = (EditText) view.findViewById(R.id.nnf_text_filename);
mEditTextFileName.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {

}

@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {

}

@Override
public void afterTextChanged(Editable s) {
// deSelect anything selected since the user just modified the name
clearSelections();
}
});

mCurrentDirView = (TextView) view.findViewById(R.id.nnf_current_dir);
// Restore state
Expand Down

0 comments on commit 0e0aab3

Please sign in to comment.