• Stars
    star
    845
  • Rank 52,090 (Top 2 %)
  • Language
    Java
  • Created about 8 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Software keyboard open/close watcher for Android.

AndroidKeyboardWatcher

Software keyboard open/close watcher for Android.

Android SDK doesn't provide direct way to track open/close events from software keyboard. This small library does it for you.

AndroidKeyboardWatcher

Usage

Make sure that you use adjustResize windowSoftInputMode in your Acitivty configuration in AndroidManifest.xml:

<activity
    android:name=".MainActivity"
    android:windowSoftInputMode="adjustResize" />

Bind KeyboardWatcher in your Activity.onCreate() method. To prevent memory leaks make sure to unbind it in onDestroy() method.

public class MainActivity extends Activity implements KeyboardWatcher.OnKeyboardToggleListener {
    private KeyboardWatcher keyboardWatcher;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //...
        keyboardWatcher = new KeyboardWatcher(this);
        keyboardWatcher.setListener(this);
    }

    @Override
    protected void onDestroy() {
        keyboardWatcher.destroy();
        super.onDestroy();
    }

    @Override
    public void onKeyboardShown(int keyboardSize) {
        
    }

    @Override
    public void onKeyboardClosed() {
        
    }
}

Download

Java code

If you don't want to add another dependency to your project, just copy KeyboardWatcher.java to your source directory.

Library dependency

dependencies {
  compile 'com.azimolabs.keyboardwatcher:keyboardwatcher:0.1.3'
}

License

Copyright (C) 2016 Azimo

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Towards financial services available to all

We’re working throughout the company to create faster, cheaper, and more available financial services all over the world, and here are some of the techniques that we’re utilizing. There’s still a long way ahead of us, and if you’d like to be part of that journey, check out our careers page.

More Repositories

1

ConditionWatcher

Android tool which helps to synchronise application behaviours with test thread in automation tests.
Java
218
star
2

MaskFormatter

Add text masking functionality to Android EditText. It will prevent user from inserting not allowed signs, and format input as well.
Java
160
star
3

Review-Reporter

Bot for reporting Google Play Reviews on Slack with possibility to fast reply and creating Jira issues from low rating reviews.
Java
135
star
4

fastlane-plugin-automated-test-emulator-run

Plugin dedicated for Android platform. Wraps gradle task/shell command used for launching instrumented tests. Provides start of as many AVDs with various configs as needed before test run, waits for boot, kills emulators and deletes them from hdd after tests are finished or disturbed.
Ruby
112
star
5

apple-sign-in-php-sdk

PHP library to verify and validate Apple IdentityToken and authenticate a user with Apple ID.
PHP
87
star
6

Language-Switcher-Tile

An android plugin that allows you to easily change your device language.
Java
78
star
7

Api-Error-Handler

Declare expected errors of your API and generate implementing code automatically.
Java
67
star
8

AutomationTestSupervisor

Python tool for launching and managing Android Virtual Devices and Android Automation Tests. It provides elastic configurations, test and launch profiles, test video recording, html log generation and more.
Python
42
star
9

SMFloatingLabelTextField

A subclass of UITextField that displays floating placeholder
Swift
37
star
10

RxTesting

Application with examples of test cases for Android Rx code.
Java
31
star
11

WebViewTester

Android tool to automate interaction with web pages displayed in Android WebViews. Could be especially helpful in testing UI with Espresso.
Java
28
star
12

scala-updatable-config

Library based on pure-config for getting updates from Consul or Vault backend.
Scala
24
star
13

kafka-to-avro-writer

Kafka to Avro Writer based on Apache Beam. It's a generic solution that reads data from multiple kafka topics and stores it on in cloud storage in Avro format.
Java
24
star
14

AzimoTestKit

Supporting framework for writing unit tests in Swift
Swift
16
star
15

CustomScrollActions

Sample project presenting how to deal with NestedScrollView in UiAutomation tests done with Espresso framework.
Java
16
star
16

SMSecureTaskSwitcher

Use custom view for application preview in iOS Task Switcher
Objective-C
13
star
17

SimpleBDD

Simple library for tests in BDD style, written with Objective-C.
Objective-C
10
star
18

AzimoNote

Very simple small app that allows you to register users and store message notes bound to their profiles. Created in order to show how to setup AutomationTestSupervisor with real Android project.
Java
6
star
19

braze-templates-cli

Simple CLI tool written in Deno for creating a back-up of Braze templates and content blocks.
TypeScript
5
star
20

service-homescreen-aggregator

Based on our homescreen aggregator project we are showing examples for various implementation mechanisms like DynamoDB polymorphic model or rules engine etc.
Java
3
star
21

MobileInternshipTask

Programming task for mobile internship candidates
3
star
22

AppStoreConnectAPIClient

Swift
3
star
23

DecisionEngine

Example project showing basics behind our Decision Engine, built on top of Shapeless and Scala.
Scala
2
star
24

avro-rewriter

Reads, transforms and writes avro files written on Google Cloud Storage with use of Generic Avro Records.
Java
2
star
25

paloalto-gsuite

GlobalProtect authentication using SAML from G Suite
Shell
2
star
26

extend-camunda-dmn-juel-with-java-functions

This example contains ready to run Spring Boot application with Camunda where JUEL expression language is extended.
Java
1
star
27

daggerextensions

Java
1
star