Cross button alignment while search in landscape mode


Product Version:

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


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?


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:


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

On the Android platform.


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 {

    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;


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?