mirror of
https://github.com/nextcloud/android.git
synced 2024-11-29 10:49:04 +03:00
if searchView does not exist, search is not opened
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
7b44f3b296
commit
df55697cc2
1 changed files with 9 additions and 4 deletions
|
@ -42,6 +42,7 @@ import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
import android.support.annotation.NonNull;
|
||||||
import android.support.design.widget.BottomNavigationView;
|
import android.support.design.widget.BottomNavigationView;
|
||||||
import android.support.design.widget.Snackbar;
|
import android.support.design.widget.Snackbar;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
|
@ -342,8 +343,8 @@ public class FileDisplayActivity extends HookActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRequestPermissionsResult(int requestCode,
|
public void onRequestPermissionsResult(int requestCode, @NonNull String permissions[],
|
||||||
String permissions[], int[] grantResults) {
|
@NonNull int[] grantResults) {
|
||||||
switch (requestCode) {
|
switch (requestCode) {
|
||||||
case PermissionUtil.PERMISSIONS_WRITE_EXTERNAL_STORAGE: {
|
case PermissionUtil.PERMISSIONS_WRITE_EXTERNAL_STORAGE: {
|
||||||
// If request is cancelled, result arrays are empty.
|
// If request is cancelled, result arrays are empty.
|
||||||
|
@ -1002,8 +1003,12 @@ public class FileDisplayActivity extends HookActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isSearchOpen() {
|
private boolean isSearchOpen() {
|
||||||
final View mSearchEditFrame = searchView.findViewById(android.support.v7.appcompat.R.id.search_edit_frame);
|
if (searchView == null) {
|
||||||
return (mSearchEditFrame != null && mSearchEditFrame.getVisibility() == View.VISIBLE);
|
return false;
|
||||||
|
} else {
|
||||||
|
View mSearchEditFrame = searchView.findViewById(android.support.v7.appcompat.R.id.search_edit_frame);
|
||||||
|
return (mSearchEditFrame != null && mSearchEditFrame.getVisibility() == View.VISIBLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void revertBottomNavigationBarToAllFiles() {
|
private void revertBottomNavigationBarToAllFiles() {
|
||||||
|
|
Loading…
Reference in a new issue