All Projects → islandparadise14 → MinTimetable

islandparadise14 / MinTimetable

Licence: MIT License
Customizable TimeTableView for Android

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to MinTimetable

pulse-editor
Tha Platzi Flavored Markdown extensible and customizable editor.
Stars: ✭ 66 (+153.85%)
Mutual labels:  customizable
OFFLINE-ERP
A desktop application which helps students to choose Disciplinary and Open Electives wisely.
Stars: ✭ 16 (-38.46%)
Mutual labels:  timetable
ngx-emoj
A simple, theme-able emoji mart/picker for angular 4+
Stars: ✭ 18 (-30.77%)
Mutual labels:  customizable
TableBundle
Symfony Bundle for easy pagination and filtering
Stars: ✭ 24 (-7.69%)
Mutual labels:  customizable
react-native-month-picker
This is a month picker to use in react native mobile apps.
Stars: ✭ 16 (-38.46%)
Mutual labels:  customizable
njsx
A customizable and declarative interface for creating React and React Native components without JSX syntax.
Stars: ✭ 29 (+11.54%)
Mutual labels:  customizable
SIRIWaveView
Siri like wave view for android
Stars: ✭ 65 (+150%)
Mutual labels:  customview
JQFlowView
卡片式无限自动轮播图 ,无限/自动轮播,可自定义非当前显示view缩放和透明的特效等;喜欢❤️就star一下吧!
Stars: ✭ 24 (-7.69%)
Mutual labels:  customview
react-native-input-bar
Fully customizable, beautifully designed Input Bar for React Native
Stars: ✭ 32 (+23.08%)
Mutual labels:  customizable
TNImageView-Android
Android Library for making scale-able and rotatable image views or giving this power to your own image view. This repo has been depreciated.
Stars: ✭ 18 (-30.77%)
Mutual labels:  customizable
fittable
Calendar display application built on top of the Sirius API.
Stars: ✭ 26 (+0%)
Mutual labels:  timetable
react-super-treeview
👏 Finally, a React Treeview component which is customizable on every level
Stars: ✭ 98 (+276.92%)
Mutual labels:  customizable
ModularPlayers
Modular desktop media widget
Stars: ✭ 28 (+7.69%)
Mutual labels:  customizable
AndroidJoyStickView
This library lets you create joystick with some customization for android
Stars: ✭ 45 (+73.08%)
Mutual labels:  customview
Alertism
A Good Replacement For Default JavaScript Alerts Which Also Makes Good Pop-Ups
Stars: ✭ 19 (-26.92%)
Mutual labels:  customizable
AutoMagic
A magically fast, lightweight and customizable javascript library.
Stars: ✭ 16 (-38.46%)
Mutual labels:  customizable
Refreshable
🌀Pull to refresh and load more function for UIScrollView
Stars: ✭ 31 (+19.23%)
Mutual labels:  customizable
RotatableAutofitEditText
Extended EditText which allows to move, rotate and resize text at the same time
Stars: ✭ 51 (+96.15%)
Mutual labels:  customview
badaso
The API & platform builder, build your apps 10x faster even more, it's open source & 100% free !
Stars: ✭ 650 (+2400%)
Mutual labels:  customizable
Celestial.UIToolkit
A custom WPF toolkit which is inspired by a lot of the current design languages, including Microsoft's Fluent Design and Google's Material Design.
Stars: ✭ 32 (+23.08%)
Mutual labels:  customizable

MinTimetable

MinTimeTable is Customizable library to generate Timetable of University.
If you only add a course, the course time is automatically calculated and added to the timetable.
(default 09:00 ~ 16:00)

iOS version

Elliotable

Author Information


Timetable Library for Android Development
Author : Mint Park / Seoul, South Korea
Email : [email protected]

Platform API License: MIT

Screenshot

Portrait & Landscape Timetable

screenshot

Installation

JitPack

MinTimeTable is available through JitPack, to install it simply add the following line to your Gradle:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
implementation 'com.github.islandparadise14:Mintable:x.y.z'

Usage

Add View

<com.islandparadise14.mintable.MinTimeTableView
                android:id="@+id/table"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

Day Symbol Definition

private val day = arrayOf("Mon", "Tue", "Wen", "Thu", "Fri")  

