diff --git a/.idea/misc.xml b/.idea/misc.xml index a4f09e2..74dd639 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,7 +1,7 @@ - + diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 93eb7ca..8f1cdc5 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -93,4 +93,7 @@ dependencies { implementation(libs.jsoup) implementation(libs.retrofit.scalars) + + + implementation(libs.androidx.compose.material.icons.extended) } \ No newline at end of file diff --git a/app/release/app-release.apk b/app/release/app-release.apk new file mode 100644 index 0000000..dff6067 Binary files /dev/null and b/app/release/app-release.apk differ diff --git a/app/release/baselineProfiles/0/app-release.dm b/app/release/baselineProfiles/0/app-release.dm new file mode 100644 index 0000000..fcda547 Binary files /dev/null and b/app/release/baselineProfiles/0/app-release.dm differ diff --git a/app/release/baselineProfiles/1/app-release.dm b/app/release/baselineProfiles/1/app-release.dm new file mode 100644 index 0000000..9e92afa Binary files /dev/null and b/app/release/baselineProfiles/1/app-release.dm differ diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json new file mode 100644 index 0000000..22cacee --- /dev/null +++ b/app/release/output-metadata.json @@ -0,0 +1,37 @@ +{ + "version": 3, + "artifactType": { + "type": "APK", + "kind": "Directory" + }, + "applicationId": "com.approagency.drug", + "variantName": "release", + "elements": [ + { + "type": "SINGLE", + "filters": [], + "attributes": [], + "versionCode": 1, + "versionName": "1.0", + "outputFile": "app-release.apk" + } + ], + "elementType": "File", + "baselineProfiles": [ + { + "minApi": 28, + "maxApi": 30, + "baselineProfiles": [ + "baselineProfiles/1/app-release.dm" + ] + }, + { + "minApi": 31, + "maxApi": 2147483647, + "baselineProfiles": [ + "baselineProfiles/0/app-release.dm" + ] + } + ], + "minSdkVersionForDexing": 24 +} \ No newline at end of file diff --git a/app/src/main/assets/key/drug b/app/src/main/assets/key/drug new file mode 100644 index 0000000..12939b7 Binary files /dev/null and b/app/src/main/assets/key/drug differ diff --git a/app/src/main/java/com/approagency/drug/navigation/BottomBar.kt b/app/src/main/java/com/approagency/drug/navigation/BottomBar.kt index c9821d6..841493b 100644 --- a/app/src/main/java/com/approagency/drug/navigation/BottomBar.kt +++ b/app/src/main/java/com/approagency/drug/navigation/BottomBar.kt @@ -17,6 +17,8 @@ import androidx.compose.foundation.layout.width import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Build +import androidx.compose.material.icons.filled.LocalPharmacy +import androidx.compose.material.icons.filled.Science import androidx.compose.material.icons.filled.Search import androidx.compose.material.icons.rounded.Refresh import androidx.compose.material3.Icon @@ -42,9 +44,9 @@ import androidx.navigation.compose.currentBackStackEntryAsState fun BottomBar(navController: NavHostController) { val items = listOf( - Triple("home", "دارو", Icons.Default.Search), - Triple("search", "سرچ", Icons.Rounded.Refresh), - Triple("lab", "آزمایش", Icons.Default.Build) + Triple("home", "عمومی", Icons.Filled.LocalPharmacy), + Triple("search", "جستجو",Icons.Filled.Search), + Triple("lab", "آزمایش", Icons.Filled.Science) ) val navBackStackEntry by navController.currentBackStackEntryAsState() diff --git a/app/src/main/java/com/approagency/drug/presentation/common/CustomTextFilled.kt b/app/src/main/java/com/approagency/drug/presentation/common/CustomTextFilled.kt index b30bbd8..f377c21 100644 --- a/app/src/main/java/com/approagency/drug/presentation/common/CustomTextFilled.kt +++ b/app/src/main/java/com/approagency/drug/presentation/common/CustomTextFilled.kt @@ -47,7 +47,7 @@ fun CustomTextFilled( showClearButton: Boolean = true, showSearchButton: Boolean = true, autoSearch: Boolean = false, - searchDelay: Long = 500L, + searchDelay: Long = 1200L, keyboardOptions: KeyboardOptions = KeyboardOptions( imeAction = ImeAction.Search ), diff --git a/app/src/main/java/com/approagency/drug/presentation/screens/HomeScreen.kt b/app/src/main/java/com/approagency/drug/presentation/screens/HomeScreen.kt index 465f900..a8864b5 100644 --- a/app/src/main/java/com/approagency/drug/presentation/screens/HomeScreen.kt +++ b/app/src/main/java/com/approagency/drug/presentation/screens/HomeScreen.kt @@ -140,32 +140,32 @@ fun HomeContent( Column ( verticalArrangement = Arrangement.Center ){ - CustomTextFilled( - value = searchText, - onValueChange = { searchText = it }, - onSearch = { query -> - if (query.isNotBlank()) { - onSearch(query) - } - }, - placeholder = "جستجوی دارو", - showClearButton = true, - showSearchButton = true, - autoSearch = false, // Set to true if you want search while typing - height = 45 - ) - Spacer(modifier = Modifier.height(MaterialTheme.dime.xs)) - PrimaryButton( - text = "جستجو", - height = 40, - isLoading = state.drugSearchState.isLoading, - onClick = { - if (searchText.isNotBlank()) { - onSearch(searchText) - } - } - ) - Spacer(modifier = Modifier.height(MaterialTheme.dime.xs)) +// CustomTextFilled( +// value = searchText, +// onValueChange = { searchText = it }, +// onSearch = { query -> +// if (query.isNotBlank()) { +// onSearch(query) +// } +// }, +// placeholder = "جستجوی دارو", +// showClearButton = true, +// showSearchButton = true, +// autoSearch = false, // Set to true if you want search while typing +// height = 45 +// ) +// Spacer(modifier = Modifier.height(MaterialTheme.dime.xs)) +// PrimaryButton( +// text = "جستجو", +// height = 40, +// isLoading = state.drugSearchState.isLoading, +// onClick = { +// if (searchText.isNotBlank()) { +// onSearch(searchText) +// } +// } +// ) +// Spacer(modifier = Modifier.height(MaterialTheme.dime.xs)) Box(modifier = Modifier.fillMaxSize()) { // Always draw the data if available diff --git a/app/src/main/java/com/approagency/drug/presentation/screens/SearchScreen.kt b/app/src/main/java/com/approagency/drug/presentation/screens/SearchScreen.kt index 29bc1b5..47403a2 100644 --- a/app/src/main/java/com/approagency/drug/presentation/screens/SearchScreen.kt +++ b/app/src/main/java/com/approagency/drug/presentation/screens/SearchScreen.kt @@ -110,7 +110,7 @@ fun SearchScreen( placeholder = "جستجوی دارو", showClearButton = true, showSearchButton = true, - autoSearch = false, + autoSearch = true, height = 45 ) Spacer(modifier = Modifier.height(MaterialTheme.dime.xs)) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6247af0..812d583 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -22,6 +22,7 @@ navigationCompose = "2.8.5" material3 = "1.4.0" jsoup = "1.18.3" scalars = "2.11.0" +iconExtend="1.7.8" [libraries] jsoup = { module = "org.jsoup:jsoup", version.ref = "jsoup" } androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } @@ -39,7 +40,7 @@ androidx-compose-ui-test-manifest = { group = "androidx.compose.ui", name = "ui- androidx-compose-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" } androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3" } androidx-compose-material-icons-core = { group = "androidx.compose.material", name = "material-icons-core" } - +androidx-compose-material-icons-extended = {module ="androidx.compose.material:material-icons-extended", name="material-icons-extended" , version.ref = "iconExtend"} androidx-lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycleRuntimeKtx" } koin-android = { module = "io.insert-koin:koin-android", version.ref = "koinAndroid" } koin-androidx-compose-v410 = { module = "io.insert-koin:koin-androidx-compose", version.ref = "koinAndroidxCompose" }