Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A Hijri (Islamic) Calendar Library

License

NotificationsYou must be signed in to change notification settings

sahaab/HijriCalendar-master

Repository files navigation

Hijri (Islamic) Calendar

HijriCalendar is a fragment made from the Caldroid fragment by thomasdao. Made Originally for my app [Muslim Zone] (https://play.google.com/store/apps/details?id=com.sahaab.android.muslimzone.donation).

It has the same functions as Caldroid and more. You can get Islamic Dates for a certain date and many other functions.

Sources

Caldroid :https://github.com/roomorama/Caldroid
Umm Al Qura Islamic Calendar :https://gist.github.com/fatfingers/6492017

Instructions

This is mainly built for eclipse, on eclipse. To use on eclipse,1 - download the Project and import it into eclipse2 - To use in your project, reference the child library project as a library, by going to your apps properties - > Android - > and the add as library3 - Then simply in you activity file, add this code

    final CaldroidFragment caldroidFragment = new CaldroidFragment();    Bundle args = new Bundle();    Calendar cal = Calendar.getInstance();    args.putInt(CaldroidFragment.MONTH, cal.get(Calendar.MONTH) + 1);    args.putInt(CaldroidFragment.YEAR, cal.get(Calendar.YEAR));    caldroidFragment.setArguments(args);            FragmentTransaction t = getSupportFragmentManager().beginTransaction();    t.replace(R.id.calendar1, caldroidFragment);    t.commit();

and in your activity layout add

<LinearLayoutandroid:id="@+id/calendar1"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_below="@+id/HijriDateCalendar"android:orientation="vertical" ></LinearLayout>

For More Detailed Instructions - Please Look at the sample app, or the README_CALDROID.md file

To Get HijriDate - You have 4 options to get the Hijri Dates

public static String getSimpleDate(Calendar cal, String valuechange) returns Full Date (e.g 17 Muharram 1436)public static String getSimpleDateDay(Calendar cal, String valuechange) returns Datepublic static String getSimpleDateMonth(Calendar cal, String valuechange) returns Monthpublic static String getSimpleDateYear(Calendar cal, String valuechange) returns Year

Accepted Strings forvaluechange are

any integer

To use, simply use codee.g for current date

HijriCalendarDate.getSimpleDate(Calendar.getInstance(),"0")

License

See LICENSE.md

About

A Hijri (Islamic) Calendar Library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp