Skip to content

Latest commit

 

History

History

tajweedprocessor

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Tajweed Processor

A library for processing Tajweed (reciting) rules in which is based on tajweed edition of alquran.cloud.

Setup

https://github.com/vipafattal/QuranX/blob/master/README.md#instalition

Usage

The library is based on https://alquran.cloud/api, on edition quran-tajweed. Once you have text of quran-tajweed inside the app you can call TajweedHelper.getStyledWords(Aya.text) to return a Spannable text. You could use TextView with Spannable text.

val tajweed = Tajweed()
val ayaTextView: TextView = findViewById(R.id.ayahText)
ayaTextView.text = tajweed.getStyledWords(aya.text)

You can also overriding the properties color by creating a class of MetaColors and pass it to Tajweed:

val metaColors = MetaColors(hsl = "#FF6200EE", ikhafa = "#D50000")
val tajweed = Tajweed(metaColors)

There are many options you could use, for more information, visit the documentation.

Full Example

See the sample.

Styles

This table of the Tajweed metas of the quran-tajweed (obtained from link):

Type Identifier Colour Variable Name Description
hamza-wasl [h #AAAAAA hsl Hamzat ul Wasl
silent [s #AAAAAA hsl Silent
laam-shamsiyah [l #AAAAAA hsl Lam Shamsiyyah
madda-normal [n #537FFF madda_normal Normal Prolongation: 2 Vowels
madda-permissible [p #4050FF madda_permissible Permissible Prolongation: 2, 4, 6 Vowels
madda-necesssary [m #000EBC madda_necessary Necessary Prolongation: 6 Vowels
qalaqah [q #DD0008 qlq Qalaqah
madda-obligatory [o #2144C1 madda_pbligatory Obligatory Prolongation: 4-5 Vowels
ikhafa-shafawi [c #D500B7 ikhf_shfw Ikhafa' Shafawi - With Meem
ikhafa [f #9400A8 ikhf Ikhafa'
idgham-shafawi [w #58B800 idghm_shfw Idgham Shafawi - With Meem
iqlab [i #26BFFD iqlb Iqlab
idgham-without-ghunnah [a #169777 idgh_ghn Idgham - With Ghunnah
idgham-without-ghunnah [u #169200 idgh_w_ghn Idgham - Without Ghunnah
idgham-mutajanisayn [d #A1A1A1 idgh_mus Idgham - Mutajanisayn
idgham-mutaqaribayn [b #A1A1A1 idgh_mus Idgham - Mutaqaribayn
ghunnah [g #FF7E1E ghn Ghunnah: 2 Vowels MIMM/NOON with SHADEH

for more information about quran-tajweed edition see the docs at link1 and link2.

The Library Functionality

  • This library takes the output of the Tajweed edition, and creates an Android Spannable, which is Widget friendly text.
  • It uses the table metas (identifiers) below to parse what the API returns and converts it to something you can use with TextViews widgets.

For listing rules in words

see Tajweed Rules.