All Projects → bashizip → business-hours-picker

bashizip / business-hours-picker

Licence: MIT license
A business hours picker and viewer for android

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to business-hours-picker

SwiftUI-Color-Kit
SwiftUI Color Pickers, Gradient Pickers And All The Utilities Needed To Make Your Own!
Stars: ✭ 120 (+287.1%)
Mutual labels:  ui-components
mijin
Tailwind CSS UI components build for Vue.js / Nuxt.js
Stars: ✭ 168 (+441.94%)
Mutual labels:  ui-components
dashkit-ui
UI Components built on React.
Stars: ✭ 17 (-45.16%)
Mutual labels:  ui-components
rules
One Framework to build a highly declarative and customizable UI without using templates.
Stars: ✭ 38 (+22.58%)
Mutual labels:  ui-components
open design system
Open Source Design System using Sketch. It's early days of my project.
Stars: ✭ 22 (-29.03%)
Mutual labels:  ui-components
laratify
Laravel UI Components using TailwindCSS & AlpineJS
Stars: ✭ 13 (-58.06%)
Mutual labels:  ui-components
visage
Visage design system
Stars: ✭ 12 (-61.29%)
Mutual labels:  ui-components
flextreemap
TreeMap data visualization component for Adobe Flex
Stars: ✭ 22 (-29.03%)
Mutual labels:  ui-components
Bulma.io-axure
AxureRP Library with Bulma.io components
Stars: ✭ 90 (+190.32%)
Mutual labels:  ui-components
wlui
wl-ui 精美易用的前端复杂组件解决方案。Beautiful and easy-to-use front-end complex component solution
Stars: ✭ 32 (+3.23%)
Mutual labels:  ui-components
bulmil
💄 A agnostic UI components library based on Web Components, made with Bulma & Stencil.
Stars: ✭ 121 (+290.32%)
Mutual labels:  ui-components
jqlouds
☁️ An awesome yet simple plugin for jquery that let's you create clouds on the fly.
Stars: ✭ 54 (+74.19%)
Mutual labels:  ui-components
wonder-blocks
React components for Wonder Blocks design system.
Stars: ✭ 110 (+254.84%)
Mutual labels:  ui-components
aframe-colorwheel-component
A-Frame Colorwheel. Based on A-Painter and A-Frame Material 🎨🅰
Stars: ✭ 16 (-48.39%)
Mutual labels:  ui-components
CheckMarkView
UI view which draws programmatically a checkmark with different styles
Stars: ✭ 35 (+12.9%)
Mutual labels:  ui-components
vuestic-ui
Free and Open Source UI Library for Vue 3 🤘
Stars: ✭ 1,501 (+4741.94%)
Mutual labels:  ui-components
anim search bar
A flutter package that has an animated search bar with loads of customization
Stars: ✭ 28 (-9.68%)
Mutual labels:  ui-components
svelteit
Svelteit is a minimalistic UI/UX component library for Svelte and Sapper projects
Stars: ✭ 64 (+106.45%)
Mutual labels:  ui-components
phoenix component folders
Reusable UI components on Phoenix framework
Stars: ✭ 31 (+0%)
Mutual labels:  ui-components
a11y-accordion-tabs
A script for an accessible accordion tabs component
Stars: ✭ 50 (+61.29%)
Mutual labels:  ui-components

Business Hours Picker

A business hours picker lib for android

API Android Arsenal bashizip

Want to add a business hours picker and viewer in your application? Try this library !

screen1 screen2

Feel free to fork or pull requests on github. Issues can be reported on the github issue tracker.

Installation

Step 1 : Add jitpack to your build.gradle file

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

Step 2 : Add the dependency

implementation 'com.github.bashizip:business-hours-picker:1.1.1'

v1.1.1 Update

  • Upgrade gradle version
  • Update ReadMe
  • Remove the v prefix in version names

How to use it

First, add the picker or the viewer you want to use in your layout files:

Use it to pick a full week of business days from monday to sunday

<com.bashizip.bhlib.BusinessHoursWeekPicker
       android:id="@+id/bh_picker"
       android:layout_width="match_parent"
       android:layout_height="wrap_content"/>

Use it to display a full week of business days

   <com.bashizip.bhlib.BusinessHoursWeekView
       android:layout_centerInParent="true"
       android:id="@+id/bh_view"
       android:gravity="center"
       bh:bhTextSize="14"
       bh:bhIcon="@drawable/ic_today_black_24dp"
       bh:bhTodayIcon="@drawable/ic_today_black_24dp"
       bh:bhTextColor="@color/text_default_color"
       bh:bhTodayColor="@color/colorAccent"
       bh:bhTodayTextSize="16"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       />

Then in your java code :

The picker activity or fragment

	  BusinessHoursWeekPicker bh_picker = findViewById(R.id.bh_picker);
	  Button btn_apply = findViewById(R.id.btn_apply);
	     btn_apply.setOnClickListener(view -> {
		   List<BusinessHours> bhs = bh_picker.getBusinessHoursList();
		   // Here do your stuffs with the list
		});

The viewer activity or fragment

      List<BusinessHours> businessHoursList = getList();
     // Just call the setModel method and it's done !
     businessHoursWeekView.setModel(businessHoursList);

You can also initialize the picker with a list of businessHours

      List<BusinessHours> businessHoursList = getList();
      businessHoursPicker.setBusinessHoursList(businessHoursList);

See the full sample app for more details.

Styling

You can style the viewer using theses attributes :

Attribute Description
bhIcon Left icon of the day
bhTextColor Text color
bhTextSize Text Size
bhIconPadding Left icon padding
bhTextStyle Default text style
bhTodayStyle Today text style (highlighted)
bhTodayTextSize Today text size
bhTodayIcon Today left icon

Licence

  MIT License

Copyright (c) [2019] [Patrick Bashizi]

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