NumberButton
####????????????????????????
####???
- ????????????????????
- ???????????
- ???????????
#####??
- ??
- compile 'ren.qinc.numberbutton:numberbutton:0.0.1'
- ??
<ren.qinc.numberbutton.NumberButton
android:id="@+id/number_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
qinc:editable="true"/>
- ??????
NumberButton numberButton = (NumberButton) findViewById(R.id.number_button);
//assert numberButton != null; numberButton.setBuyMax(5)
.setInventory(6)
.setCurrentNumber(10)
.setOnWarnListener(new NumberButton.OnWarnListener() {
@Override
public void onWarningForInventory(int inventory) {
Toast.makeText(MainActivity.this, "????:" + inventory, Toast.LENGTH_SHORT).show();
}
@Override
public void onWarningForBuyMax(int buyMax) {
Toast.makeText(MainActivity.this, "???????:" + buyMax, Toast.LENGTH_SHORT).show();
}
}
);
- ???
- ?????????? * editable(boolean):???????? * buttonWidth(dimension):?????? * textWidth(dimension):?????? * textSize(dimension):?????? * textColor(color):????