diff --git a/README.md b/README.md index f40bf29..4f663b0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,38 @@ NewQuickAction ============== -NewQuickAction is a small android library to create QuickAction dialog. +NewQuickAction is a small android library to create QuickAction dialogs. + +Installation +=============== + +### Android Studio + + 1. Paste or clone this library into the `/libs` folder, in the root directory of your project. Create a new folder: `/libs` if not already present. (This step is not required - only for keeping cleaner project structure) + + 2. Edit `settings.gradle` by adding the library. You have also define a project directory for the library. Your `settings.gradle` should look like below: + ``` + include ':app', ':NewQuickAction' + project(':NewQuickAction').projectDir = new File('libs/NewQuickAction') + ``` + 3. In `app/build.gradle` add the NewQuickAction library as a dependency: + ``` + dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + compile 'com.android.support:appcompat-v7:21.0.3' + compile project(":NewQuickAction") + } + ``` + + 4. Sync project, clean and build. You can use the NewQuickAction as part of your project now. + +### Eclipse + + 1. Before you can add a NewQuickAction to your application, you must first add a library reference: + 2. Clone or download a copy of the library + 3. Import the library into Eclipse: File menu -> Import -> Existing Project into Workspace + 4. Open your application's project properties and add a library reference to `NewQuickAction` + How to Use ========== @@ -105,4 +136,4 @@ License 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. \ No newline at end of file + limitations under the License. diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..fbffe8f --- /dev/null +++ b/build.gradle @@ -0,0 +1,19 @@ +apply plugin: 'com.android.library' + +android { + compileSdkVersion 21 + buildToolsVersion "21.1.2" + + defaultConfig { + minSdkVersion 1 + targetSdkVersion 21 + } + + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['src'] + res.srcDirs = ['res'] + } + } +} \ No newline at end of file