Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] fix bottom sheet height tablet landscape #19655

Merged
merged 1 commit into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.google.android.material.bottomsheet.BottomSheetBehavior;
import com.google.android.material.bottomsheet.BottomSheetDialog;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;

import org.chromium.base.BravePreferenceKeys;
Expand Down Expand Up @@ -78,6 +80,9 @@ public void onDetach() {
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);

((BottomSheetDialog) getDialog())
.getBehavior()
.setState(BottomSheetBehavior.STATE_EXPANDED);
TextView title = view.findViewById(R.id.item_menu_title_text);
Button newTab = view.findViewById(R.id.new_tab);
Button privateTab = view.findViewById(R.id.new_private_tab);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.google.android.material.bottomsheet.BottomSheetBehavior;
import com.google.android.material.bottomsheet.BottomSheetDialog;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;

import org.chromium.base.BravePreferenceKeys;
Expand Down Expand Up @@ -57,6 +59,9 @@ public View onCreateView(

@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
((BottomSheetDialog) getDialog())
.getBehavior()
.setState(BottomSheetBehavior.STATE_EXPANDED);
Button nextButton = view.findViewById(R.id.btn_next);
nextButton.setOnClickListener((new View.OnClickListener() {
@Override
Expand Down