mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-16 14:35:04 -05:00
Fixed indentation
This commit is contained in:
parent
8e627834c1
commit
ad8b025b6f
@ -429,43 +429,43 @@ public class FolderList extends K9ListActivity {
|
|||||||
* Filter {@link #mAdapter} with the user-input.
|
* Filter {@link #mAdapter} with the user-input.
|
||||||
*/
|
*/
|
||||||
private void onEnterFilter() {
|
private void onEnterFilter() {
|
||||||
final AlertDialog.Builder filterAlert = new AlertDialog.Builder(this);
|
final AlertDialog.Builder filterAlert = new AlertDialog.Builder(this);
|
||||||
|
|
||||||
final EditText input = new EditText(this);
|
final EditText input = new EditText(this);
|
||||||
input.addTextChangedListener(new TextWatcher() {
|
input.addTextChangedListener(new TextWatcher() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
|
||||||
mAdapter.getFilter().filter(input.getText().toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count,
|
|
||||||
int after) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void afterTextChanged(Editable s) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
input.setHint(R.string.folder_list_filter_hint);
|
|
||||||
filterAlert.setView(input);
|
|
||||||
|
|
||||||
filterAlert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int whichButton) {
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
String value = input.getText().toString().trim();
|
mAdapter.getFilter().filter(input.getText().toString());
|
||||||
mAdapter.getFilter().filter(value);
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
filterAlert.setNegativeButton("Cancel",
|
@Override
|
||||||
new DialogInterface.OnClickListener() {
|
public void beforeTextChanged(CharSequence s, int start, int count,
|
||||||
public void onClick(DialogInterface dialog, int whichButton) {
|
int after) {
|
||||||
mAdapter.getFilter().filter("");
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
filterAlert.show();
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
input.setHint(R.string.folder_list_filter_hint);
|
||||||
|
filterAlert.setView(input);
|
||||||
|
|
||||||
|
filterAlert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int whichButton) {
|
||||||
|
String value = input.getText().toString().trim();
|
||||||
|
mAdapter.getFilter().filter(value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
filterAlert.setNegativeButton("Cancel",
|
||||||
|
new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int whichButton) {
|
||||||
|
mAdapter.getFilter().filter("");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
filterAlert.show();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -552,10 +552,10 @@ public class FolderList extends K9ListActivity {
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
case R.id.filter_folders:
|
case R.id.filter_folders:
|
||||||
onEnterFilter();
|
onEnterFilter();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case R.id.account_settings:
|
case R.id.account_settings:
|
||||||
onEditAccount();
|
onEditAccount();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user