Cross button alignment while search in landscape mode

Product:

Product Version:

Please give a brief summary of your issue:
(Think of this as an email subject)

image-20220324-082848

Why this cross button is showing in mid of the screen in landscape mode. Do we have any option to set on the right side or show like as showing in portrait mode?

Thanks-
Pawan

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

What device/platform are you working on? iOS? Android? Windows mobile?

On the Android platform.

Hi,

Thanks for contacting us. The search box is set to wrap_content and the X comes from the clear icon from the Search View. To override this please create a Custom TabHostFragment class and override the onViewCreated method to contain:

public class CustomTabHostFragment extends PdfViewCtrlTabHostFragment2 {

    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        Toolbar.LayoutParams params = new Toolbar.LayoutParams(Gravity.END);
        params.width = Toolbar.LayoutParams.MATCH_PARENT;
        mSearchToolbar.getSearchView().setLayoutParams(params);
    }

}

In the above example it will create a full width search bar:

Could you please give this a try to see if it’s what you expect to see?

Thanks,
Andrew.