Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/bradmartin/flexing
Browse files Browse the repository at this point in the history
  • Loading branch information
bradmartin committed Sep 1, 2018
2 parents 84a1344 + 4ef1c62 commit 1e2720d
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,9 @@ fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
fastlane/readme.md


# general
**/.settings/
**/.classpath
75 changes: 75 additions & 0 deletions README.md
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 |
11 changes: 11 additions & 0 deletions flexing/src/main/java/net/bradmartin/flexing/keyboard.kt
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)
}
}

0 comments on commit 1e2720d

Please sign in to comment.