Make Table

override onWindowFocusChanged because we know the size of the view after onCreate is finished. If you don't want to use this method, see the optimization options below.

override fun onWindowFocusChanged(hasFocus: Boolean) {
    super.onWindowFocusChanged(hasFocus)
    table.initTable(day)
}

Add Schedules

private val scheduleList: ArrayList<ScheduleEntity> = ArrayList()
val schedule = ScheduleEntity(
                  32, //originId
                  "Database", //scheduleName
                  "IT Building 301", //roomInfo
                  ScheduleDay.TUESDAY, //ScheduleDay object (MONDAY ~ SUNDAY)
                  "8:20", //startTime format: "HH:mm"
                  "10:30", //endTime  format: "HH:mm"
                  "#73fcae68", //backgroundColor (optional)
                  "#000000" //textcolor (optional)
                )
scheduleList.add(schedule)
override fun onWindowFocusChanged(hasFocus: Boolean) {
    super.onWindowFocusChanged(hasFocus)
    table.initTable(day)
    table.updateSchedules(scheduleList)
}

If you want to start on Sunday, use 'ScheduleDayOption.${weekday}' (SUNDAY ~ SATURDAY)

Optimization Option

Make the view fullWidth

add attribute 'isFullWidth' (default: false)

<com.islandparadise14.mintable.MinTimeTableView
                android:id="@+id/table"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:isFullWidth="true" />

then you don't need override onWindowFocusChanged

if you want to add padding using optimization option, add attribute 'widthPadding' (default: 0)

<com.islandparadise14.mintable.MinTimeTableView
                android:id="@+id/table"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:isFullWidth="true"
                app:widthPadding="20" />

More Options

Add Listener

ScheduleEntity has onClickListener

schedule.setOnClickListener(View.OnClickListener {
    //do something
})

MinTimeTableView has three kinds of Listener

When you click on a schedule,
if you need ScheduleEntity in Listener, you can use OnScheduleClickListener

table.setOnScheduleClickListener(
    object :OnScheduleClickListener {
        override fun scheduleClicked(entity: ScheduleEntity) {
            //do something
        }
    }
)

When you click on a timeCell,
if you need weekdayInfo and timeInfo, you can use OnTimeCellClickListener

table.setOnTimeCellClickListener(object :OnTimeCellClickListener{
    override fun timeCellClicked(scheduleDay: Int, time: Int) {
        //do something
    }
})

When you LongClick on a schedule, if you need ScheduleEntity in Listener, you can use OnScheduleLongClickListener

table.setOnScheduleLongClickListener(
        object :OnScheduleLongClickListener{
            override fun scheduleLongClicked(entity: ScheduleEntity) {
                //do something
            }
        }
)

Length options

Length

baseSetting(topMenuHeight: Int, leftMenuWidth: Int, cellHeight: Int)

table.baseSetting(30, 40, 60) //default (20, 30, 50)

Rate

ratioCellSetting(topMenuHeight: Int, leftMenuWidth: Int, cellRatio: Float)

table.ratioCellSetting(20, 30, 1.5f)

Border Option

add attribute 'radiusOption' ( none | left | right | round )

<com.islandparadise14.mintable.MinTimeTableView
                android:id="@+id/table"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:radiusOption="left" />

screenshot

Color options

add attribute 'cellColor', 'lineColor', 'menuColor'

<com.islandparadise14.mintable.MinTimeTableView
                android:id="@+id/table"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:cellColor="@color/black"
                app:lineColor="@color/colorAccent"
                app:menuColor="@color/colorPrimary" />

TwentyFourHourClock option

add attribute 'isTwentyFourHourClock' (default: true)

<com.islandparadise14.mintable.MinTimeTableView
                android:id="@+id/table"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:isTwentyFourHourClock="false" />

screenshot

Border Option

add attribute 'xEndLine'(blue), 'yEndLine'(red), 'border'(green)

(default: false)

<com.islandparadise14.mintable.MinTimeTableView
                android:id="@+id/table"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:border="true"
                app:xEndLine="true"
                app:yEndLine="true" />

Menu Text Color,Size Option

add attribute 'menuTextSize'(float) 'menuTextColor'(color)

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