ShabanKamell / Apphead
Licence: apache-2.0
Head View like Facebook Messenger for Android.
Stars: ✭ 61
Projects that are alternatives of or similar to Apphead
Raisetheempires
Raise the Empires project: facebook 2011-2013 Empires & Allies preservation
Stars: ✭ 58 (-4.92%)
Mutual labels: facebook
Canvas
Base for Blogger, seo, twitter card, open graph, optimization and performance
Stars: ✭ 51 (-16.39%)
Mutual labels: facebook
Facebook Bam Quiz Instant Game
FaceBook Instant Game - BAM Quiz
Stars: ✭ 55 (-9.84%)
Mutual labels: facebook
Messenger Bot
A Node client for the Facebook Messenger Platform
Stars: ✭ 1,081 (+1672.13%)
Mutual labels: facebook
Gomponents
Declarative view components in Go, that can render to HTML5.
Stars: ✭ 49 (-19.67%)
Mutual labels: view
Imageviewer.swift
An easy to use Image Viewer that is inspired by Facebook
Stars: ✭ 1,071 (+1655.74%)
Mutual labels: facebook
Toothyprogress
A polyline determinated ProgressBar written in Kotlin
Stars: ✭ 56 (-8.2%)
Mutual labels: view
Tap water
【声明:未发布前,勿使用,勿star,预计2020年11月底发布】Flutter tab_bar组件,支持中间带加号按钮的TabBar,支持Lottie动画。iTeaTime(技术清谈)团队出品。Highly customizable tabBar and tabBarController for Flutter
Stars: ✭ 52 (-14.75%)
Mutual labels: view
Awesome Java Leetcode
👑 LeetCode of algorithms with java solution(updating).
Stars: ✭ 8,297 (+13501.64%)
Mutual labels: facebook
Facebooklikereaction
FacebookLikeReaction is a customizable view which provides more options to share your reactions on any post like Facebook Reactions.
Stars: ✭ 50 (-18.03%)
Mutual labels: facebook
Sign Up For Facebook
A summary of what data Facebook collects and how it can be used
Stars: ✭ 53 (-13.11%)
Mutual labels: facebook
Godot Facebook
Facebook module for Godot Game Engine (android and iOS)
Stars: ✭ 55 (-9.84%)
Mutual labels: facebook
Fiftyshadesof
An elegant context-care loading placeholder for Android
Stars: ✭ 1,110 (+1719.67%)
Mutual labels: view
Hackphiles
BruteForce Tool For both Instagram and Facebook
Stars: ✭ 57 (-6.56%)
Mutual labels: facebook
AppHead
Head View like Facebook Messenger for Android.
Gradle:
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
dependencies {
implementation 'com.github.ShabanKamell:AppHead:x.y.z'
}
(Please replace x, y and z with the latest version numbers: )
Usage
The most simple usage
AppHead.create(R.drawable.ic_messenger) {
headView { onClick {..} }
}.show(activity)
Or using builders (proper for Java)
builder = Head.Builder(R.drawable.icon).headView(HeadView.Args().onClick {..})
AppHead(builder).show(activity)
All available options
AppHead.create(R.drawable.ic_messenger_red) {
headView {
layoutRes(R.layout.app_head_red, R.id.headImageView)
onClick {..}
onLongClick {..}
alpha(0.9f)
allowBounce(false)
onFinishInflate {..}
setupImage {..}
onDismiss {..}
dismissOnClick(false)
preserveScreenLocation(false)
}
badgeView {
count("100")
position(BadgeView.Position.TOP_END)
}
dismissView {
alpha(0.5f)
scaleRatio(1.0)
drawableRes(R.drawable.ic_dismiss)
onFinishInflate {..}
setupImage {..}
}
}.show(this)
Or using builders (proper for Java)
// build HeadView
val headViewArgs = HeadView.Args()
.layoutRes(R.layout.app_head_red, R.id.headImageView)
.onClick {..}
.onLongClick {..}
.alpha(0.8f)
.allowBounce(false)
.onFinishInflate {..}
.setupImage {..}
.onDismiss {..}
.dismissOnClick(false)
.preserveScreenLocation(false)
// build DismissView
val dismissViewArgs = DismissView.Args()
.alpha(0.5f)
.scaleRatio(1.0)
.drawableRes(R.drawable.ic_dismiss)
.onFinishInflate {..}
.setupImage {..}
// build BadgeView
val badgeViewArgs = BadgeView.Args()
.layoutRes(R.layout.badge_view, R.id.tvCount)
.position(BadgeView.Position.TOP_END)
.count("3333")
val builder = Head.Builder(R.drawable.ic_messenger_red)
.headView(headViewArgs)
.dismissView(dismissViewArgs)
.badgeView(badgeViewArgs)
AppHead(builder).show(activity)
Components
AppHead has 3 main components
- [ ] HeadView: the draggable & dismissable view.
- [ ] DimissView: the view at the bottom that acts as bounds within which the HeadView can be dimissed.
- [ ] BadgeView(optinal): displays the number of notifications.
Customize Components Layouts
In addition to configuring all options of the components, you also can define full custom components layouts.
To customize HeadView
, DimissView
or BadgeView
you must define the rootview as HeadView
, DimissView
or BadgeView
<com.sha.apphead.HeadView
..>
<ImageView
android:id="@+id/headImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_messenger"
android:layout_margin="4dp"
/>
</com.sha.apphead.HeadView>
<com.sha.apphead.DismissView
..>
<ImageView
android:id="@+id/dimissImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_dimiss"
android:layout_margin="4dp"
/>
</com.sha.apphead.DismissView>
<com.sha.apphead.BadgeView
..>
<TextView
android:id="@+id/tvCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
/>
</com.sha.apphead.BadgeView>
Options & Default Values
Headview.Args
Option | Type | Default |
---|---|---|
layoutRes | Layout Res | R.layout.app_head |
imageViewId | ID Res | R.layout.ivHead |
drawableRes | Drawable Res | 0(REQUIRED |
alpha | Float | 1f |
allowBounce | Boolean | true |
preserveScreenLocation | Boolean | true |
dismissOnClick | Boolean | true |
setupImage | ((ImageView) -> Unit)? | null |
onFinishInflate | ((HeadView) -> Unit)? | null |
onClick | ((HeadView) -> Unit)? | null |
onLongClick | ((HeadView) -> Unit)? | null |
onDismiss | ((HeadView) -> Unit)? | null |
DismissView.Args
Option | Type | Default |
---|---|---|
layoutRes | Layout Res | R.layout.dismiss_view |
imageViewId | ID Res | R.layout.ivDismiss |
drawableRes | Drawable Res | R.drawable.ic_dismiss_apphead |
scaleRatio | Double | 1.5 |
alpha | Float | 1f |
setupImage | ((ImageView) -> Unit)? | null |
onFinishInflate | ((DismissView) -> Unit)? | null |
BadgeView.Args
Option | Type | Default |
---|---|---|
layoutRes | Layout Res | R.layout.badge_view |
count | String | "" |
countTextViewId | ID Res | R.id.tvCount |
position | BadgeView.Position | BadgeView.Position.TOP_END |
Look at 'sample' module for the full code. For more advanced example.
Credit
henrychuangtw/Android-ChatHead
🛡 License
click to reveal License
Licensed 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.0
Unless required by applicable law or agreed to in writing, software
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.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].