All Products
Search
Document Center

Mobile Platform as a Service:Index component

Last Updated:Mar 02, 2023

AUBladeView works with ListView which is sorted alphabetically. On the letter index on the left or right side of the page, when you click or slide to the corresponding letter, the event in the corresponding letter position is triggered. The default index ranges from letter A to letter Z. One or two customized single characters can be added to the top of the index.

Sample image

The two characters above A are customized, as shown in the following figure. The default character ranges from A to Z.

Row

Dependency

See Quick start.

API description

/**
     * Set the letter selection listener.
     */
        public void setOnItemClickListener(OnItemClickListener listener) 

        public interface OnItemClickListener {

        /**
         * Set the letter selection listener.
         * @param clickChar The letter clicked or selected.
         */
        void onItemClick(String clickChar);

        /**
         * The finger raising event. You do not need to pay attention to this method if there is no special requirement.
         */
        void onClickUp();
    }

Custom properties

Property

Description

Type

top1Text

The first customized text character.

Reference

top2Text

The second customized text character.

Reference

showSelectPop

whether to show the floating layer popped-up in the middle during sliding or clicking.

Boolean

Code sample

<com.alipay.mobile.antui.basic.AUBladeView
        android:layout_width="24dp"
        android:layout_height="wrap_content"
        app:top1Text="⊙"
        app:top2Text="Row"/>

As shown in Sample image, top1Text and top2Text can be omitted by default.