MosaicCalendarView


Source link: https://github.com/tiagohm/MosaicCalendarView

MosaicCalendarView

Usufrua de um calendário que se parece com o Visualizador de Contribuições do perfil do seu GitHub.

1. Install

Add it in your root build.gradle at the end of repositories:

allprojects {

repositories {

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

}
 
}

Add the dependency:

dependencies {

  compile 'com.github.tiagohm:MosaicCalendarView:LATEST-VERSION' 
}

2. Use

Basic:

<br.tiagohm.mosaiccalendarview.MosaicCalendarView

android:id="@+id/calendar"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:padding="5dp" />
MosaicCalendarView mosaicCalendarView = (MosaicCalendarView) findViewById(R.id.calendar);
 mosaicCalendarView.setAdapter(new MyAdapter());
 mosaicCalendarView.setDateHeight(40);
 mosaicCalendarView.setDateWidth(40);
 mosaicCalendarView.setDateSpace(2);
 mosaicCalendarView.setWeekTextColor(0xFF767676);
 mosaicCalendarView.setMonthTextColor(0xFF767676);

  

Listeners:

mosaicCalendarView.setOnDateListener(new MosaicView.OnDateListener() {

  @Override
  public void onDateClick(Calendar calendar) {

Toast.makeText(MainActivity.this, calendar.getTime().toString(), Toast.LENGTH_LONG).show();

  
}
 
}
);

Adapter:

private static class MyAdapter extends MosaicCalendarView.Adapter {

 private Calendar start, end;

 public DateAdapter() {

 start = Calendar.getInstance();

 end = Calendar.getInstance();

 end.add(Calendar.MONTH, 12);

}

 @Override

public Calendar getStartDate() {

 return start;

}

 @Override

public Calendar getEndDate() {

 return end;

}

 @Override

public int getColor(Calendar calendar) {

 final int val = (int) (Math.random() * 100);

 final int[] colors = new int[]{
0xFFEEEEEE, 0xFFC6E48B, 0xFF7BC96F, 0xFF239A3B, 0xFF196127
}
;

 return colors[val % colors.length];

}

 @Override

public String getWeekName(int position) {

 String[] semanas = new String[]

{
"Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"
}
;

 return semanas[position];

}

 @Override

public String getMonthName(int position) {

 String[] meses = new String[]

{
"Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"
}
;

 return meses[position];

}

  
}

3. License

Copyright 2017 Tiago Melo  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. 

Resources

HtmlSpanner allows you full control over how tags are rendered and gives you all the data about the location of a tag in the text. This allows proper handling of anchors, tables, numbered lists and unordered lists.

Dividers is a Android library to easily create separators for your RecyclerViews. It supports a wide range dividers from a simple one that apply all your items to system of selectors to apply different styles to each item.

Takt is Android library for measuring the FPS using Choreographer.

Material bootstrap for Android development like Bootstrap or Foundation for web.

Quick Android Review Kit - This tool is designed to look for several security related Android application vulnerabilities, either in source code or packaged APKs. The tool is also capable of creating "Proof-of-Concept" deployable APKs and/or ADB commands, capable of exploiting many of the vulnerabilities it finds. There is no need to root the test device, as this tool focuses on vulnerabilities that can be exploited under otherwise secure conditions.

An interactive view with water waves flowing like in a washing machine.

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