-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/bradmartin/flexing
- Loading branch information
Showing
3 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<p align="center"> | ||
<h1 align="center">Flexing :muscle: for Android</h1> | ||
<h3 align="center"> | ||
<a href="https://bradmartin.net" target="_blank">by Brad Martin</a> | ||
</h3> | ||
</p> | ||
|
||
<p align="center"> | ||
<a href="https://github.com/bradmartin/flexing/blob/master/src/LICENSE.md"> | ||
<img src="https://img.shields.io/github/license/bradmartin/flexing.svg" alt="license" /> | ||
</a> | ||
<a href="https://jitpack.io/#bradmartin/flexing"> | ||
<img src="https://jitpack.io/v/bradmartin/flexing.svg" alt="JitPack" /> | ||
</a> | ||
<a href="https://twitter.com/bradwaynemartin"> | ||
<img src="https://img.shields.io/twitter/follow/bradwaynemartin.svg?style=social&label=Follow%20me" alt="Twitter" /> | ||
</a> | ||
<a href="https://paypal.me/bradwayne88"> | ||
<img src="https://img.shields.io/badge/Donate-PayPal-green.svg" alt="donate"> | ||
</a> | ||
</p> | ||
|
||
## Install | ||
|
||
### Gradle: | ||
|
||
- Add it in your root build.gradle at the end of repositories: | ||
|
||
```groovy | ||
allprojects { | ||
repositories { | ||
... | ||
maven { url 'https://jitpack.io' } | ||
} | ||
} | ||
``` | ||
|
||
- Add the dependency: | ||
|
||
```groovy | ||
dependencies { | ||
implementation 'com.github.bradmartin:flexing:0.1.30' | ||
} | ||
``` | ||
|
||
### Maven | ||
|
||
- Add the JitPack repository to your build file: | ||
|
||
```xml | ||
<repositories> | ||
<repository> | ||
<id>jitpack.io</id> | ||
<url>https://jitpack.io</url> | ||
</repository> | ||
</repositories> | ||
``` | ||
|
||
- Add the dependency: | ||
|
||
```xml | ||
<dependency> | ||
<groupId>com.github.bradmartin</groupId> | ||
<artifactId>flexing</artifactId> | ||
<version>0.1.30</version> | ||
</dependency> | ||
``` | ||
|
||
### API | ||
|
||
### ImagesKt Static Methods | ||
|
||
| Method | Description | | ||
| -------------------------------------------------- | ---------------------------------- | | ||
| _getBitmapFromImageView(ImageView: image)_: Bitmap | Returns a Bitmap from an ImageView | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package net.bradmartin.flexing | ||
|
||
import android.app.Activity | ||
import android.view.inputmethod.InputMethodManager | ||
|
||
fun hideSoftKeyboard(activity: Activity) { | ||
if (activity.currentFocus != null) { | ||
val inputMethodManager = activity.getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager | ||
inputMethodManager.hideSoftInputFromWindow(activity.currentFocus.windowToken, 0) | ||
} | ||
} |