Merge pull request #9462 from nextcloud/expandSendShareDialog

Expand send share dialog when in landscape mode
This commit is contained in:
Álvaro Brey 2021-12-09 15:32:37 +01:00 committed by GitHub
commit ad5c73f5ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,6 +13,7 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.google.android.material.bottomsheet.BottomSheetBehavior;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
import com.google.android.material.snackbar.Snackbar;
import com.owncloud.android.R;
@ -171,6 +172,12 @@ public class SendShareDialog extends BottomSheetDialogFragment {
return view;
}
@Override
public void onStart() {
super.onStart();
BottomSheetBehavior.from((View) requireView().getParent()).setState(BottomSheetBehavior.STATE_EXPANDED);
}
private void shareByLink() {
if (file.isSharedViaLink()) {
((FileActivity) getActivity()).getFileOperationsHelper().getFileWithLink(file);