Class SideBar

  • All Implemented Interfaces:
    android.graphics.drawable.Drawable.Callback , android.view.KeyEvent.Callback , android.view.accessibility.AccessibilityEventSource

    
    public class SideBar
    extends View
                        

    Alphabetical index View on the right side

    • Constructor Detail

      • SideBar

        SideBar(Context context, AttributeSet attrs, int defStyleAttr)
      • SideBar

        SideBar(Context context, AttributeSet attrs)
      • SideBar

        SideBar(Context context)
    • Method Detail

      • setTextView

         void setTextView(TextView mTextDialog)

        Set the TextView used to display the selected letter

        Parameters:
        mTextDialog - the TextView to display the letter
      • onMeasure

         void onMeasure(int widthMeasureSpec, int heightMeasureSpec)

        Override onMeasure to dynamically set the SideBar height based on letter count

      • onDraw

         void onDraw(Canvas canvas)

        Override onDraw to draw the letters

      • setLetters

         void setLetters(Array<String> letters)

        Set the letter array from external source

        Parameters:
        letters - the letter array