Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

👏 The Medium's Clapping Effect developed in Android

License

NotificationsYou must be signed in to change notification settings

wajahatkarim3/MediumClap-Android

Repository files navigation

Build statusAndroid ArsenalSay Thanks!Twitter

Built with ❤︎ byWajahat Karim and contributors

A Custom Floating Action Button (FAB) library like clapping effect on Medium

📄 How-To Article

✔️ Changelog

Changes exist in thereleases tab.

💻 Installation

Add this in your app's build.gradle file:

dependencies {  implementation'com.wajahatkarim:clapfab:2.0.0'}

Or add ClapFab as a new dependency inside your pom.xml

<dependency>  <groupId>com.wajahatkarim3</groupId>  <artifactId>clapfab</artifactId>  <version>2.0.0</version>  <type>pom</type></dependency>

❔ Usage

<com.wajahatkarim3.clapfab.ClapFABandroid:id="@+id/clapFAB"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginBottom="8dp"android:layout_marginTop="8dp"app:cf_count_circle_color="@color/colorAccent"app:cf_count_text_color="@color/white_color"app:cf_default_icon="@drawable/ic_star_border_black_24dp"app:cf_default_icon_color="@color/colorAccent"app:cf_dots_1_color="@android:color/holo_green_dark"app:cf_dots_2_color="@color/colorAccent"app:cf_filled_icon="@drawable/ic_star_black_24dp"app:cf_filled_icon_color="@color/colorAccent"app:cf_max_clap_count="20"app:cf_clap_count="10"app:cf_format_clap_count="true"app:cf_long_press_enabled="false"app:cf_long_press_clap_interval="300"/>

🎨 Customization and Attributes

All customizable attributes for ClapFab

Attribute NameDefault ValueDescription
app:cf_default_icon@drawable/ic_clap_hands_outlineThe default icon of the ClapFab button
app:cf_filled_icon@drawable/ic_clap_hands_filledThe filled icon after clapping of the ClapFab button
app:cf_default_icon_color@color/colorClapIconThe color of default icon of the ClapFab button
app:cf_filled_icon_color@color/colorClapIconThe filled color of icon after clapping of the ClapFab button
app:cf_max_clap_count50The maximum count of clapping of the ClapFab button
app:cf_count_circle_color@color/colorClapIconThe color of count's circle background
app:cf_count_text_color@android:color/whiteThe color of count's circle text
app:cf_dots_1_color@color/dotsColor1The color of particle's dots 1
app:cf_dots_2_color@color/dotsColor2The color of particle's dots 2
app:cf_clap_count0The default clap count
app:cf_format_clap_counttrueTrue, if the formatter for clap count is enabled. Formatter will convert 1000 to 1.0K etc.
app:cf_long_press_enabledtrueThe flag to turn on/off the long press auto-clap ability. Default is true.
app:cf_long_press_clap_interval300The interval to automatically clap on long press in milliseconds. Default is 300ms

Clap Listener

ClapFABclapFAB = (ClapFAB)findViewById(R.id.clapFAB);clapFAB.setClapListener(newClapFAB.OnClapListener() {@OverridepublicvoidonFabClapped(@NotNullClapFABclapFab,intcount,booleanisMaxReached) {// count is the current count of the clapping// isMaxReached is true when button has already reached the maximum count// and is not being clapped anymore. Otherwise its false            }        });

📃 Libraries Used

💥 Achievements

💰 Donations

This project needs you! If you would like to support this project's further development, the creator of this project or the continuous maintenance of this project, feel free to donate. Your donation is highly appreciated (and I love food, coffee and beer). Thank you!

PayPal

  • Donate $5: Thank's for creating this project, here's a tea (or some juice) for you!
  • Donate $10: Wow, I am stunned. Let me take you to the movies!
  • Donate $15: I really appreciate your work, let's grab some lunch!
  • Donate $25: That's some awesome stuff you did right there, dinner is on me!
  • Donate $50: I really really want to support this project, great job!
  • Donate $100: You are the man! This project saved me hours (if not days) of struggle and hard work, simply awesome!
  • Donate $2799: Go buddy, buy Macbook Pro for yourself!

Of course, you can also choose what you want to donate, all donations are awesome!

👨 Developed By

Wajahat Karim

👍 How to Contribute

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

📃 License

Copyright 2022 Wajahat KarimLicensed 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.0Unless required by applicable law or agreed to in writing, softwaredistributed 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 andlimitations under the License.

About

👏 The Medium's Clapping Effect developed in Android

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp