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

New UI #36

Merged
merged 35 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
eb1f8d1
some changes
hamza94max Mar 9, 2023
23638b1
home: change font
hamza94max Nov 29, 2023
d26f160
morning Azkar: refactor + new ui
hamza94max Nov 29, 2023
6f6647c
morning Azkar: refactor + new ui
hamza94max Nov 29, 2023
aefb231
evening Azkar: refactor + new ui
hamza94max Nov 29, 2023
d1cbdc9
🔨 fix qibla issue
hamza94max Nov 29, 2023
f51a2ec
fortyHadithList : change Ui
hamza94max Nov 29, 2023
04905b5
MainActivity: setUp bottomView
hamza94max Nov 30, 2023
fa637d8
update ui
hamza94max Nov 30, 2023
747f38f
add hijri date
hamza94max Nov 30, 2023
d114861
add hijri date
hamza94max Dec 3, 2023
33950b6
settings screen
hamza94max Dec 3, 2023
2db6576
naming
hamza94max Dec 6, 2023
c70ae0d
increase timeout
hamza94max Dec 6, 2023
5059e7f
FortyHadith: new ui
hamza94max Dec 7, 2023
2b344f4
make it kotlin 100 %
hamza94max Dec 7, 2023
7ebf965
add notifications permission
hamza94max Dec 7, 2023
e9c9c60
counter module: Add counter ViewModel to handle actions
hamza94max Dec 7, 2023
10e4c3a
🔨🔨 fix notifications issue
hamza94max Dec 7, 2023
029f889
add hijri day num
hamza94max Dec 7, 2023
9bb4f15
Update README.md
hamza94max Dec 7, 2023
c5b2574
ui changes
hamza94max Dec 7, 2023
15b9a26
Merge remote-tracking branch 'origin/New-Ui' into New-Ui
hamza94max Dec 7, 2023
345b177
delete launch
hamza94max Dec 9, 2023
7b545a8
Update app/src/main/java/com/islamey/hamza/wazaker/ui/FortyHadithList…
hamza94max Dec 9, 2023
c1c31dc
add dataBinding
hamza94max Dec 10, 2023
68de2dd
convert to kotlin
hamza94max Dec 10, 2023
7256226
clean code: naming formatting + remove duplicated ✅✅
hamza94max Dec 10, 2023
18acad3
convert dataState to utils ✅
hamza94max Dec 10, 2023
c60f961
Merge remote-tracking branch 'origin/New-Ui' into New-Ui
hamza94max Dec 10, 2023
2305d35
transfer actions from onBind to viewHolder class
hamza94max Dec 11, 2023
acf40ff
handle totalCounts from ViewModel
hamza94max Dec 11, 2023
4ec5183
using placeHolder
hamza94max Dec 12, 2023
17016d2
using placeHolder
hamza94max Dec 12, 2023
b542881
Merge branch 'master' into New-Ui
hamza94max Dec 15, 2023
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
49 changes: 29 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,59 @@
# Wazakar
Islamic application to help the Muslims to read the azkar of morning and evening, awesome Notification every 8 hours, The FourtyNawawi's Ahaadeeth,
Counter to count the number of zeker, qibla direction and many others azkar and doaa.

Islamic application to help the Muslims to read the azkar of morning and evening, awesome Notification every 24 hours, The FourtyNawawi's Ahaadeeth,
Counter to count the number of zeker, qibla direction and others features like azkar and doaa ..etc.


# Screenshots
<div>

<img src = "https://user-images.githubusercontent.com/54688005/162877269-12d60076-de61-4380-9c0b-022ab72d6a99.png" width = 35%>
<img src = "https://github.com/hamza94max/Wazaker/assets/54688005/9197cf92-87fe-44ec-8412-b2a01ecdf163" width = 35%>
<img width ="5%"/>
<img src = "https://user-images.githubusercontent.com/54688005/162877258-3926aa99-bbe4-44ff-8d96-7896591684dd.png" width = 35%>
<img src = "https://github.com/hamza94max/Wazaker/assets/54688005/dbdcaf30-db1b-4fe2-971e-43bff3c53cde" width = 35%>
</div>


</div>


<div>
<img src = "https://user-images.githubusercontent.com/54688005/162877242-da0999d8-1899-4af7-a03d-b77d64563b9d.png" width = 35%>
<img src = "https://github.com/hamza94max/Wazaker/assets/54688005/409edd35-20d9-48f1-832b-ecef9fdb70c4" width = 35%>
<img width ="5%"/>

<img src = "https://user-images.githubusercontent.com/54688005/162877249-242a4e3c-19ec-4591-a015-6e4342de1f3e.png" width = 35%>
<img src = "https://github.com/hamza94max/Wazaker/assets/54688005/fa9e5fb9-235a-4ebd-bc9b-a8ada888e423" width = 35%>
</div>


