com.supermap.mapping.view
Class SymbolLibView
- java.lang.Object
-
- RecyclerView
-
- com.supermap.mapping.view.SymbolLibView
-
public class SymbolLibView extends RecyclerView
The symbol library control
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static interface
SymbolLibView.OnItemClickListener
clicking callbackstatic class
SymbolLibView.Orientation
vertical or horizontal
-
Constructor Summary
Constructors Constructor and Description SymbolLibView(android.content.Context context)
SymbolLibView(android.content.Context context, android.util.AttributeSet attrs)
SymbolLibView(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
getItemMarginHorizontal()
Gets horizontal marginsint
getItemMarginVertical()
Gets vertical marginsvoid
reloadView()
Reloads dataSymbolLibView
setBackgroundColor(Color backgroundColor)
Sets backgrounds for each symbol library.void
setHighLightColor(Color itemClickHighLightColor)
Sets the color (with transparency) of highlighting item.SymbolLibView
setImageSize(int imageSize)
Sets the size of an imageSymbolLibView
setInnerPadding(int innerPadding)
Sets the spacing between words and the imagevoid
setItemMarginHorizontal(int itemMarginHorizontal)
Sets horizontal marginsvoid
setItemMarginVertical(int itemMarginVertical)
Sets vertical marginsSymbolLibView
setItemPadding(int itemPadding)
Sets padding in each itemSymbolLibView
setMaxEms(int maxEms)
Sets how many words will be displayed at mostvoid
setOnItemClickListener(SymbolLibView.OnItemClickListener onItemClickListener)
Sets the clicking listener.SymbolLibView
setRowOrCol(int rowOrCol)
Sets the number of rows or columns with a limitation that the maximum number is 6SymbolLibView
setScrollDirection(SymbolLibView.Orientation orientation)
Sets the direction to vertical or horizontalvoid
setSize(int width, int height)
Sets the layer sizeSymbolLibView
setText(java.lang.String text)
Sets the default fontSymbolLibView
setTextColor(Color textColor)
Sets the font colorSymbolLibView
setTextSize(int textSize)
Sets the font sizevoid
showSymbolGroup(SymbolGroup symbolGroup)
Displays SymbolGroupvoid
showSymbols(java.util.List<Symbol> symbolList)
Displays the symbols list
-
-
-
Constructor Detail
-
SymbolLibView
public SymbolLibView(android.content.Context context)
- Parameters:
context
- The context.
-
SymbolLibView
public SymbolLibView(android.content.Context context, android.util.AttributeSet attrs)
- Parameters:
context
- The context.attrs
- the custom attributes
-
SymbolLibView
public SymbolLibView(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr)
- Parameters:
context
- The context.attrs
- the custom attributesdefStyleAttr
- the attributes by default
-
-
Method Detail
-
showSymbolGroup
public void showSymbolGroup(SymbolGroup symbolGroup)
Displays SymbolGroup- Parameters:
symbolGroup
- the displayed SymbolGroup
-
showSymbols
public void showSymbols(java.util.List<Symbol> symbolList)
Displays the symbols list- Parameters:
symbolList
- the displayed symbols list
-
setOnItemClickListener
public void setOnItemClickListener(SymbolLibView.OnItemClickListener onItemClickListener)
Sets the clicking listener.- Parameters:
onItemClickListener
- the clicking listener
-
setRowOrCol
public SymbolLibView setRowOrCol(int rowOrCol)
Sets the number of rows or columns with a limitation that the maximum number is 6- Parameters:
rowOrCol
- The rows or columns- Returns:
- Returns the symbol library control
-
setScrollDirection
public SymbolLibView setScrollDirection(SymbolLibView.Orientation orientation)
Sets the direction to vertical or horizontal- Parameters:
orientation
- vertical or horizontal- Returns:
- Returns the symbol library control
-
setTextSize
public SymbolLibView setTextSize(int textSize)
Sets the font size- Parameters:
textSize
- Font size.- Returns:
- Returns the symbol library control
-
setTextColor
public SymbolLibView setTextColor(Color textColor)
Sets the font color- Parameters:
textColor
- The text color.- Returns:
- Returns the symbol library control
-
setBackgroundColor
public SymbolLibView setBackgroundColor(Color backgroundColor)
Sets backgrounds for each symbol library.- Parameters:
backgroundColor
- the background of each symbol library- Returns:
- Returns the symbol library control
-
setImageSize
public SymbolLibView setImageSize(int imageSize)
Sets the size of an image- Parameters:
imageSize
- the size of an image- Returns:
- Returns the symbol library control
-
setText
public SymbolLibView setText(java.lang.String text)
Sets the default font- Parameters:
text
- the default font- Returns:
- Returns the symbol library control
-
setInnerPadding
public SymbolLibView setInnerPadding(int innerPadding)
Sets the spacing between words and the image- Parameters:
innerPadding
- the spacing between words and the image- Returns:
- Returns the symbol library control
-
setItemPadding
public SymbolLibView setItemPadding(int itemPadding)
Sets padding in each item- Parameters:
itemPadding
- padding in each item- Returns:
- Returns the symbol library control
-
setMaxEms
public SymbolLibView setMaxEms(int maxEms)
Sets how many words will be displayed at most- Parameters:
maxEms
- how many words will be displayed at most- Returns:
- Returns the symbol library control
-
setSize
public void setSize(int width, int height)
Sets the layer size- Parameters:
width
- width.height
- height.
-
reloadView
public void reloadView()
Reloads data
-
getItemMarginHorizontal
public int getItemMarginHorizontal()
Gets horizontal margins- Returns:
- horizontal margins
-
setItemMarginHorizontal
public void setItemMarginHorizontal(int itemMarginHorizontal)
Sets horizontal margins- Parameters:
itemMarginHorizontal
- horizontal margins
-
getItemMarginVertical
public int getItemMarginVertical()
Gets vertical margins- Returns:
- vertical margins
-
setItemMarginVertical
public void setItemMarginVertical(int itemMarginVertical)
Sets vertical margins- Parameters:
itemMarginVertical
- vertical margins
-
setHighLightColor
public void setHighLightColor(Color itemClickHighLightColor)
Sets the color (with transparency) of highlighting item.- Parameters:
itemClickHighLightColor
- the color of highlighting item
-
-