All Projects → webianks → Popupbubble

webianks / Popupbubble

Licence: apache-2.0
🅿️ Easily add and customise "New Post" popup button with the feeds (RecyclerView) of your app.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Popupbubble

Recycler Fast Scroll
Provides fast scroll and section idexer for recycler view
Stars: ✭ 445 (+15.58%)
Mutual labels:  recyclerview, bubble
Y divideritemdecoration
A common RecyclerView divider , supports the LinearLayoutManager and the GridLayoutManager.
Stars: ✭ 373 (-3.12%)
Mutual labels:  recyclerview
Stacklayoutmanager
customized layoutmanager,let item pile up like stackview/类似最美有物卡片堆叠效果
Stars: ✭ 343 (-10.91%)
Mutual labels:  recyclerview
Multichoicerecyclerview
Multi choice selection applied on recycler view make life easier
Stars: ✭ 361 (-6.23%)
Mutual labels:  recyclerview
Recyclerlistview
High performance listview for React Native and web!
Stars: ✭ 4,033 (+947.53%)
Mutual labels:  recyclerview
Android Extensions
An Android library with modules to quickly bootstrap an Android application.
Stars: ✭ 356 (-7.53%)
Mutual labels:  recyclerview
Recycler View Divider
A library which configures a divider for a RecyclerView.
Stars: ✭ 338 (-12.21%)
Mutual labels:  recyclerview
Multiitem
一个优雅的实现多类型的RecyclerView类库 支持DataBinding Form表单录入 跨多个RecyclerView拖动
Stars: ✭ 381 (-1.04%)
Mutual labels:  recyclerview
Klaster
Declare RecyclerView adapters in a functional way, without boilerplate and subclassing. No compromises on flexibility. If it's possible to do something by subclassing, it's possible to do it with this library.
Stars: ✭ 373 (-3.12%)
Mutual labels:  recyclerview
Corbind
Kotlin Coroutines binding APIs for Android UI widgets from the platform and support libraries
Stars: ✭ 357 (-7.27%)
Mutual labels:  recyclerview
Androidproject
Android 技术中台,但愿人长久,搬砖不再有
Stars: ✭ 4,398 (+1042.34%)
Mutual labels:  recyclerview
Recyclerstickyheaderview
Sticky header view or suspending view for RecyclerView.
Stars: ✭ 347 (-9.87%)
Mutual labels:  recyclerview
Dragselectrecyclerview
TouchListener that can be attached to any RecyclerView and handles multi selection for you
Stars: ✭ 371 (-3.64%)
Mutual labels:  recyclerview
Giraffeplayer2
out of the box android video player(support lazy load, ListView/RecyclerView and hight performance)
Stars: ✭ 344 (-10.65%)
Mutual labels:  recyclerview
Stackcardlayoutmanager
Stars: ✭ 376 (-2.34%)
Mutual labels:  recyclerview
Timeline View
Android Timeline View is used to display views like Tracking of shipment/order, steppers etc.
Stars: ✭ 3,553 (+822.86%)
Mutual labels:  recyclerview
Recyclerviewitemdecorations
ItemDecoration for Android Recyclerview
Stars: ✭ 351 (-8.83%)
Mutual labels:  recyclerview
Imageviewer
🔮图片浏览器,支持图片手势缩放、拖拽等操作,`自定义View`的模式显示,自定义图片加载方式,更加灵活,易于扩展,同时也适用于RecyclerView、ListView的横向和纵向列表模式,最低支持版本为Android 3.0及以上...
Stars: ✭ 363 (-5.71%)
Mutual labels:  recyclerview
Delegationadapter
一种优雅的方式来使用RecyclerView
Stars: ✭ 382 (-0.78%)
Mutual labels:  recyclerview
Adapter
A quick adapter library for RecyclerView, GridView, ListView, ViewPager, Spinner
Stars: ✭ 376 (-2.34%)
Mutual labels:  recyclerview

Android Arsenal Open Source Love License

PopupBubble

Easily Add "New Post" popup button with the feeds (recyclerview) of your app.

Min SDK

Minimum sdk is 14 and support is limited to recyclerview for now.

Add With Gradle Dependency

compile 'com.webianks.library:popup-bubble:1.0.5'

Maven:

<dependency>
  <groupId>com.webianks.library</groupId>
  <artifactId>popup-bubble</artifactId>
  <version>1.0.5</version>
  <type>pom</type>
</dependency>

Add PopupBubble to layout

<com.webianks.library.PopupBubble
  android:id="@+id/popup_bubble"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
/>

Positioning of this view can be done according to the need. By default it should be placed in top center. Also it should be placed below recyclerview in layout so that it shows on top of recyclerview.

Example positioning

If its inside RelativeLayout then

<com.webianks.library.PopupBubble
  android:layout_margin="16dp"
  android:id="@+id/popup_bubble"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_centerHorizontal="true"
/>

Customization Through XML

<!--Change background Color-->
    app:pb_backgroundColor="?attr/colorPrimary"
<!--Change text -->
    app:pb_text="New Stories"
<!--Change text color-->
    app:pb_textColor="#ffffff"
<!--Show/Hide Icon inside the button. By default its true.-->
    app:pb_showIcon="false"
<!--Change icon color-->
    app:pb_iconColor="#ffffff"
<!--Set Different Icons-->
    app:pb_icon="@drawable/ic_new.png"
<!--Set different fonts-->
    app:pb_font="iran_sans_mobile.ttf"
        

Example : Full Customization

<com.webianks.library.PopupBubble
  xmlns:app="http://schemas.android.com/apk/res-auto"
  android:layout_margin="16dp"
  android:id="@+id/popup_bubble"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_centerHorizontal="true"
  app:pb_backgroundColor="?attr/colorPrimary"
  app:pb_iconColor="#ffffff"
  app:pb_text="New Stories"
  app:pb_textColor="#ffffff"
  app:pb_icon="@drawable/ic_keyboard_arrow_up_white_18dp"
  app:pb_font="iran_sans_mobile.ttf"
/>

#Access the bubble from Java

PopupBubble popupBubble = (PopupBubble) findViewById(R.id.popup_bubble);

Add listener if you want to know when the bubble is clicked

popupBubble.setPopupBubbleListener(new PopupBubble.PopupBubbleClickListener() {
            @Override
            public void bubbleClicked(Context context) {
  
                //popup_bubble is clicked  
            }
        });

Attach with your RecyclerView

 //necessary to add
popupBubble.setRecyclerView(recyclerView);

#Helper Methods Hide/Show PopupBubble according to your need

popupBubble.hide();
popupBubble.show();

Control Animations Set false if you dont want any animations. Default value is true.

popupBubble.withAnimation(false);

Update text dynamically Call this method before the activate method to set the new text.

popupBubble.updateText("10 new stories");

Update icon dynamically Call this method before the activate method to set the new Icon.

popupBubble.updateIcon(R.drawable.new_icon);

Update typeface of text dynamically Call this method before the activate method to set the new Typeface.

popupBubble.updateTypeFace(myCustomTypeface);

Most Important

Now download/fetch new content in background and then notify your recyclerview adapter about range of items added and finally activate the PopupBubble to make it appear with animation (if not set false).

//Own logic for fetching new content
 .....      
adapter.notifyItemRangeInserted(0,size_of_new_items_added); // size_of_new_items_added = 10 if 10 new items are added.
popupBubble.activate(); 
    

License

PopupBubble library for Android
Copyright (c) 2016 Ramankit Singh (http://github.com/webianks).

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].