项目作者: aromajoin

项目描述 :
iPad-style ActionSheet for Android
高级语言: Java
项目地址: git://github.com/aromajoin/actionsheet-android.git
创建时间: 2017-03-30T08:20:50Z
项目社区:https://github.com/aromajoin/actionsheet-android

开源协议:Other

下载


ActionSheet for Android

Download
License
Android Arsenal
TravisCI

A small library which creates iPad-style ActionSheet for Android apps

Screenshots

Table of Contents

  1. Download
  2. Usage

Download

The Gradle dependency is available via jCenter.

  1. compile 'com.aromajoin.library:actionsheet:0.0.2'

Usage

  1. // Sets it up
  2. ActionSheet actionSheet = new ActionSheet(context);
  3. actionSheet.setTitle(title);
  4. actionSheet.setSourceView(anchorView);
  5. // Adds as many actions as you need...
  6. actionSheet.addAction(actionTitle, actionStyle, actionListener);
  7. // Shows it. Done.
  8. actionSheet.show();

If you don’t like default theme, add these following to your styles.xml, under your app’s theme.

  1. <style name="YourAppTheme">
  2. <!-- Other properties .... -->
  3. <!-- Customize ActionSheet style -->
  4. <item name="asWidth">xdp</item>
  5. <item name="asTitleColor">color</item>
  6. <item name="asDefaultColor">color</item>
  7. <item name="asDestructiveColor">color</item>
  8. <item name="asTitleTextSize">xsp</item>
  9. <item name="asActionTextSize">xsp</item>
  10. </style>

Please check out sample project if you need more details.


License

The Apache License (Apache)

  1. Copyright (c) 2017 Aromajoin Corporation
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  7. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  8. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  9. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  10. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  11. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  12. SOFTWARE.