roundsoftinputlib

A round soft input mode for Android Wear devices

License

License

Categories

Categories

ORM Data
GroupId

GroupId

com.github.vitormota
ArtifactId

ArtifactId

roundsoftinputlib
Last Version

Last Version

0.9.0
Release Date

Release Date

Type

Type

aar
Description

Description

roundsoftinputlib
A round soft input mode for Android Wear devices
Project URL

Project URL

https://github.com/vitormota/RoundSoftInput
Source Code Management

Source Code Management

https://github.com/vitormota/RoundSoftInput

Download roundsoftinputlib

How to add to project

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

Dependencies

compile (5)

Group / Artifact Type Version
com.android.databinding » adapters jar 1.1
com.android.databinding : baseLibrary jar 2.1.0-beta1
com.android.databinding » library jar 1.1
com.ibm.icu : icu4j jar 56.1
com.google.android.support » wearable jar 1.3.0

Project Modules

There are no modules declared in this project.

Round Soft Input

Round soft input mode for Android Wear

DemoRound DemoSquare

Features

  • Configurable displayed characters
  • Support up to 26 keys on screen
  • Customizable fling gestures for special functions, by default:
    • ⬅️ backspace
    • ⬆️ toggle case
    • ➡️ insert space
    • ⬇️ cycle alternative keys
  • Optimized for both right and left handed interaction
  • Automatic detection of round or square screen

Usage

Add a dependency to your build.gradle:

dependencies {
  compile 'com.github.vmota:roundsoftinputlib:0.9.0'
}

And enable databinding:

dataBinding {
 enabled = true
}

Basic

  1. Start SoftInputActivity
  Intent intent = new Intent(this, SoftInputActivity.class);
  startActivityForResult(intent, SoftInputActivity.TEXT_INSERT_REQUEST);
  1. Then get the inserted text 'onActivityResult' method
  if (requestCode == SoftInputActivity.TEXT_INSERT_REQUEST) {
		if (resultCode == RESULT_OK) {
			final String insertedText = data.getStringExtra(SoftInputActivity.INSERTED_TEXT_KEY_NAME);
			//do awesome stuff...
		}
	}

Customized

  1. Pre insert text (useful for text edition)
	bundle.putString(SoftInputActivity.PRE_INSERTED_TEXT_KEY_NAME, mInputTextCustom.getText().toString());
  1. Custom key characters
	intent.putExtra(SoftInputActivity.CUSTOM_CHAR_SET_KEY_NAME, "0123456789.");
  1. Optimized for right handed use
  bundle.putBoolean(SoftInputActivity.RIGHT_HANDED_LAYOUT_KEY_NAME, true);

Check out the sample with all the code 😉

Coming up

  • Better handle screen obscuration
  • Word prediction/auto-correction
  • Customize exit overlay and initial greet message

Trouble sleeping? Read all about this work here 😁

Versions

Version
0.9.0