com.supermap.mapping.view
Class SymbolLibView
- java.lang.Object
-
- RecyclerView
-
- com.supermap.mapping.view.SymbolLibView
-
public class SymbolLibView extends RecyclerViewThe symbol library control
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static interfaceSymbolLibView.OnItemClickListenerclicking callbackstatic classSymbolLibView.Orientationvertical 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 intgetItemMarginHorizontal()Gets horizontal marginsintgetItemMarginVertical()Gets vertical marginsvoidreloadView()Reloads dataSymbolLibViewsetBackgroundColor(Color backgroundColor)Sets backgrounds for each symbol library.voidsetHighLightColor(Color itemClickHighLightColor)Sets the color (with transparency) of highlighting item.SymbolLibViewsetImageSize(int imageSize)Sets the size of an imageSymbolLibViewsetInnerPadding(int innerPadding)Sets the spacing between words and the imagevoidsetItemMarginHorizontal(int itemMarginHorizontal)Sets horizontal marginsvoidsetItemMarginVertical(int itemMarginVertical)Sets vertical marginsSymbolLibViewsetItemPadding(int itemPadding)Sets padding in each itemSymbolLibViewsetMaxEms(int maxEms)Sets how many words will be displayed at mostvoidsetOnItemClickListener(SymbolLibView.OnItemClickListener onItemClickListener)Sets the clicking listener.SymbolLibViewsetRowOrCol(int rowOrCol)Sets the number of rows or columns with a limitation that the maximum number is 6SymbolLibViewsetScrollDirection(SymbolLibView.Orientation orientation)Sets the direction to vertical or horizontalvoidsetSize(int width, int height)Sets the layer sizeSymbolLibViewsetText(java.lang.String text)Sets the default fontSymbolLibViewsetTextColor(Color textColor)Sets the font colorSymbolLibViewsetTextSize(int textSize)Sets the font sizevoidshowSymbolGroup(SymbolGroup symbolGroup)Displays SymbolGroupvoidshowSymbols(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
-
-