quranVerses [](https://jitpack.io/#mosamabinomar/quranVerses)

April 19, 2018 ยท View on GitHub

  1. Show Random Quran verse
  2. Show Random Hadith from Sahih Bukhari
  3. Show Hadith of the Day

How To Use

STEP 1

Add it to your build.gradle with:

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}

and:

dependencies {
    implementation 'com.github.mosamabinomar:quranVerses:2.0'
}

STEP 2

FOR RANDOM QURAN VERSE

Add this in your layout file to include the QuranVerseView.

<com.bullhead.quranquotes.views.QuranVerseView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!"
        app:surahNameTextSize="12sp"
        app:surahNameTextColor="#888888"
        app:verseTextSize="30sp"
        android:layout_centerInParent="true"
        app:verseTextColor="@color/colorPrimaryDark"
        /> 

FOR RANDOM HADITH

<com.bullhead.quranquotes.views.RandomHadithView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            app:hadithTextColor="@color/colorAccent"
            app:hadithTextSize="20sp"
            app:infoTextColor="@color/colorPrimary"
            app:infoTextSize="12sp"
            />

FOR Hadith of the Day

<com.bullhead.quranquotes.views.HadithOfDayView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dp"
        app:hadithTextSize="22sp"
        app:hadithTextColor="@color/colorAccent"
        app:infoTextColor="@color/colorPrimary"
        app:infoTextSize="12sp"
        />

That's it. You don't need to do anything else.

View Properties

AttributeFor What?
surahNameTextSizeChange Surah name text size
surahNameTextColorChange Surah name text color
verseTextSizeChange Verse text size
verseTextColorChange Verse text color
hadithTextSizeChange Hadith text size
hadithTextColorChange Hadith text color
infoTextSizeChange Hadith info text size
infoTextColorChange Hadith info text color

Example app:surahNameTextSize="12sp"

Final thoughts

May ALLAH bless us All

If you found any error or incorrect references please let me know by creating issue