OfficialFoldingTabBar.Android


Source link: https://github.com/Yalantis/OfficialFoldingTabBar.Android

OfficialFoldingTabBar.Android

Folding Tab Bar and Tab Bar Menu

Inspired by our project on Dribbble

Read how we did it on our blog

##Requirements

  • Android SDK 19+

##Usage

Add to your root build.gradle:

allprojects {
  repositories {
  ...  maven {
 url "https://jitpack.io" 
}
  
}
 
}

Add the dependency:

dependencies {
  compile 'com.github.Yalantis:OfficialFoldingTabBar.Android:v0.9' 
}

How to use this library

  • Create menu.xml for your menu
<?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android">
  <item

android:id="@+id/ftb_menu_nearby"

android:icon="@drawable/ic_nearby_icon"

android:title="Nearby"/>

<item

android:id="@+id/ftb_menu_new_chat"

android:icon="@drawable/ic_new_chat_icon"

android:title="Chat"/>

<item

android:id="@+id/ftb_menu_profile"

android:icon="@drawable/ic_profile_icon"

android:title="Profile"/>

<item

android:id="@+id/ftb_menu_settings"

android:icon="@drawable/ic_settings_icon"

android:title="Settings"/>  </menu>
  • Add FoldingTabBar into your layout
<RelativeLayout
  android:id="@+id/activity_main"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="@color/colorAccent"
  tools:context="client.yalantis.com.foldingtabbarandroid.MainActivity">

...

<client.yalantis.com.foldingtabbar.FoldingTabBar

android:id="@+id/folding_tab_bar"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_alignParentBottom="true"

android:layout_centerInParent="true"

android:layout_marginBottom="@dimen/activity_horizontal_margin"

app:menu="@menu/menu_tab_bar"/>

...

</RelativeLayout>
  • Initialize it in your java/kotlin code
FoldingTabBar tabBar = (FoldingTabBar) findViewById(R.id.folding_tab_bar);

Features

  • We have useful callbacks for you - Handle menu items clicks:
 tabBar.setOnFoldingItemClickListener(new FoldingTabBar.OnFoldingItemSelectedListener() {

 @Override

 public boolean onFoldingItemSelected(@NotNull MenuItem item) {

  return false;

 
}

}
);

and one more to handle main button clicks:

  tabBar.setOnMainButtonClickListener(new FoldingTabBar.OnMainButtonClickedListener() {

@Override

public void onMainButtonClicked() {

 
}

  
}
);
  • Attributes for customizing FoldingTabBar:

Name | Description | --- | --- | --- app:itemPadding | sets padding for your menu items. Default item padding is 17dp. app:mainImage | here you can link your image resource for the main image. app:selectionColor | our menu supports color selection. You can change the menu’s color here.

Let us know!

We’d be really happy if you sent us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding the animation.

P.S. We’re going to publish more awesomeness wrapped in code and a tutorial on how to make UI for iOS (Android) better than better. Stay tuned!

##License

The MIT License (MIT)  Copyright © 2016 Yalantis  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 

Resources

AndroidPullMenu is an Open Source Android library that allows developers to easily create applications with pull menu. The aim of this library is to allow users that with a simple pull gesture to choose actions that they want to be executed.

This actions stand for refreshing options like refreshing the latest news, most viewed news, most commented views etc. or adding more actions inside view when you don’t want to implement these actions inside sliding menu. It can be implemented inside ScrollView, GridView, ListView.

Sometimes we need to show a top view above a ViewPager or ListView. DragTopLayout is a ViewGroup that contains a content view and a top menu view. You can show the top menu view just drag down the content view at the right time, or drag it up to fold.

BARACUS is the BAReknuckle Android Context USher, a tiny framework for android development enabling you to have dependency injection, dynamic context handling and database object relational mapping.

Features:

  • Dynamic context creation and destruction
  • Type based dependency injection plus documentation annotation
  • Object relational mapper
  • Dao-Approach for mapping and lazy loading / lazy references
  • Modification awareness for components - listen for data changes
  • Automatic database version and migration management
  • Hot-Backup of Sqlite
  • Declarative form validation and automatic error routing

JavaPoet is a Java API for generating .java source files.

Source file generation can useful when doing things such as annotation processing or interacting with metadata files (e.g., database schemas, protocol formats). By generating code, you eliminate the need to write boilerplate while also keeping a single source of truth for the metadata.

json2view is a simple library that can convert a compatible JSON file to an Android view so you can load dynamically the view in your Android app without the need to update the APK.

This removes the hassle of updating, re-compiling and uploading the APK to Google Play every time you want to make small or big changes in the UI.

Android-CircleMenu is a pretty circular menu. The library allows to rotate the menu with your fingers.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes