ColorFullTabLayout


Source link: https://github.com/MdFarhanRaja/ColorFullTabLayout

Step 1. Add the JitPack repository to your build file

allprojects {
  repositories {

...
maven {
 url 'https://jitpack.io' 
}
  
}
 
}
 

Step 2. Add the dependency

dependencies {

compile 'com.github.MdFarhanRaja:ColorFullTabLayout:1.0'
or
compile 'com.github.MdFarhanRaja:ColorFullTabLayout:1.1' // added  app:atb_fontPath="shadow_light.ttf" 
}
 

Step 3. Place Inside Your Layout

<in.galaxyofandroid.awesometablayout.AwesomeTabBar
  android:id="@+id/tabBar"
  app:atb_indicatorHeight="2dp"
  app:atb_indicatorColor="#bebebe"
  app:atb_imageHeight="30dp"
  app:atb_imageWidth="30dp"  app:atb_fontPath="shadow_light.ttf"  Availabe in version 1.1
  android:layout_width="match_parent"
  android:layout_height="wrap_content"> </in.galaxyofandroid.awesometablayout.AwesomeTabBar>  <android.support.v4.view.ViewPager
  android:id="@+id/pager"
  android:layout_width="match_parent"
  android:layout_height="match_parent"> </android.support.v4.view.ViewPager> 

Step 4. Inside Java

 AwesomeTabBar tabBar=(AwesomeTabBar)findViewById(R.id.tabBar);
  ViewPager pager=(ViewPager)findViewById(R.id.pager);
  pager.setAdapter(new PagerAdapter(getSupportFragmentManager()));
  tabBar.setupWithViewPager(pager);
 

Step 5. Viewpager Adapter Class

 public class PagerAdapter extends AwesomeTabBarAdapter  {
  ArrayList<Fragment> fragments=new ArrayList<>();
  ArrayList<String> titles=new ArrayList<>();
  int[] colors={
R.color.color1,R.color.color2,R.color.color3,R.color.color4,R.color.color5,R.color.color6
}
;  int[] textColors={
R.color.colorWhite
}
;  int[] icons={
R.drawable.ic_blod,R.drawable.ic_blod_uria,R.drawable.ic_ayurveda,R.drawable.ic_complete_blod,R.drawable.ic_body_message,R.drawable.ic_cardiologist
}
;
public PagerAdapter(FragmentManager fragmentManager)  {

  super(fragmentManager);

  fragments.add(new TestFragment());

  fragments.add(new TestFragment());

  fragments.add(new TestFragment());

  fragments.add(new TestFragment());

  fragments.add(new TestFragment());

  fragments.add(new TestFragment());

titles.add("Title 1");

  titles.add("Title 2");

  titles.add("Title 3");

  titles.add("Title 4");

  titles.add("Title 5");

  titles.add("Title 6");

}

@Override  public int getCount() {

  return fragments.size();
  
}

@Override  public Fragment getItem(int position) {

  return fragments.get(position);
  
}

@Override  public CharSequence getPageTitle(int position) {

  return titles.get(position);
  
}

@Override  public int getColorResource(int position) {

  return colors[position];  
}

@Override  public int getTextColorResource(int position) {

  return textColors[0];  
}

@Override  public int getIconResource(int position) {

  return icons[position];  
}
  
}
 

Some More Attributes of AwesomeTabBar

<attr name="atb_padding" format="dimension" />
  <attr name="atb_margin" format="dimension" />
  <attr name="atb_tabWidth" format="dimension" />
  <attr name="atb_tabHeight" format="dimension" />
  <attr name="atb_indicatorColor" format="color" />
  <attr name="atb_indicatorHeight" format="dimension" />
  <attr name="atb_selectedTabBackgroundColor" format="color" />
  <attr name="atb_selectedTabTextColor" format="color" />
  <attr name="atb_selectedTabImageColor" format="color" />
  <attr name="atb_indicatorLineColor" format="color" />
  <attr name="atb_noImage" format="boolean" />
  <attr name="atb_noText" format="boolean" />

 <attr name="atb_imagePosition" format="enum"/> // top,bottom,left or right

<attr name="atb_imageMargin" format="dimension" />
  <attr name="atb_imageWidth" format="dimension" />
  <attr name="atb_imageHeight" format="dimension" />
  <attr name="atb_textMargin" format="dimension" />
  <attr name="atb_textSize" format="dimension" /> 

Resources

ChipView helps you in creating attractive [Chips] for your application. ChipView provides you a flexible way of creating and organizing your chip by following ways:

  • Adding a background or text color to your chip
  • Creating custom layout for your chip
  • Can even create multi color chips

Simple View Behavior for Android CoordinatorLayout.

Simple library for fast right-left list item swiping.

A simple way to convert any model to multipart.

Get a birthday calendar for all your social networks right inside Google Calendar. Supports Facebook, LinkedIn, Xing, Skype, DavDroid and all other apps which sync contacts with your Android device. Enable reminder alarms and decide which contacts you want to see. You'll get notifications for all of them.

This is an implementation of web feedback animation UI.

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