Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jalali calendar and font support #619

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6b5c939
Added Jalali Calendar implementation
SaeedZhiany Oct 2, 2019
d33cf60
Added a default font to using for Persian text and numbers in Jalali …
SaeedZhiany Oct 2, 2019
779d84f
Used 'AccessibleTextView' instead of 'TextView'
SaeedZhiany Oct 2, 2019
c641592
Used 'start' gravity instead of 'left' according to google suggestion…
SaeedZhiany Oct 2, 2019
b89ff37
Added focusable property as it's needed when the 'clickable' property…
SaeedZhiany Oct 2, 2019
2b6b7ce
extracted commonly used enums and removed similar and duplicated enums.
SaeedZhiany Oct 2, 2019
0563bdd
added new enum for Calendar type supported by library
SaeedZhiany Oct 2, 2019
e3925c2
used 'VersionCodes' instead of hardcoded version number
SaeedZhiany Oct 2, 2019
fa1fcf0
added Jalali calendar support to library and adapted sample project w…
SaeedZhiany Oct 2, 2019
297fa46
added custom font support to library
SaeedZhiany Oct 2, 2019
fdb4ed2
fixed deprecated usage of AndroidJUnit4 by using 'androidx.test.ext:j…
SaeedZhiany Oct 2, 2019
d9d1e68
Upgraded junit-quickcheck dependencies to the latest.
SaeedZhiany Oct 2, 2019
54952df
fixed sample project test failure.
SaeedZhiany Oct 2, 2019
8dd537e
replaced single case switch with if statement according to android st…
SaeedZhiany Oct 2, 2019
130233f
used 'VersionCodes' instead of hardcoded version number
SaeedZhiany Oct 2, 2019
a5b909d
removed redundant array item initialization
SaeedZhiany Oct 2, 2019
a2ae81e
changed week start day on locale changes
SaeedZhiany Oct 7, 2019
fb926ed
Changed sample persian font
SaeedZhiany Oct 7, 2019
4097bb9
Added an option to change locale from UI in Date Tab
SaeedZhiany Oct 7, 2019
863e3d2
added locale support to JalaliCalendar class
SaeedZhiany Oct 7, 2019
e819151
Upgrade library's version
SaeedZhiany Oct 7, 2019
f0987bb
Applied Android Studio automatic code refactor and optimize import pr…
SaeedZhiany Oct 7, 2019
35c284e
added missing GREGORIAN case to switch
SaeedZhiany Oct 8, 2019
5d13e60
Merge branch 'master' into JalaliCalendarAndFontSupport
SaeedZhiany Nov 12, 2019
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
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ org.gradle.jvmargs=-Xmx1536m
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

VERSION_NAME=4.2.3
VERSION_CODE=54
VERSION_NAME=5.0.0
VERSION_CODE=55
GROUP=com.wdullaer

ANDROID_BUILD_MIN_SDK_VERSION=16
Expand Down
6 changes: 3 additions & 3 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.0.0'

testImplementation 'junit:junit:4.12'
testImplementation 'com.pholser:junit-quickcheck-core:0.7'
testImplementation 'com.pholser:junit-quickcheck-generators:0.7'
testImplementation 'com.pholser:junit-quickcheck-core:0.9'
testImplementation 'com.pholser:junit-quickcheck-generators:0.9'

androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test:rules:1.2.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
}

apply from: 'gradle-mvn-push.gradle'
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
package com.wdullaer.materialdatetimepicker.date;

import android.os.Parcel;

import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import java.util.Calendar;

import static org.junit.Assert.*;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;

/**
* Unit tests for DefaultDateRangeLimiter which need to run on an android device
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package com.wdullaer.materialdatetimepicker.time;

import android.os.Parcel;

import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;

/**
* Unit tests for DefaultTimepointLimiter which need to run on an android device
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package com.wdullaer.materialdatetimepicker.time;

import android.os.Parcel;

import androidx.test.ext.junit.runners.AndroidJUnit4;

import static org.junit.Assert.*;
import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.assertEquals;

/**
* Test for Timepoint which need to run on an actual device
* Created by wdullaer on 1/11/17.
Expand Down
Binary file added library/src/main/assets/fonts/Roboto-Medium.ttf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
package com.wdullaer.materialdatetimepicker;

import android.os.Build;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.LinearSnapHelper;
import android.view.Gravity;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.LinearSnapHelper;
import androidx.recyclerview.widget.OrientationHelper;
import androidx.recyclerview.widget.RecyclerView;
import android.view.Gravity;
import android.view.View;

/**
* Enables snapping better snapping in a RecyclerView
Expand Down Expand Up @@ -101,8 +101,6 @@ public int[] calculateDistanceToFinalSnap(@NonNull RecyclerView.LayoutManager la
} else { // END
out[0] = distanceToEnd(targetView, getHorizontalHelper(layoutManager), false);
}
} else {
out[0] = 0;
}

if (layoutManager.canScrollVertically()) {
Expand All @@ -111,8 +109,6 @@ public int[] calculateDistanceToFinalSnap(@NonNull RecyclerView.LayoutManager la
} else { // BOTTOM
out[1] = distanceToEnd(targetView, getVerticalHelper(layoutManager), false);
}
} else {
out[1] = 0;
}

return out;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ public void start() {

/**
* Method to verify that vibrate permission has been granted.
*
* <p>
* Allows users of the library to disabled vibrate support if desired.
*
* @return true if Vibrate permission has been granted
*/
private boolean hasVibratePermission(Context context) {
Expand Down
Loading