<div>
<img src = "https://user-images.githubusercontent.com/54688005/162877240-6cb06eaf-3f5b-48a5-a11d-454faa9e8c03.png" width = 35%>
<img src = "https://github.com/hamza94max/Wazaker/assets/54688005/89865642-6e4d-4fe6-b6dd-20eb67530677" width = 35%>
<img width ="5%"/>

<img src = "https://user-images.githubusercontent.com/54688005/162877229-f746c8d1-0b75-4276-8bf5-b627e0cfef57.png" width = 35%>
<img src = "https://github.com/hamza94max/Wazaker/assets/54688005/662205cc-a6e7-40d8-956a-612a9bf709e1)" width = 35%>
</div>


# Tools && Langauages
- java + Kotlin
- Navigation Components
- Qibla Library : [Qibla direction library](https://github.com/hassaanjamil/hj-android-lib-qibla-direction)
- SharedPreferences
- Dark theme
- Clean Code
## Architecture
The architecture of this application relies and complies with the following points below:
- __Clean Architecture__,: into 3 layers ui, data, domain
- __A single-activity architecture__, using the Navigation Components to manage fragment operations.
- __Pattern Model-View-ViewModel (MVVM)__ which facilitates a separation of development of the graphical user interface.
- __Android architecture components__ which help to keep the application robust, testable, and maintainable.

![Capture](https://github.com/hamza94max/Foody/assets/54688005/d2f03de3-fee0-464d-a789-6c268f5d1dc8)

# Languages and Tools
* [Kotlin](https://kotlinlang.org/) - official programming language for Android development .
* [Hilt](https://developer.android.com/training/dependency-injection/hilt-android) - dependency injection library .
* [Coroutines](https://kotlinlang.org/docs/reference/coroutines-overview.html) - for asynchronous programming .
* [Android Architecture Components](https://developer.android.com/topic/libraries/architecture) - Collection of libraries that help you design robust, testable, and maintainable apps.
- [ViewModel](https://developer.android.com/topic/libraries/architecture/viewmodel) - Stores UI-related data that isn't destroyed on UI changes.
- [Navigation Components](https://developer.android.com/guide/navigation) - the interactions that allow users to navigate across, into, and back out from the different pieces of content within your app
* [Fragment](https://developer.android.com/guide/components/fragments)
* [View Binding](https://developer.android.com/topic/libraries/view-binding) - more easily write code that interacts with views.
* [LeakCanary](https://square.github.io/leakcanary) - memory leak detection library for Android.
* [detekt](https://github.com/detekt/detekt) - Static code analysis for Kotlin.



## How to install and run the project
You can download the app from here : [Google play](https://play.google.com/store/apps/details?id=com.hamza.wazkar)
(Currently there is an issue with google play, You can download the apk from release )
You can download the app from release section


# Contributors
Expand Down
35 changes: 28 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ plugins {
id 'kotlin-android'
id 'kotlin-kapt'
id "androidx.navigation.safeargs.kotlin"

id 'dagger.hilt.android.plugin'
}
android {
compileSdkVersion 33

defaultConfig {
applicationId "com.islamey.wazkar"
minSdkVersion 21
minSdkVersion 26
targetSdkVersion 33
versionCode 1
versionName "1.0.0"
Expand Down Expand Up @@ -53,8 +53,8 @@ dependencies {
//noinspection GradleCompatible
implementation "com.android.support:support-compat:30.0.0"

implementation("androidx.recyclerview:recyclerview:1.2.1")
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation("androidx.recyclerview:recyclerview:1.3.2")
implementation 'androidx.appcompat:appcompat:1.6.1'

//noinspection GradleCompatible
implementation 'com.android.support:design:30.0.0'
Expand All @@ -71,19 +71,40 @@ dependencies {
implementation 'androidx.fragment:fragment-ktx:1.5.5'

// splash
implementation 'androidx.core:core-splashscreen:1.0.0'
implementation 'androidx.core:core-splashscreen:1.0.1'

// switch
implementation 'com.github.zcweng:switch-button:0.0.3@aar'

// life cycle
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'

// retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'


// decode
implementation 'org.apache.commons:commons-lang3:3.12.0'


// coroutines
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'

//hilt
implementation "com.google.dagger:hilt-android:2.44"
kapt "com.google.dagger:hilt-android-compiler:2.44"


testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'



implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.20"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.22"
}

repositories {
Expand Down
7 changes: 6 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher_foreground"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="false"
android:name="com.islamey.hamza.wazaker.App"
android:theme="@style/Theme.App.Starting"
tools:ignore="AllowBackup">

Expand All @@ -30,7 +33,9 @@
</intent-filter>
</activity>

<activity android:name="com.hassanjamil.hqibla.CompassActivity" />
<activity
android:name="com.hassanjamil.hqibla.CompassActivity"
android:theme="@style/AppTheme" />

<receiver
android:name="com.islamey.hamza.wazaker.ui.NotificationReceiver"
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/java/com/islamey/hamza/wazaker/App.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.islamey.hamza.wazaker

import android.app.Application
import dagger.hilt.android.HiltAndroidApp

@HiltAndroidApp
class App : Application() {}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.islamey.hamza.wazaker.data.remote

import com.islamey.hamza.wazaker.domain.Models.HijriDateResponse
import retrofit2.http.GET
import retrofit2.http.Path

interface ApiService {


@GET("v1/gToH/{date}")
suspend fun getHijriDate(
@Path("date") date: String
): HijriDateResponse

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.islamey.hamza.wazaker.data.repoImpl

import com.islamey.hamza.wazaker.data.remote.ApiService
import com.islamey.hamza.wazaker.domain.Models.HijriDateResponse
import com.islamey.hamza.wazaker.domain.repo.HijriRepo

class HijriRepoImpl(private val apiService: ApiService) : HijriRepo {


override suspend fun getHijriDate(date: String): HijriDateResponse {
return apiService.getHijriDate(date)
}


}
54 changes: 54 additions & 0 deletions app/src/main/java/com/islamey/hamza/wazaker/di/NetworkModule.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package com.islamey.hamza.wazaker.di

import com.google.gson.GsonBuilder
import com.islamey.hamza.wazaker.data.remote.ApiService
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import okhttp3.OkHttpClient
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import java.util.concurrent.TimeUnit
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object NetworkModule {

const val BASE_URL = "https://api.aladhan.com/"

@Provides
@Singleton
fun provideOkHttpClient(): OkHttpClient {
return OkHttpClient.Builder()
.connectTimeout(30, TimeUnit.SECONDS)
.readTimeout(30, TimeUnit.SECONDS)
.build()
}

@Provides
@Singleton
fun provideRetrofit(okHttpClient: OkHttpClient): Retrofit {
return Retrofit.Builder()
.baseUrl(BASE_URL)
.client(okHttpClient)
.addConverterFactory(
GsonConverterFactory.create(
GsonBuilder()
.setLenient()
.create()
)
)
.build()

}

@Provides
@Singleton
fun provideApiService(retrofit: Retrofit): ApiService {
return retrofit.create(ApiService::class.java)
}


}
22 changes: 22 additions & 0 deletions app/src/main/java/com/islamey/hamza/wazaker/di/RepoModule.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.islamey.hamza.wazaker.di

import com.islamey.hamza.wazaker.data.remote.ApiService
import com.islamey.hamza.wazaker.data.repoImpl.HijriRepoImpl
import com.islamey.hamza.wazaker.domain.repo.HijriRepo
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent

@Module
@InstallIn(SingletonComponent::class)
object RepoModule {


@Provides
fun provideHijriRepo(apiService: ApiService): HijriRepo {
return HijriRepoImpl(apiService)
}


}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.islamey.hamza.wazaker.data.DataSets
package com.islamey.hamza.wazaker.domain.DataSets

import android.content.Context
import com.islamey.hamza.wazaker.data.Models.AzkarListModel
import com.islamey.hamza.wazaker.domain.Models.AzkarListModel
import com.islamey.wazkar.R

object AzkarListDataset {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.islamey.hamza.wazaker.data.DataSets
package com.islamey.hamza.wazaker.domain.DataSets

import com.islamey.hamza.wazaker.data.Models.ZekerModel
import com.islamey.hamza.wazaker.domain.Models.ZekerModel

object EveningAzkarDataset {
private lateinit var eveningAzkar: MutableList<ZekerModel>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.islamey.hamza.wazaker.data.DataSets
package com.islamey.hamza.wazaker.domain.DataSets

import com.islamey.hamza.wazaker.data.Models.Hadith
import com.islamey.hamza.wazaker.domain.Models.Hadith


object FortyDataSet {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.islamey.hamza.wazaker.data.DataSets
package com.islamey.hamza.wazaker.domain.DataSets

import com.islamey.hamza.wazaker.data.Models.AzkarListModel
import com.islamey.hamza.wazaker.domain.Models.AzkarListModel

object FortyListDataset {
private lateinit var fortylist: MutableList<AzkarListModel>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.islamey.hamza.wazaker.data.DataSets
package com.islamey.hamza.wazaker.domain.DataSets

import com.islamey.hamza.wazaker.data.Models.ZekerModel
import com.islamey.hamza.wazaker.domain.Models.ZekerModel
MahmoudMabrok marked this conversation as resolved.
Show resolved Hide resolved

object MorningAzkarDataset {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.islamey.hamza.wazaker.data.DataSets
package com.islamey.hamza.wazaker.domain.DataSets

import java.util.*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.islamey.hamza.wazaker.data.DataSets
package com.islamey.hamza.wazaker.domain.DataSets

import com.islamey.hamza.wazaker.data.Models.AzkarListModel
import com.islamey.hamza.wazaker.domain.Models.AzkarListModel

object ZekerDataSet {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.islamey.hamza.wazaker.domain.Models

data class AzkarListModel(var name: String)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.islamey.hamza.wazaker.domain.Models

data class Hadith(var hadith: String)
Loading