mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 15:15:51 +03:00
Merge pull request #5203 from nextcloud/directEditingPre5
prevent direct editing on < Lollipop
This commit is contained in:
commit
e4f099237c
2 changed files with 12 additions and 6 deletions
|
@ -134,7 +134,7 @@ public class OCFileListBottomSheetDialog extends BottomSheetDialog {
|
|||
String json = new ArbitraryDataProvider(getContext().getContentResolver())
|
||||
.getValue(user.toPlatformAccount(), ArbitraryDataProvider.DIRECT_EDITING);
|
||||
|
||||
if (!json.isEmpty()) {
|
||||
if (!json.isEmpty() && android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
DirectEditing directEditing = new Gson().fromJson(json, DirectEditing.class);
|
||||
|
||||
if (!directEditing.getCreators().isEmpty()) {
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
package com.owncloud.android.ui.preview;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -104,11 +105,16 @@ public class PreviewTextStringFragment extends PreviewTextFragment {
|
|||
throw new RuntimeException("View may not be null");
|
||||
}
|
||||
|
||||
FloatingActionButton mFabMain = view.findViewById(R.id.text_preview_fab);
|
||||
mFabMain.setVisibility(View.VISIBLE);
|
||||
mFabMain.setEnabled(true);
|
||||
mFabMain.setOnClickListener(v -> edit());
|
||||
ThemeUtils.tintFloatingActionButton(mFabMain, R.drawable.ic_edit, getContext());
|
||||
FloatingActionButton fabMain = view.findViewById(R.id.text_preview_fab);
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||
fabMain.setVisibility(View.GONE);
|
||||
} else {
|
||||
fabMain.setVisibility(View.VISIBLE);
|
||||
fabMain.setEnabled(true);
|
||||
fabMain.setOnClickListener(v -> edit());
|
||||
ThemeUtils.tintFloatingActionButton(fabMain, R.drawable.ic_edit, getContext());
|
||||
}
|
||||
|
||||
return view;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue