|
|
|
@ -249,7 +249,6 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|
|
|
|
private ImageButton ibHintSupport;
|
|
|
|
|
private ImageButton ibHintSwipe;
|
|
|
|
|
private ImageButton ibHintSelect;
|
|
|
|
|
private TextViewAutoCompleteAction etSearch;
|
|
|
|
|
private TextView tvNoEmail;
|
|
|
|
|
private TextView tvNoEmailHint;
|
|
|
|
|
private FixedRecyclerView rvMessage;
|
|
|
|
@ -262,6 +261,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|
|
|
|
private ImageButton ibSeen;
|
|
|
|
|
private ImageButton ibUnflagged;
|
|
|
|
|
private ImageButton ibSnoozed;
|
|
|
|
|
private TextViewAutoCompleteAction etSearch;
|
|
|
|
|
private BottomNavigationView bottom_navigation;
|
|
|
|
|
private ContentLoadingProgressBar pbWait;
|
|
|
|
|
private Group grpSupport;
|
|
|
|
@ -472,7 +472,6 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|
|
|
|
ibHintSupport = view.findViewById(R.id.ibHintSupport);
|
|
|
|
|
ibHintSwipe = view.findViewById(R.id.ibHintSwipe);
|
|
|
|
|
ibHintSelect = view.findViewById(R.id.ibHintSelect);
|
|
|
|
|
etSearch = view.findViewById(R.id.etSearch);
|
|
|
|
|
tvNoEmail = view.findViewById(R.id.tvNoEmail);
|
|
|
|
|
tvNoEmailHint = view.findViewById(R.id.tvNoEmailHint);
|
|
|
|
|
rvMessage = view.findViewById(R.id.rvMessage);
|
|
|
|
@ -485,6 +484,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|
|
|
|
ibSeen = view.findViewById(R.id.ibSeen);
|
|
|
|
|
ibUnflagged = view.findViewById(R.id.ibUnflagged);
|
|
|
|
|
ibSnoozed = view.findViewById(R.id.ibSnoozed);
|
|
|
|
|
etSearch = view.findViewById(R.id.etSearch);
|
|
|
|
|
bottom_navigation = view.findViewById(R.id.bottom_navigation);
|
|
|
|
|
|
|
|
|
|
pbWait = view.findViewById(R.id.pbWait);
|
|
|
|
@ -548,49 +548,6 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
etSearch.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onFocusChange(View v, boolean hasFocus) {
|
|
|
|
|
if (!hasFocus)
|
|
|
|
|
endSearch();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
etSearch.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
|
|
|
|
if (actionId == EditorInfo.IME_ACTION_DONE) {
|
|
|
|
|
endSearch();
|
|
|
|
|
return true;
|
|
|
|
|
} else
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
etSearch.setActionRunnable(new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
performSearch(true);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
etSearch.addTextChangedListener(new TextWatcher() {
|
|
|
|
|
@Override
|
|
|
|
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
|
|
|
|
// Do nothing
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
|
|
|
|
performSearch(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void afterTextChanged(Editable s) {
|
|
|
|
|
// Do nothing
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
rvMessage.setHasFixedSize(false);
|
|
|
|
|
|
|
|
|
|
int threads = prefs.getInt("query_threads", 4);
|
|
|
|
@ -878,6 +835,50 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
etSearch.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onFocusChange(View v, boolean hasFocus) {
|
|
|
|
|
if (!hasFocus)
|
|
|
|
|
endSearch();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
etSearch.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
|
|
|
|
if (actionId == EditorInfo.IME_ACTION_DONE) {
|
|
|
|
|
endSearch();
|
|
|
|
|
return true;
|
|
|
|
|
} else
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
etSearch.setActionRunnable(new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
performSearch(true);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
etSearch.addTextChangedListener(new TextWatcher() {
|
|
|
|
|
@Override
|
|
|
|
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
|
|
|
|
// Do nothing
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
|
|
|
|
performSearch(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void afterTextChanged(Editable s) {
|
|
|
|
|
// Do nothing
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//bottom_navigation.findViewById(R.id.action_delete).setOnLongClickListener(new View.OnLongClickListener() {
|
|
|
|
|
// @Override
|
|
|
|
|
// public boolean onLongClick(View v) {
|
|
|
|
|