Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6770b82
Update Library to Android Level 30
omarb1989 Jul 21, 2021
a8a1ced
add LongClick on Sticker
omarb1989 Jul 31, 2021
a00a357
change package name
omarb1989 Aug 2, 2021
eb35b93
change App version
omarb1989 Aug 2, 2021
5300435
change App version
omarb1989 Aug 2, 2021
aea1c98
Update README.md
omarb1989 Aug 2, 2021
75f5c8b
apply a default timetable colors
omarb1989 Aug 3, 2021
32ec9ce
Add more TimetableView attributes to support Material Design
omarb1989 Aug 4, 2021
9b021e6
set right version to release 1.0.4
omarb1989 Aug 4, 2021
4539418
Merge remote-tracking branch 'origin/master'
omarb1989 Aug 4, 2021
eb78748
Update README.md
omarb1989 Aug 4, 2021
77dcae5
Update README.md
omarb1989 Aug 4, 2021
de4c584
add attribute 'color_side_header_text'
omarb1989 Aug 4, 2021
fe29ae9
Merge remote-tracking branch 'origin/master'
omarb1989 Aug 4, 2021
b3cc379
Update README.md
omarb1989 Aug 4, 2021
732da9c
Update README.md
omarb1989 Aug 4, 2021
9840ffd
Update README.md
omarb1989 Aug 4, 2021
8246a50
add attribute 'border_width'
omarb1989 Aug 4, 2021
f6498d6
Merge remote-tracking branch 'origin/master'
omarb1989 Aug 4, 2021
fb4254c
Update README.md
omarb1989 Aug 4, 2021
f172cd0
add Labels 'AM' and 'PM' to table timeline
omarb1989 Aug 5, 2021
0d8fadd
Merge remote-tracking branch 'origin/master'
omarb1989 Aug 5, 2021
41b297c
Update README.md
omarb1989 Aug 5, 2021
d220a41
Update README.md
omarb1989 Aug 5, 2021
77ce907
Update README.md
omarb1989 Aug 5, 2021
a39f320
Update README.md
omarb1989 Aug 5, 2021
595048e
from fx2 to fx3 and update android Studio to ArcticFox
omarb1989 Aug 24, 2021
11b7207
add id to Schedule model class
omarb1989 Aug 24, 2021
ca36d56
Update README.md
omarb1989 Aug 24, 2021
0d0564e
BugHotFix: fix _id in Schedule model class
omarb1989 Aug 27, 2021
73911da
BugHotFix: fix _id in Schedule model class
omarb1989 Aug 27, 2021
d2e32c7
Merge remote-tracking branch 'origin/master'
omarb1989 Aug 27, 2021
ada0036
Update README.md
omarb1989 Aug 27, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

