mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 08:58:30 +03:00
Make fab appear nicer
This commit is contained in:
parent
7a15e20b20
commit
43a82f7dcb
2 changed files with 11 additions and 4 deletions
|
@ -389,13 +389,13 @@ public class FileDisplayActivity extends HookActivity
|
|||
}
|
||||
|
||||
private void createMinFragments() {
|
||||
/*OCFileListFragment listOfFiles = new OCFileListFragment();
|
||||
OCFileListFragment listOfFiles = new OCFileListFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putBoolean(OCFileListFragment.ARG_ALLOW_CONTEXTUAL_ACTIONS, true);
|
||||
listOfFiles.setArguments(args);
|
||||
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
||||
transaction.add(R.id.left_fragment_container, listOfFiles, TAG_LIST_OF_FILES);
|
||||
transaction.commit();*/
|
||||
transaction.commit();
|
||||
}
|
||||
|
||||
private void initFragmentsWithFile() {
|
||||
|
|
|
@ -161,14 +161,21 @@ public class ExtendedListFragment extends Fragment
|
|||
searchView = (SearchView) MenuItemCompat.getActionView(item);
|
||||
searchView.setOnQueryTextListener(this);
|
||||
|
||||
final Handler handler = new Handler();
|
||||
searchView.setMaxWidth(Integer.MAX_VALUE);
|
||||
searchView.setOnQueryTextFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
public void onFocusChange(View v, final boolean hasFocus) {
|
||||
if (hasFocus) {
|
||||
mFabMain.collapse();
|
||||
}
|
||||
setFabEnabled(!hasFocus);
|
||||
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
setFabEnabled(!hasFocus);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue