AUNumberKeyboardView provides a numeric keyboard with three states.
Usage instructions
You can display it as a separate view, such as in a miniapp.
You can attach it to AUAmountEditText using AUNumberKeyBoardUtil. This utility is already encapsulated in AUAmountEditText. For more information, see the AUAmountInputBox document.
You can attach it to a standard EditText using AUNumberKeyBoardUtil. You must invoke this utility.
Preview

API reference
AUAmountEditText
/**
* Sets the style of the keyboard. The default value is STYLE_POINT.
* @param style STYLE_POINT, STYLE_X, or STYLE_NONE
*/
public void setStyle(int style)
/**
* Sets the button listener.
* @param listener
*/
public void setActionClickListener(OnActionClickListener listener)
/**
* Sets the display state listener.
* @param windowStateChangeListener
*/
public void setWindowStateChangeListener(WindowStateChangeListener windowStateChangeListener)
/**
* Shows the keyboard.
*/
public void show()
/**
* Hides the keyboard.
*/
public void hide()
/**
* Returns the display state.
* @return
*/
public boolean isShow()AUNumberKeyBoardUtil
/**
* Passes the EditText and AUNumberKeyboardView.
* @param context
* @param editText
* @param keyboardView
*/
public AUNumberKeyBoardUtil(Context context, EditText editText, AUNumberKeyboardView keyboardView)
/**
* Sets the scroll view.
* @param view
*/
public void setScrollView(ScrollView view)
/**
* Shows the numeric keypad.
*/
public void showKeyboard()
/**
* Hides the numeric keypad.
*/
public void hideKeyboard()Code examples
AUAmountEditText
AUNumberKeyboardView auNumberKeyboardView = new AUNumberKeyboardView(this, AUNumberKeyboardView.STYLE_POINT, new AUNumberKeyboardView.OnActionClickListener() {
@Override
public void onNumClick(View view, CharSequence num) {
}
@Override
public void onDeleteClick(View view) {
}
@Override
public void onConfirmClick(View view) {
}
@Override
public void onCloseClick(View view) {
}
});AUNumberKeyBoardUtil
XML:
<com.alipay.mobile.antui.basic.AULinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <com.alipay.mobile.antui.basic.AUScrollView android:id="@+id/scroll" android:layout_weight="1" android:layout_width="match_parent" android:layout_height="match_parent"> <com.alipay.mobile.antui.basic.AULinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <EditText android:id="@+id/editText" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" /> </com.alipay.mobile.antui.basic.AULinearLayout> </com.alipay.mobile.antui.basic.AUScrollView> <com.alipay.mobile.antui.keyboard.AUNumberKeyboardView android:id="@+id/keyboard" android:layout_width="match_parent" android:layout_height="wrap_content" android:visibility="gone"/> </com.alipay.mobile.antui.basic.AULinearLayout>Java:
keyBoardUtil = new AUNumberKeyBoardUtil(context, editText, keyboardView); keyBoardUtil.setScrollView(scrollView);