public class

FioriSearchView

extends SearchView
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ androidx.appcompat.widget.LinearLayoutCompat
         ↳ androidx.appcompat.widget.SearchView
           ↳ com.sap.cloud.mobile.fiori.search.FioriSearchView
Known Direct Subclasses

Class Overview

A widget that provides a user interface for the user to enter a search query and submit a request to a search provider. Shows a list of query suggestions or results, if available, and allows the user to pick a suggestion or result to launch into.

Note: This class is included in the support library for compatibility with API level 7 and higher. If you're developing your app for API level 11 and higher only, you should instead use the framework SearchView class.

When the SearchView is used in an ActionBar as an action view, it's collapsed by default, so you must provide an icon for the action.

If you want the search field to always be visible, then call setIconifiedByDefault(false).

Developer Guides

For information about using SearchView, read the Search API guide. Additional information about action views is also available in the <Action Bar API guide

Summary

[Expand]
Inherited Constants
From class androidx.appcompat.widget.LinearLayoutCompat
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
FioriSearchView(Context context)
FioriSearchView(Context context, AttributeSet attrs)
FioriSearchView(Context context, AttributeSet attrs, int defStyleAttr)
Public Methods
QRCodeReaderSettings getQRCodeReaderSettings()
This method is deprecated. Use getQrCodeConfig() instead
QRCodeConfig getQrCodeConfig()
Get the QR reader setting config
boolean isScanEnabled()
Is scan enabled
boolean isTablet()
Returns whether the current device is tablet Use isTablet(Context) instead
void setCollapseButtonContentDescription(CharSequence description)
Set the content description on search edit field
void setCollapseIconDrawable(int res)
Set the collapse button icon
void setCollapseIconDrawable(Drawable drawable)
Set the collapse button icon
void setFullScreenSuggestion(boolean fullScreenSuggestion)
Set the suggestion pop up width to be full screen
void setOnCollapseBtnClickListener(View.OnClickListener onCollapseBtnClickListener)
Set the ClickListener on the back button on the SearchView
void setQRCodeReaderSettings(QRCodeReaderSettings QRCodeReaderSettings)
This method is deprecated. Use setQrCodeConfig(QRCodeConfig) instead
void setQrCodeConfig(QRCodeConfig qrCodeConfig)
Set the QR reader setting config
void setScanEnabled(boolean scanEnabled)
Enable or disable the scan button
void setScanIcon(int resId)
Set the scan button drawable resource
void setScanIcon(Drawable drawable)
Set the scan button drawable
void setScanIconContentDescription(CharSequence description)
Set the content description on scan button.
void setSearchContentDescription(CharSequence description)
Set the content description on search edit field
void setSearchTextAppearance(int resId)
Set the text appearance of the search text
Protected Methods
void onLayout(boolean changed, int left, int top, int right, int bottom)
void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
void setupMaterialVersion()
boolean shouldLayout(View v)
Should layout the given view
[Expand]
Inherited Methods
From class androidx.appcompat.widget.SearchView
From class androidx.appcompat.widget.LinearLayoutCompat
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource
From interface androidx.appcompat.view.CollapsibleActionView

Public Constructors

public FioriSearchView (Context context)

public FioriSearchView (Context context, AttributeSet attrs)

public FioriSearchView (Context context, AttributeSet attrs, int defStyleAttr)

Public Methods

public QRCodeReaderSettings getQRCodeReaderSettings ()

This method is deprecated.
Use getQrCodeConfig() instead

Set the QRCodeReader Settings

Returns
  • QRCodeReaderSetting

public QRCodeConfig getQrCodeConfig ()

Get the QR reader setting config

Returns
  • QRCodeConfig

public boolean isScanEnabled ()

Is scan enabled

Returns
  • boolean

public boolean isTablet ()

Returns whether the current device is tablet Use isTablet(Context) instead

public void setCollapseButtonContentDescription (CharSequence description)

Set the content description on search edit field

public void setCollapseIconDrawable (int res)

Set the collapse button icon

Parameters
res Drawable resource

public void setCollapseIconDrawable (Drawable drawable)

Set the collapse button icon

Parameters
drawable Drawable resource

public void setFullScreenSuggestion (boolean fullScreenSuggestion)

Set the suggestion pop up width to be full screen

Parameters
fullScreenSuggestion boolean

public void setOnCollapseBtnClickListener (View.OnClickListener onCollapseBtnClickListener)

Set the ClickListener on the back button on the SearchView

Parameters
onCollapseBtnClickListener OnClickListener

public void setQRCodeReaderSettings (QRCodeReaderSettings QRCodeReaderSettings)

This method is deprecated.
Use setQrCodeConfig(QRCodeConfig) instead

Get the QRCodeReader Settings

Parameters
QRCodeReaderSettings QRCodeReaderSettings

public void setQrCodeConfig (QRCodeConfig qrCodeConfig)

Set the QR reader setting config

Parameters
qrCodeConfig QRCodeConfig

public void setScanEnabled (boolean scanEnabled)

Enable or disable the scan button

Parameters
scanEnabled boolean

public void setScanIcon (int resId)

Set the scan button drawable resource

Parameters
resId resource id for scan button drawable

public void setScanIcon (Drawable drawable)

Set the scan button drawable

Parameters
drawable drawable for scan button drawable

public void setScanIconContentDescription (CharSequence description)

Set the content description on scan button.

public void setSearchContentDescription (CharSequence description)

Set the content description on search edit field

public void setSearchTextAppearance (int resId)

Set the text appearance of the search text

Protected Methods

protected void onLayout (boolean changed, int left, int top, int right, int bottom)

protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)

protected void setupMaterialVersion ()

protected boolean shouldLayout (View v)

Should layout the given view

Parameters
v View
Returns
  • boolean