RightToLeftDecimalEditText

EditText which allows to append decimal numbers from right to left

Лицензия

Лицензия

Категории

Категории

Ant Компиляция и сборка
Группа

Группа

io.pravikant
Идентификатор

Идентификатор

rtledittext
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

aar
Описание

Описание

RightToLeftDecimalEditText
EditText which allows to append decimal numbers from right to left
Ссылка на сайт

Ссылка на сайт

https://github.com/iampravikant/RightToLeftDecimalEditText
Система контроля версий

Система контроля версий

https://github.com/iampravikant/RightToLeftDecimalEditText

Скачать rtledittext

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/io.pravikant/rtledittext/ -->
<dependency>
    <groupId>io.pravikant</groupId>
    <artifactId>rtledittext</artifactId>
    <version>1.0.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/io.pravikant/rtledittext/
implementation 'io.pravikant:rtledittext:1.0.0'
// https://jarcasting.com/artifacts/io.pravikant/rtledittext/
implementation ("io.pravikant:rtledittext:1.0.0")
'io.pravikant:rtledittext:aar:1.0.0'
<dependency org="io.pravikant" name="rtledittext" rev="1.0.0">
  <artifact name="rtledittext" type="aar" />
</dependency>
@Grapes(
@Grab(group='io.pravikant', module='rtledittext', version='1.0.0')
)
libraryDependencies += "io.pravikant" % "rtledittext" % "1.0.0"
[io.pravikant/rtledittext "1.0.0"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
com.android.support » appcompat-v7 jar 27.1.1
org.jetbrains.kotlin : kotlin-stdlib-jdk7 jar 1.2.0

Модули Проекта

Данный проект не имеет модулей.

MIT Licence

RightToLeft Decimal EditText

EditText which allows to append decimal numbers from right to left

Example

alt text

Usage

Step 1: Add RightToLeftDecimalEditText in XML

<io.pravikant.rtledittext.RightToLeftDecimalEditText
        android:id="@+id/main_weight"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="Weight"
        app:rtl_decimal_points="3"
        app:rtl_decimal_value="0.000" />

Step 2 (Optional): Define decimalPoints and decimalValue in code

main_weight.setDecimalPoints(3)
main_weight.setDecimalValue(BigDecimal(56))

Step 3 (Optional): Define nextFocusableView and listener in code

main_weight.setNextFocusableView(main_width)
main_width.setNextFocusableView(main_height)
main_height.setListener(object : RightToLeftDecimalEditText.RightToLeftDecimalEditTextListener {
    override fun onKeyboardEnterClicked() {
        onSubmit()
    }
})

Step 4: Get the BigDecimal value

main_weight.getDecimalValue()

Attributes

<attr name="rtl_decimal_points" format="integer" />
<attr name="rtl_decimal_value" format="float" />

Download

Gradle:

repositories {
  mavenCentral()
  google()
}

dependencies {
  implementation 'io.pravikant:rtledittext:1.0.0'
}

Note: Don't forget to add mavenCentral() under repositories in root-level build.gradle

Maven:

<dependency>
  <groupId>io.pravikant</groupId>
  <artifactId>rtledittext</artifactId>
  <version>1.0.0</version>
  <type>aar</type>
</dependency>

Author

Pramod Ravikant

alt text alt text alt text

Licence

This project is licensed under the MIT License - see the LICENSE file for details

Версии библиотеки

Версия
1.0.0