36 changes: 27 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# TimetableView
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![API](https://img.shields.io/badge/API-19%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=19)
[![](https://jitpack.io/v/tlaabs/TimetableView.svg)](https://jitpack.io/#tlaabs/TimetableView)
[![](https://jitpack.io/v/omarb1989/TimetableView.svg)](https://jitpack.io/#omarb1989/TimetableView)

Android Library that creates simple time table.

![dark](https://user-images.githubusercontent.com/9026030/128323499-f8562b86-8f18-4cc3-a6b5-3165b03ad88b.jpg)
![light](https://user-images.githubusercontent.com/9026030/128323528-678ceab1-4dd8-40e1-a09b-e66b98ed0343.jpg)

![img0](https://postfiles.pstatic.net/MjAxOTAxMjdfMTUz/MDAxNTQ4NTcyNTU5NTk4.M9hWyDvljjkoBDW-naLrTRqRAXUM8WRUyZXptTLKbs8g.b0FN12d8Cmxp5OWZqlQcusL_mJYNKgx6a_XLe_1ALOog.JPEG.tlaabs/Screenshot_Air.jpg?type=w773)
![img1](https://user-images.githubusercontent.com/8165219/62833150-b88d3180-bc74-11e9-9b20-02a0ad03e778.jpg)


## How to import
Expand All @@ -23,7 +23,7 @@ allprojects {
Add the dependency
```gradle
dependencies {
implementation 'com.github.tlaabs:TimetableView:1.0.3-fx1'
implementation 'omarb1989:TimetableView:1.0.4-fx5'
}
```

Expand All @@ -36,7 +36,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto"

### TimetableView in layout
```xml
<com.github.tlaabs.timetableview.TimetableView
<omarb1989.timetableview.TimetableView
android:id="@+id/timetable"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -57,6 +57,12 @@ app:header_highlight_color="@color/highlight" // sets header highlight color (de
app:header_highlight_image="@drawable/ic_kitty" // set header highlight image src
app:header_highlight_image_size="36dp" // set header highlight image width,height(square)
app:header_highlight_type="image" // set header highlight type - color/image (default : color)
app:color_surface="#ffffff" // set default color of table boxes
app:color_borders="#F3F3F3" // set color for the table borders
app:side_color_text="#000000" //set color text of the first column of hours
app:color_side="#F48FB1" // set color of the first column of hours
app:color_side_header_text="#FFE082" // set color text of the header and the first column of hours
app:border_width="light" // set table border width: noWidth, light, normal, thick, extra thick
```

### Change header title
Expand All @@ -73,7 +79,7 @@ First, write a string-array as below on values/strings.xml.
```
Then, apply that to timetable attribute.
```xml
<com.github.tlaabs.timetableview.TimetableView
<omarb1989.timetableview.TimetableView
android:id="@+id/timetable"
android:layout_width="match_parent"
android:layout_height="0dp"
Expand All @@ -93,7 +99,18 @@ timetable.setOnStickerSelectEventListener(new TimetableView.OnStickerSelectedLis
}
});
```
### OnStickerSelectedLongClickListener
OnStickerSelectedLongClickListener is invoked when Long clicked by user.

idx is used to edit or delete.
```java
timetable.setOnStickerSelectEventListener(new TimetableView.OnStickerSelectedLongClickListener() {
@Override
public void OnStickerSelectedLongClick(int idx, ArrayList<Schedule> schedules) {

}
});
```
### Add schdule
```java
ArrayList<Schedule> schedules = new ArrayList<Schedule>();
Expand All @@ -103,6 +120,7 @@ schedule.setClassPlace("IT-601"); // sets place
schedule.setProfessorName("Won Kim"); // sets professor
schedule.setStartTime(new Time(10,0)); // sets the beginning of class time (hour,minute)
schedule.setEndTime(new Time(13,30)); // sets the end of class time (hour,minute)
int uniqueId = schedule.get_id();// you can use it later on wherever you get schedule object to identify it
schedules.add(schedule);
//.. add one or more schedules
timetable.add(schedules);
Expand All @@ -123,7 +141,7 @@ timetable.removeAll(); // remove all items
### Highlight header
**1.Color type(Default)**
```xml
<com.github.tlaabs.timetableview.TimetableView
<omarb1989.timetableview.TimetableView
android:id="@+id/timetable"
android:layout_width="match_parent"
android:layout_height="0dp"
Expand All @@ -132,7 +150,7 @@ timetable.removeAll(); // remove all items
```
**2.Image type**
```xml
<com.github.tlaabs.timetableview.TimetableView
<omarb1989.timetableview.TimetableView
android:id="@+id/timetable"
android:layout_width="match_parent"
android:layout_height="0dp"
Expand All @@ -155,7 +173,7 @@ timetable.load(json); // restore

# License
```xml
Copyright 2019 tlaabs
Copyright 2019 tlaabs, forked and updated by omarb1989

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
20 changes: 10 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 28
compileSdkVersion 30
defaultConfig {
applicationId "com.github.tlaabs.timetableviewdemo"
applicationId "com.github.omarb1989.timetableviewdemo"
minSdkVersion 19
targetSdkVersion 28
versionCode 4
versionName "1.0.3-fx1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
targetSdkVersion 30
versionCode 6
versionName "1.0.4"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
Expand All @@ -20,11 +20,11 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'

implementation project(':timetableview')
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.github.tlaabs.timetableviewdemo;
package com.github.omarb1989.timetableviewdemo;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -19,7 +19,7 @@ public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

assertEquals("com.github.devsim.timetableviewdemo", appContext.getPackageName());
}
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.tlaabs.timetableviewdemo">
package="com.github.omarb1989.timetableviewdemo">

<application
android:allowBackup="true"
Expand All @@ -9,14 +9,14 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name="com.github.tlaabs.timetableviewdemo.MainActivity">
<activity android:name="com.github.omarb1989.timetableviewdemo.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.github.tlaabs.timetableviewdemo.EditActivity"></activity>
<activity android:name="com.github.omarb1989.timetableviewdemo.EditActivity"></activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.github.tlaabs.timetableviewdemo;
package com.github.omarb1989.timetableviewdemo;

import android.app.TimePickerDialog;
import android.content.Context;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
Expand All @@ -13,8 +13,8 @@
import android.widget.TextView;
import android.widget.TimePicker;

import com.github.tlaabs.timetableview.Schedule;
import com.github.tlaabs.timetableview.Time;
import com.github.omarb1989.timetableview.Schedule;
import com.github.omarb1989.timetableview.Time;

import java.util.ArrayList;

Expand Down
Loading