├── .DS_Store ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── android.yml │ ├── build.yml │ └── master-apk-create.yml ├── .gitignore ├── .idea ├── .gitignore ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── deploymentTargetDropDown.xml ├── kotlinScripting.xml └── kotlinc.xml ├── LICENSE ├── README.md ├── animations ├── canvas │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── guru │ │ └── composecookbook │ │ └── canvas │ │ ├── MultiStateAnimationCircleFilledCanvas.kt │ │ └── MultiStateAnimationCircleStrokeCanvas.kt └── lottie │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ └── main │ ├── AndroidManifest.xml │ ├── assets │ ├── cryptoload.json │ ├── food.json │ ├── loader.json │ ├── profile.json │ ├── success.json │ └── working.json │ └── java │ └── com │ └── guru │ └── composecookbook │ └── lottie │ ├── LottieCryptoLoadingView.kt │ ├── LottieFoodView.kt │ ├── LottieLoaderLoadingView.kt │ ├── LottieLoadingView.kt │ └── LottieWorkingLoadingView.kt ├── app ├── .gitignore ├── build.gradle.kts ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── guru │ │ └── composecookbook │ │ ├── BottomNavigationBarTests.kt │ │ └── ui │ │ └── home │ │ ├── HomeScreenTest.kt │ │ └── home_screen_options │ │ ├── GridListTest.kt │ │ ├── HorizontalListTest.kt │ │ ├── LayoutsTest.kt │ │ ├── VerticalListTest.kt │ │ └── flings │ │ ├── FlingListActivityTest.kt │ │ └── FlingSettingsPageTest.kt │ ├── debug │ └── AndroidManifest.xml │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ ├── t1.mp4 │ │ ├── t2.mp4 │ │ └── t3.mp4 │ ├── java │ │ └── com │ │ │ └── guru │ │ │ └── composecookbook │ │ │ ├── App.kt │ │ │ ├── BottomNavType.kt │ │ │ ├── MainActivity.kt │ │ │ ├── theme │ │ │ ├── AppThemeState.kt │ │ │ └── SystemUI.kt │ │ │ └── ui │ │ │ ├── animation │ │ │ ├── AnimatableSuspendingAnimations.kt │ │ │ ├── AnimateAsStateAnimations.kt │ │ │ ├── AnimationScreen.kt │ │ │ ├── TransitionsAnimations.kt │ │ │ └── VisibilityAnimations.kt │ │ │ ├── demoapps │ │ │ └── DemoUIList.kt │ │ │ ├── home │ │ │ ├── HomeScreen.kt │ │ │ ├── advancelists │ │ │ │ ├── AdvanceListsActivity.kt │ │ │ │ ├── AnimatedLists.kt │ │ │ │ ├── LoadingShimmerList.kt │ │ │ │ ├── Shimmer.kt │ │ │ │ └── SwipeableLists.kt │ │ │ ├── androidviews │ │ │ │ └── AndroidViews.kt │ │ │ ├── clock │ │ │ │ ├── ClockDemo.kt │ │ │ │ ├── ClockView.kt │ │ │ │ └── ClockViewModel.kt │ │ │ ├── constraintlayout │ │ │ │ └── ConstraintLayoutDemos.kt │ │ │ ├── customfling │ │ │ │ ├── FlingListActivity.kt │ │ │ │ ├── FlingListSettingsActivity.kt │ │ │ │ ├── FlingListViewTypes.kt │ │ │ │ ├── FlingStateStore.kt │ │ │ │ ├── ListItemDivider.kt │ │ │ │ ├── SettingsPage.kt │ │ │ │ ├── VerticalFlingerList.kt │ │ │ │ └── VerticalFlingerListItem.kt │ │ │ ├── dialogs │ │ │ │ ├── BottomSheetLayouts.kt │ │ │ │ ├── DialogState.kt │ │ │ │ ├── DialogType.kt │ │ │ │ └── DialogsActivity.kt │ │ │ ├── dynamic │ │ │ │ ├── DynamicUIActivity.kt │ │ │ │ ├── DynamicUiType.kt │ │ │ │ └── Modifiers.kt │ │ │ ├── lists │ │ │ │ ├── GridListItem.kt │ │ │ │ ├── HorizontalListItem.kt │ │ │ │ ├── ListViewActivity.kt │ │ │ │ ├── ListViewType.kt │ │ │ │ ├── VerticalListItem.kt │ │ │ │ └── VerticalListItemSmall.kt │ │ │ ├── motionlayout │ │ │ │ └── MotionLayoutDemo.kt │ │ │ ├── pullrefreshdemos │ │ │ │ └── PullRefreshList.kt │ │ │ ├── tabslayout │ │ │ │ └── TabLayout.kt │ │ │ └── timer │ │ │ │ ├── TimerDemo.kt │ │ │ │ ├── TimerView.kt │ │ │ │ ├── TimerViewAnimation.kt │ │ │ │ └── TimerViewModel.kt │ │ │ ├── learnwidgets │ │ │ ├── AllButtons.kt │ │ │ ├── AppBars.kt │ │ │ ├── Chips.kt │ │ │ ├── Layouts.kt │ │ │ ├── Loaders.kt │ │ │ ├── Snackbars.kt │ │ │ ├── SwipeButton.kt │ │ │ ├── TextInputs.kt │ │ │ ├── Texts.kt │ │ │ ├── Toggles.kt │ │ │ ├── UICards.kt │ │ │ └── WidgetScreen.kt │ │ │ ├── templates │ │ │ ├── TemplateScreen.kt │ │ │ └── TemplatesActivity.kt │ │ │ └── utils │ │ │ ├── CommomComponents.kt │ │ │ ├── Extentions.kt │ │ │ ├── FloatUtil.kt │ │ │ └── TestTags.kt │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ ├── heart_grey.png │ │ ├── heart_red.png │ │ ├── ic_baseline_access_time_24.xml │ │ └── ic_launcher_background.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ └── strings.xml │ └── test │ └── java │ └── com │ └── guru │ └── composecookbook │ └── ui │ └── home │ └── HomeScreenItemsTest.kt ├── build.gradle.kts ├── buildSrc ├── build.gradle.kts └── src │ └── main │ └── kotlin │ ├── com │ └── guru │ │ └── composecookbook │ │ └── build │ │ ├── configurations │ │ └── ProjectConfigs.kt │ │ └── dependencies │ │ ├── Dependencies.kt │ │ ├── DependencyHandlerExtensions.kt │ │ ├── GroupedDependencies.kt │ │ └── Versions.kt │ ├── common-compose-module-configs-script-plugin.gradle.kts │ └── common-kotlin-module-configs-script-plugin.gradle.kts ├── components ├── carousel │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── guru │ │ └── composecookbook │ │ └── carousel │ │ ├── CarouselDot.kt │ │ ├── CarouselLayout.kt │ │ ├── PageData.kt │ │ ├── Pager.kt │ │ ├── PagerScope.kt │ │ ├── PagerState.kt │ │ └── SelectionState.kt ├── charts │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── guru │ │ └── composecookbook │ │ └── charts │ │ └── Charts.kt ├── colorpicker │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── guru │ │ └── composecookbook │ │ └── colorpicker │ │ └── ColorPicker.kt ├── comingsoon │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── guru │ │ └── composecookbook │ │ └── comingsoon │ │ └── ComingSoon.kt ├── fab │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── guru │ │ └── composecookbook │ │ └── fab │ │ └── AnimatingFabContent.kt ├── tags │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── guru │ │ └── composecookbook │ │ └── tags │ │ └── InterestTag.kt └── verticalgrid │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── guru │ └── composecookbook │ └── verticalgrid │ ├── StaggeredVerticalGrid.kt │ └── VerticalGrid.kt ├── data ├── .gitignore ├── build.gradle.kts └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── guru │ │ └── composecookbook │ │ └── data │ │ ├── AlbumsDataProvider.kt │ │ ├── DemoDataProvider.kt │ │ └── model │ │ ├── Album.kt │ │ ├── HomeScreenItems.kt │ │ ├── Item.kt │ │ └── Tweet.kt │ └── res │ └── drawable-nodpi │ ├── adele.jpeg │ ├── adele21.jpeg │ ├── billie.jpg │ ├── bp.jpg │ ├── camelia.jpeg │ ├── dancemonkey.jpg │ ├── dualipa.jpeg │ ├── ed2.jpg │ ├── edsheeran.jpeg │ ├── eminem.jpeg │ ├── food1.jpg │ ├── food10.jpg │ ├── food11.webp │ ├── food12.webp │ ├── food13.webp │ ├── food14.jpg │ ├── food15.webp │ ├── food16.jpg │ ├── food2.jpg │ ├── food3.jpg │ ├── food4.jpg │ ├── food5.webp │ ├── food6.jpg │ ├── food7.webp │ ├── food8.webp │ ├── food9.jpg │ ├── imagindragon.jpg │ ├── james.jpg │ ├── katy.jpg │ ├── khalid.png │ ├── lana.jpeg │ ├── marsh.jpg │ ├── p1.jpeg │ ├── p10.jpeg │ ├── p11.jpeg │ ├── p2.jpeg │ ├── p3.jpeg │ ├── p4.jpeg │ ├── p5.jpeg │ ├── p6.jpeg │ ├── p7.jpeg │ ├── p8.jpeg │ ├── p9.jpeg │ ├── sam.jpeg │ ├── shawn.jpeg │ ├── tylor.jpeg │ ├── weekend.jpeg │ └── wolves.jpg ├── demos ├── betty │ ├── .gitignore │ ├── README.md │ ├── app │ │ ├── .gitignore │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── androidTest │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── adwi │ │ │ │ └── betty │ │ │ │ └── ExampleInstrumentedTest.kt │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── ic_launcher-playstore.png │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── adwi │ │ │ │ │ └── betty │ │ │ │ │ ├── BettyApp.kt │ │ │ │ │ ├── data │ │ │ │ │ ├── local │ │ │ │ │ │ ├── BettyDatabase.kt │ │ │ │ │ │ ├── dao │ │ │ │ │ │ │ └── OddsDao.kt │ │ │ │ │ │ └── entity │ │ │ │ │ │ │ └── Odd.kt │ │ │ │ │ ├── remote │ │ │ │ │ │ ├── OddsApi.kt │ │ │ │ │ │ └── dto │ │ │ │ │ │ │ ├── MatchDto.kt │ │ │ │ │ │ │ └── SportKey.kt │ │ │ │ │ └── repository │ │ │ │ │ │ ├── OddsRepository.kt │ │ │ │ │ │ └── OddsRepositoryInterface.kt │ │ │ │ │ ├── di │ │ │ │ │ ├── AppModule.kt │ │ │ │ │ ├── DispatcherModule.kt │ │ │ │ │ ├── LocalModule.kt │ │ │ │ │ ├── NetworkModule.kt │ │ │ │ │ └── ViewModelModule.kt │ │ │ │ │ ├── ui │ │ │ │ │ ├── base │ │ │ │ │ │ ├── BaseActivity.kt │ │ │ │ │ │ └── BaseViewModel.kt │ │ │ │ │ ├── components │ │ │ │ │ │ ├── AnimatedView.kt │ │ │ │ │ │ ├── Header.kt │ │ │ │ │ │ ├── List.kt │ │ │ │ │ │ └── Scaffold.kt │ │ │ │ │ ├── home │ │ │ │ │ │ └── Home.kt │ │ │ │ │ ├── main │ │ │ │ │ │ ├── MainActivity.kt │ │ │ │ │ │ └── MainViewModel.kt │ │ │ │ │ └── theme │ │ │ │ │ │ ├── Color.kt │ │ │ │ │ │ ├── Shape.kt │ │ │ │ │ │ ├── Theme.kt │ │ │ │ │ │ └── Type.kt │ │ │ │ │ ├── util │ │ │ │ │ ├── Constants.kt │ │ │ │ │ ├── Extensions.kt │ │ │ │ │ ├── ModifierExtensions.kt │ │ │ │ │ ├── NetworkBoundResource.kt │ │ │ │ │ ├── NotificationUtil.kt │ │ │ │ │ └── Resource.kt │ │ │ │ │ └── work │ │ │ │ │ ├── FetchFreshDataWork.kt │ │ │ │ │ └── SetupNotificationsWork.kt │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ ├── ic_fire_animated.png │ │ │ │ ├── ic_launcher_foreground.xml │ │ │ │ └── ic_refresh.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── raw │ │ │ │ ├── emoji.json │ │ │ │ ├── fire.json │ │ │ │ ├── loading.json │ │ │ │ ├── no_results.json │ │ │ │ └── ok.json │ │ │ │ ├── values-night │ │ │ │ └── themes.xml │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ ├── strings.xml │ │ │ │ └── themes.xml │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── adwi │ │ │ └── betty │ │ │ ├── TestCoroutineRule.kt │ │ │ ├── fake │ │ │ └── FakeRepository.kt │ │ │ └── ui │ │ │ └── main │ │ │ └── MainViewModelTest.kt │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── screenshots │ │ └── betty.gif │ └── settings.gradle ├── cryptoapp │ ├── app │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── guru │ │ │ │ └── composecookbook │ │ │ │ └── cryptoapp │ │ │ │ └── ui │ │ │ │ ├── composewear │ │ │ │ └── AndroidWearActivity.kt │ │ │ │ ├── detail │ │ │ │ ├── CryptoDetailActivity.kt │ │ │ │ ├── CryptoDetailViewModel.kt │ │ │ │ └── components │ │ │ │ │ ├── CryptoDetailScreen.kt │ │ │ │ │ └── FavoriteCryptoCard.kt │ │ │ │ ├── home │ │ │ │ ├── CryptoHomeActivity.kt │ │ │ │ ├── CryptoHomeViewModel.kt │ │ │ │ └── components │ │ │ │ │ ├── CryptoHomeScreen.kt │ │ │ │ │ ├── CryptoListItem.kt │ │ │ │ │ └── MyWalletCard.kt │ │ │ │ └── internal │ │ │ │ ├── extensions │ │ │ │ └── Extentions.kt │ │ │ │ └── theme │ │ │ │ └── Colors.kt │ │ │ └── res │ │ │ ├── values-round │ │ │ └── strings.xml │ │ │ └── values │ │ │ └── strings.xml │ └── data │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── guru │ │ └── composecookbook │ │ └── cryptoapp │ │ └── data │ │ ├── CryptoDemoDataProvider.kt │ │ ├── DemoDIGraph.kt │ │ ├── api │ │ ├── CryptoApi.kt │ │ ├── CryptoApiMapper.kt │ │ └── models │ │ │ ├── CryptoApiResponse.kt │ │ │ └── CryptoDetailResponse.kt │ │ ├── db │ │ ├── CryptoDatabase.kt │ │ ├── ListTypeConverter.kt │ │ ├── daos │ │ │ └── CryptoDao.kt │ │ └── models │ │ │ └── Crypto.kt │ │ ├── paging │ │ └── PageNumSource.kt │ │ └── repositories │ │ ├── CryptoRepository.kt │ │ └── CryptoRepositoryImpl.kt ├── datingapp │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── guru │ │ │ └── composecookbook │ │ │ └── datingapp │ │ │ ├── DatingHomeActivity.kt │ │ │ ├── DatingHomeViewModel.kt │ │ │ ├── components │ │ │ ├── chat │ │ │ │ ├── DatingChatItem.kt │ │ │ │ ├── DatingChatScreen.kt │ │ │ │ ├── MatchesImage.kt │ │ │ │ └── MatchesSections.kt │ │ │ ├── home │ │ │ │ ├── DatingHomeScreen.kt │ │ │ │ └── DraggableCard.kt │ │ │ └── profile │ │ │ │ └── ProfileScreen.kt │ │ │ └── util │ │ │ └── Extentions.kt │ │ └── res │ │ └── values │ │ └── strings.xml ├── gmail │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── guru │ │ │ └── composecookbook │ │ │ └── gmail │ │ │ ├── data │ │ │ └── SampleData.kt │ │ │ └── ui │ │ │ ├── GmailActivity.kt │ │ │ ├── create │ │ │ ├── CreateMessageBody.kt │ │ │ ├── CreateMessageMoreActionPopupMenu.kt │ │ │ └── CreateMessageScreen.kt │ │ │ ├── details │ │ │ ├── MessageDetailBody.kt │ │ │ └── MessageDetailScreen.kt │ │ │ └── home │ │ │ ├── GmailDrawer.kt │ │ │ ├── GmailHome.kt │ │ │ ├── GmailListItem.kt │ │ │ └── SearchLayout.kt │ │ └── res │ │ └── values │ │ └── strings.xml ├── instagram │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── guru │ │ │ └── composecookbook │ │ │ └── instagram │ │ │ ├── InstagramActivity.kt │ │ │ └── components │ │ │ ├── InstagramHome.kt │ │ │ ├── posts │ │ │ ├── PostImage.kt │ │ │ ├── PostInteractionBar.kt │ │ │ ├── PostItem.kt │ │ │ └── PostList.kt │ │ │ ├── profile │ │ │ ├── Profile.kt │ │ │ └── ProfileSection.kt │ │ │ └── stories │ │ │ ├── StoryItem.kt │ │ │ ├── StoryList.kt │ │ │ └── StoryPopup.kt │ │ └── res │ │ └── values │ │ └── strings.xml ├── meditation │ ├── .gitignore │ ├── build.gradle.kts │ ├── consumer-rules.pro │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── guru │ │ │ └── composecookbook │ │ │ └── meditation │ │ │ └── ExampleInstrumentedTest.kt │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── guru │ │ │ │ └── composecookbook │ │ │ │ └── meditation │ │ │ │ ├── MeditaionActivity.kt │ │ │ │ └── ui │ │ │ │ ├── component │ │ │ │ ├── BottomMenuItem.kt │ │ │ │ ├── CategoryItem.kt │ │ │ │ ├── DailyThoughtsItem.kt │ │ │ │ ├── FeatureItem.kt │ │ │ │ ├── RecommendationItem.kt │ │ │ │ └── TopicItem.kt │ │ │ │ ├── model │ │ │ │ ├── BottomMenuContent.kt │ │ │ │ ├── Categories.kt │ │ │ │ ├── DailyThought.kt │ │ │ │ ├── Feature.kt │ │ │ │ ├── Recommendation.kt │ │ │ │ └── Topic.kt │ │ │ │ ├── screen │ │ │ │ └── HomeScreen.kt │ │ │ │ ├── theme │ │ │ │ ├── Color.kt │ │ │ │ ├── Shape.kt │ │ │ │ ├── Theme.kt │ │ │ │ ├── Type.kt │ │ │ │ └── dimens.kt │ │ │ │ └── utils.kt │ │ └── res │ │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── drawable │ │ │ ├── ic_category_all.xml │ │ │ ├── ic_category_anxious.xml │ │ │ ├── ic_category_kids.xml │ │ │ ├── ic_category_my.xml │ │ │ ├── ic_category_sleep.xml │ │ │ ├── ic_daily_thoughts.xml │ │ │ ├── ic_feature_1.xml │ │ │ ├── ic_feature_2.xml │ │ │ ├── ic_home.xml │ │ │ ├── ic_launcher_background.xml │ │ │ ├── ic_logo.xml │ │ │ ├── ic_meditate.xml │ │ │ ├── ic_music.xml │ │ │ ├── ic_play.xml │ │ │ ├── ic_profile.xml │ │ │ ├── ic_recommendation_1.xml │ │ │ ├── ic_recommendation_2.xml │ │ │ ├── ic_sleep.xml │ │ │ ├── ic_topic_1.xml │ │ │ ├── ic_topic_2.xml │ │ │ ├── ic_topic_3.xml │ │ │ ├── ic_topic_4.xml │ │ │ ├── ic_topic_5.xml │ │ │ └── ic_topic_6.xml │ │ │ ├── font │ │ │ ├── sans_pro_black.ttf │ │ │ ├── sans_pro_bold.ttf │ │ │ ├── sans_pro_extra_light.ttf │ │ │ ├── sans_pro_light.ttf │ │ │ ├── sans_pro_regular.ttf │ │ │ └── sans_pro_semi_bold.ttf │ │ │ └── values │ │ │ └── strings.xml │ │ └── test │ │ └── java │ │ └── com │ │ └── guru │ │ └── composecookbook │ │ └── meditation │ │ └── ExampleUnitTest.kt ├── moviesapp │ ├── app │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── guru │ │ │ │ └── composecookbook │ │ │ │ └── moviesapp │ │ │ │ └── ui │ │ │ │ ├── details │ │ │ │ ├── MovieDetailActivity.kt │ │ │ │ ├── MovieDetailViewModel.kt │ │ │ │ └── components │ │ │ │ │ ├── GenreSection.kt │ │ │ │ │ ├── MovieDetailContent.kt │ │ │ │ │ └── SimilarMoviesSection.kt │ │ │ │ ├── home │ │ │ │ ├── MoviesHomeActivity.kt │ │ │ │ ├── MoviewsHomeViewModel.kt │ │ │ │ └── components │ │ │ │ │ ├── MoviePagerItem.kt │ │ │ │ │ ├── MoviesHomeScreen.kt │ │ │ │ │ └── MoviesPager.kt │ │ │ │ ├── internal │ │ │ │ └── theme │ │ │ │ │ └── Colors.kt │ │ │ │ ├── trending │ │ │ │ ├── TrendingViewModel.kt │ │ │ │ └── components │ │ │ │ │ ├── MovieTrendingScreen.kt │ │ │ │ │ └── MoviesLaneItem.kt │ │ │ │ └── watch │ │ │ │ └── components │ │ │ │ ├── EmptyWatchlistSection.kt │ │ │ │ ├── MovieWatchlistItem.kt │ │ │ │ └── WatchlistScreen.kt │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ └── data │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── guru │ │ └── composecookbook │ │ └── moviesapp │ │ └── data │ │ ├── DemoMovieDataProvider.kt │ │ ├── MovieDIGraph.kt │ │ ├── api │ │ ├── MovieApi.kt │ │ └── models │ │ │ ├── GenreApiResponse.kt │ │ │ └── MovieListResponse.kt │ │ ├── db │ │ ├── ListTypeConverter.kt │ │ ├── MovieDatabase.kt │ │ ├── daos │ │ │ ├── GenreDao.kt │ │ │ └── MoviesDao.kt │ │ └── models │ │ │ ├── Genre.kt │ │ │ └── Movie.kt │ │ └── repositories │ │ ├── MovieRepository.kt │ │ ├── MovieRepositoryImpl.kt │ │ ├── MoviesLaneRepositoryImpl.kt │ │ └── MoviesLanesRepository.kt ├── paint │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── guru │ │ │ └── composecookbook │ │ │ └── paint │ │ │ ├── DrawingCanvas.kt │ │ │ ├── DrawingTools.kt │ │ │ ├── PaintActivity.kt │ │ │ └── PaintApp.kt │ │ └── res │ │ └── values │ │ └── strings.xml ├── spotify │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── guru │ │ │ └── composecookbook │ │ │ └── spotify │ │ │ ├── data │ │ │ └── SpotifyDataProvider.kt │ │ │ └── ui │ │ │ ├── details │ │ │ ├── SpotifyDetailActivity.kt │ │ │ └── components │ │ │ │ ├── BoxTopSection.kt │ │ │ │ ├── SongListScrollingSection.kt │ │ │ │ ├── SpotifyDetailScreen.kt │ │ │ │ └── SpotifySongListItem.kt │ │ │ ├── home │ │ │ ├── SpotifyActivity.kt │ │ │ └── components │ │ │ │ ├── PlayerBottomBar.kt │ │ │ │ ├── SpotifyHome.kt │ │ │ │ ├── SpotifyHomeGridItem.kt │ │ │ │ └── SpotifyLaneItem.kt │ │ │ ├── playlist │ │ │ └── components │ │ │ │ └── SpotifyPlaylist.kt │ │ │ └── search │ │ │ └── components │ │ │ ├── SpotifySearchBar.kt │ │ │ ├── SpotifySearchGrid.kt │ │ │ └── SpotifySearchScreen.kt │ │ └── res │ │ └── values │ │ └── strings.xml ├── tiktok │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── guru │ │ │ └── composecookbook │ │ │ └── tiktok │ │ │ ├── TikTokScreen.kt │ │ │ ├── TiktokActivity.kt │ │ │ ├── TiktokDemoDataProvider.kt │ │ │ ├── TiktokHomeInteractionEvents.kt │ │ │ └── components │ │ │ ├── discovers │ │ │ ├── DiscoveryScreen.kt │ │ │ ├── LanesSection.kt │ │ │ ├── MediaItem.kt │ │ │ └── SearchSection.kt │ │ │ ├── home │ │ │ ├── HomeScreen.kt │ │ │ ├── TikTokPlayer.kt │ │ │ └── TiktokCreateIcon.kt │ │ │ └── profile │ │ │ ├── ProfileAppBar.kt │ │ │ ├── ProfileScreen.kt │ │ │ ├── ProfileTabs.kt │ │ │ └── ProfileTopSection.kt │ │ └── res │ │ └── values │ │ └── strings.xml ├── twitter │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── guru │ │ │ └── composecookbook │ │ │ └── twitter │ │ │ ├── TwitterActivity.kt │ │ │ └── components │ │ │ ├── TwitterHome.kt │ │ │ ├── icons │ │ │ ├── IconCounter.kt │ │ │ └── IconCounterBar.kt │ │ │ ├── profiles │ │ │ ├── ProfileInfo.kt │ │ │ └── ProfilePicture.kt │ │ │ └── tweets │ │ │ ├── TweetImage.kt │ │ │ └── TweetItem.kt │ │ └── res │ │ └── values │ │ └── strings.xml └── youtube │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── guru │ │ └── composecookbook │ │ └── youtube │ │ ├── YoutubeActivity.kt │ │ └── components │ │ ├── YoutubeChip.kt │ │ ├── YoutubeHome.kt │ │ └── YoutubeListItem.kt │ └── res │ └── values │ └── strings.xml ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── screens ├── .DS_Store ├── Screenshot_20200906-161500_ComposeDemo.jpg ├── Screenshot_20200906-161609_ComposeDemo.jpg ├── Screenshot_20200906-161629_ComposeDemo.jpg ├── Screenshot_20200907-001949_ComposeDemo.jpg ├── Screenshot_20200907-002000_ComposeDemo.jpg └── composelogo.png ├── settings.gradle.kts ├── templates ├── cascademenu │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── guru │ │ └── composecookbook │ │ └── cascademenu │ │ ├── CascadeScreen.kt │ │ └── cascade │ │ ├── CascadeMenu.kt │ │ ├── CascadeMenuBuilder.kt │ │ ├── CascadeMenuColors.kt │ │ ├── CascadeMenuItem.kt │ │ └── CascadeMenuState.kt ├── login │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── guru │ │ └── composecookbook │ │ └── login │ │ ├── HorizontalDottedProgressBar.kt │ │ └── LoginScreen.kt ├── onboarding │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── guru │ │ └── composecookbook │ │ └── onboarding │ │ ├── OnboardingPagerItem.kt │ │ ├── OnboardingPagerSlide.kt │ │ └── OnboardingScreen.kt ├── paymentcard │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── guru │ │ │ └── composecookbook │ │ │ └── paymentcard │ │ │ ├── AddPaymentScreen.kt │ │ │ ├── InputItem.kt │ │ │ ├── PaymentCard.kt │ │ │ └── PaymentCardFilter.kt │ │ └── res │ │ ├── drawable │ │ └── card_symbol.png │ │ └── values │ │ └── strings.xml ├── pinlock │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── guru │ │ │ └── pinlock │ │ │ ├── BiometricActivity.kt │ │ │ └── PinLockView.kt │ │ └── res │ │ └── values │ │ └── themes.xml └── profile │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── guru │ │ └── composecookbook │ │ └── profile │ │ ├── BottomScrollingContent.kt │ │ ├── InterestsSection.kt │ │ ├── MoreInfoSection.kt │ │ ├── MyPhotosSection.kt │ │ ├── ProfileScreen.kt │ │ ├── SocialRow.kt │ │ └── TopScrollingContent.kt │ └── res │ └── values │ └── strings.xml └── theme ├── .gitignore ├── build.gradle.kts └── src └── main ├── AndroidManifest.xml ├── java └── com │ └── guru │ └── composecookbook │ └── theme │ ├── Color.kt │ ├── MaterialTheme.kt │ ├── Shape.kt │ ├── Theme.kt │ ├── Type.kt │ ├── components │ └── Material3Card.kt │ ├── extensions │ └── BitmapExt.kt │ ├── helpers │ └── TextFieldDefaultsMaterial.kt │ └── modifiers │ └── ModifierExtentions.kt └── res ├── drawable ├── ic_baseline_home_24.xml ├── ic_bitcoin_brands.xml ├── ic_comment_dots_solid.xml ├── ic_ethereum_brands.xml ├── ic_github_square_brands.xml ├── ic_hashtag_solid.xml ├── ic_heart_solid.xml ├── ic_instagram.xml ├── ic_linkedin_brands.xml ├── ic_retweet_solid.xml ├── ic_send.xml ├── ic_share_solid.xml ├── ic_sleep.xml ├── ic_speech_bubble.xml ├── ic_twitter.xml ├── ic_twitter_square_brands.xml ├── ic_visa_logo.xml └── ic_youtube.xml ├── values-night └── themes.xml └── values ├── colors.xml └── themes.xml /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/.DS_Store -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/android.yml: -------------------------------------------------------------------------------- 1 | name: Android CI 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v2 16 | - name: set up JDK 1.8 17 | uses: actions/setup-java@v1 18 | with: 19 | java-version: 11 20 | - name: Grant execute permission for gradlew 21 | run: chmod +x gradlew 22 | - name: Build with Gradle 23 | run: ./gradlew build 24 | 25 | androidTests: 26 | 27 | runs-on: macos-latest 28 | 29 | steps: 30 | - name: checkout 31 | uses: actions/checkout@v2 32 | - name: set up JDK 1.8 33 | uses: actions/setup-java@v1 34 | with: 35 | java-version: 11 36 | - name: Compose UI tests 37 | uses: reactivecircus/android-emulator-runner@v2 38 | with: 39 | api-level: 29 40 | script: ./gradlew connectedCheck 41 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build APK 2 | 3 | on: 4 | 5 | push: 6 | branches: [ "master" ] 7 | pull_request: 8 | branches: [ "master" ] 9 | 10 | workflow_dispatch: 11 | 12 | 13 | jobs: 14 | 15 | build_job: 16 | name: Building the APK 17 | runs-on: ubuntu-latest 18 | continue-on-error: true 19 | steps: 20 | - name: Checkout 21 | uses: actions/checkout@v2 22 | - name: Restore Cache 23 | uses: actions/cache@v2 24 | with: 25 | path: | 26 | ~/.gradle/caches 27 | ~/.gradle/wrapper 28 | key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} 29 | restore-keys: | 30 | ${{ runner.os }}-gradle- 31 | - name: Change wrapper permissions 32 | run: chmod +x ./gradlew 33 | 34 | 35 | - name: Touch local properties 36 | run: touch local.properties 37 | - name: Add Api Key 38 | run: echo "apiKey=\"\"" >> local.properties 39 | 40 | - name: Assemble Debug 41 | run: ./gradlew assembleDebug 42 | 43 | - name: Upload APK 44 | uses: actions/upload-artifact@v2 45 | with: 46 | name: ComposeCookBook 47 | path: app/build/outputs/apk/debug/**.apk 48 | -------------------------------------------------------------------------------- /.github/workflows/master-apk-create.yml: -------------------------------------------------------------------------------- 1 | name: Create APK from Main 2 | 3 | on: 4 | 5 | push: 6 | 7 | branches: 8 | 9 | - master 10 | 11 | jobs: 12 | 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | 19 | - uses: actions/checkout@v2 20 | 21 | - name: set up JDK 11 22 | 23 | uses: actions/setup-java@v2 24 | 25 | with: 26 | 27 | java-version: '11' 28 | 29 | distribution: 'temurin' 30 | 31 | cache: gradle 32 | 33 | - name: Grant execute permission for gradlew 34 | 35 | run: chmod +x gradlew 36 | 37 | 38 | 39 | - name: Build APK ⚙️🛠 40 | 41 | run: bash ./gradlew assembleDebug 42 | 43 | 44 | 45 | - uses: "marvinpinto/action-automatic-releases@latest" 46 | 47 | with: 48 | 49 | repo_token: "${{ github.token }}" 50 | 51 | automatic_release_tag: "latest-master" 52 | 53 | prerelease: true 54 | 55 | title: "Staging Build" 56 | 57 | files: app/build/outputs/apk/debug/app-debug.apk 58 | 59 | 60 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/deploymentTargetDropDown.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /.idea/kotlinScripting.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/kotlinc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Gurupreet Singh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /animations/canvas/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /animations/canvas/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies 2 | 3 | plugins { 4 | /** 5 | * See [common-compose-module-configs-script-plugin.gradle.kts] file 6 | */ 7 | id("common-compose-module-configs-script-plugin") 8 | } 9 | 10 | dependencies { 11 | implementation(project(":theme")) 12 | addComposeOfficialDependencies() 13 | } 14 | -------------------------------------------------------------------------------- /animations/canvas/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /animations/lottie/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /animations/lottie/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies 2 | import com.guru.composecookbook.build.dependencies.addCoreAndroidDependencies 3 | import com.guru.composecookbook.build.dependencies.addThirdPartyUiDependencies 4 | 5 | plugins { 6 | /** 7 | * See [common-compose-module-configs-script-plugin.gradle.kts] file 8 | */ 9 | id("common-compose-module-configs-script-plugin") 10 | } 11 | 12 | dependencies { 13 | addComposeOfficialDependencies() 14 | addCoreAndroidDependencies() 15 | addThirdPartyUiDependencies() 16 | } 17 | -------------------------------------------------------------------------------- /animations/lottie/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /animations/lottie/src/main/java/com/guru/composecookbook/lottie/LottieCryptoLoadingView.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.lottie 2 | 3 | import android.content.Context 4 | import androidx.compose.foundation.layout.fillMaxWidth 5 | import androidx.compose.foundation.layout.height 6 | import androidx.compose.runtime.Composable 7 | import androidx.compose.ui.Modifier 8 | import androidx.compose.ui.unit.dp 9 | 10 | @Composable 11 | fun LottieCryptoLoadingView(context: Context) { 12 | LottieLoadingView( 13 | context = context, 14 | file = "cryptoload.json", 15 | modifier = Modifier 16 | .fillMaxWidth() 17 | .height(150.dp) 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /animations/lottie/src/main/java/com/guru/composecookbook/lottie/LottieFoodView.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.lottie 2 | 3 | import android.content.Context 4 | import androidx.compose.foundation.layout.fillMaxWidth 5 | import androidx.compose.foundation.layout.height 6 | import androidx.compose.runtime.Composable 7 | import androidx.compose.ui.Modifier 8 | import androidx.compose.ui.unit.dp 9 | 10 | @Composable 11 | fun LottieFoodView(context: Context) { 12 | LottieLoadingView( 13 | context = context, 14 | file = "food.json", 15 | modifier = Modifier 16 | .fillMaxWidth() 17 | .height(200.dp) 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /animations/lottie/src/main/java/com/guru/composecookbook/lottie/LottieLoaderLoadingView.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.lottie 2 | 3 | import android.content.Context 4 | import androidx.compose.foundation.layout.fillMaxWidth 5 | import androidx.compose.foundation.layout.height 6 | import androidx.compose.runtime.Composable 7 | import androidx.compose.ui.Modifier 8 | import androidx.compose.ui.unit.dp 9 | 10 | @Composable 11 | fun LottieLoaderLoadingView(context: Context) { 12 | LottieLoadingView( 13 | context = context, 14 | file = "loader.json", 15 | modifier = Modifier 16 | .fillMaxWidth() 17 | .height(200.dp) 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /animations/lottie/src/main/java/com/guru/composecookbook/lottie/LottieWorkingLoadingView.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.lottie 2 | 3 | import android.content.Context 4 | import androidx.compose.foundation.layout.fillMaxWidth 5 | import androidx.compose.foundation.layout.height 6 | import androidx.compose.runtime.Composable 7 | import androidx.compose.ui.Modifier 8 | import androidx.compose.ui.unit.dp 9 | 10 | @Composable 11 | fun LottieWorkingLoadingView(context: Context) { 12 | LottieLoadingView( 13 | context = context, 14 | file = "working.json", 15 | modifier = Modifier 16 | .fillMaxWidth() 17 | .height(250.dp) 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | 17 | *.swp 18 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle.kts. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging Box traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/assets/t1.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/app/src/main/assets/t1.mp4 -------------------------------------------------------------------------------- /app/src/main/assets/t2.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/app/src/main/assets/t2.mp4 -------------------------------------------------------------------------------- /app/src/main/assets/t3.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/app/src/main/assets/t3.mp4 -------------------------------------------------------------------------------- /app/src/main/java/com/guru/composecookbook/App.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook 2 | 3 | import android.app.Application 4 | import android.content.Context 5 | 6 | class App : Application() { 7 | 8 | init { 9 | instance = requireNotNull(this) 10 | } 11 | 12 | companion object { 13 | private lateinit var instance: App 14 | 15 | fun applicationContext(): Context { 16 | return instance 17 | } 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /app/src/main/java/com/guru/composecookbook/BottomNavType.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook 2 | 3 | enum class BottomNavType { 4 | HOME, 5 | WIDGETS, 6 | ANIMATION, 7 | DEMOUI, 8 | TEMPLATE 9 | } -------------------------------------------------------------------------------- /app/src/main/java/com/guru/composecookbook/theme/AppThemeState.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.theme 2 | 3 | data class AppThemeState( 4 | var darkTheme: Boolean = false, 5 | var pallet: ColorPallet = ColorPallet.GREEN 6 | ) -------------------------------------------------------------------------------- /app/src/main/java/com/guru/composecookbook/ui/home/customfling/FlingListViewTypes.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.ui.home.customfling 2 | 3 | /** 4 | * @author https://github.com/iamjosephmj 5 | */ 6 | enum class FlingListViewTypes(type: Int) { 7 | // Renders list with native scroll behaviour 8 | NATIVE(0), 9 | 10 | // Renders list with Smooth Scroll behaviour 11 | SMOOTH(1), 12 | 13 | // Custom values set by user. 14 | CUSTOM(2), 15 | } -------------------------------------------------------------------------------- /app/src/main/java/com/guru/composecookbook/ui/home/customfling/ListItemDivider.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.ui.home.customfling 2 | 3 | import androidx.compose.foundation.layout.padding 4 | import androidx.compose.material.Divider 5 | import androidx.compose.material3.MaterialTheme 6 | import androidx.compose.runtime.Composable 7 | import androidx.compose.ui.Modifier 8 | import androidx.compose.ui.unit.dp 9 | 10 | /** 11 | * @author https://github.com/iamjosephmj 12 | */ 13 | @Composable 14 | fun ListItemDivider() { 15 | Divider( 16 | modifier = Modifier.padding(horizontal = 12.dp, vertical = 12.dp), 17 | color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.08f) 18 | ) 19 | } -------------------------------------------------------------------------------- /app/src/main/java/com/guru/composecookbook/ui/home/dialogs/DialogState.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.ui.home.dialogs 2 | 3 | data class DialogState(var showDialog: Boolean, var dialogType: DialogType) -------------------------------------------------------------------------------- /app/src/main/java/com/guru/composecookbook/ui/home/dialogs/DialogType.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.ui.home.dialogs 2 | 3 | enum class DialogType { 4 | SIMPLE, TITLE, VERTICALBUTTON, IMAGE, LONGDIALOG, ROUNDED, DATEPICKER, TIMEPICKER 5 | } -------------------------------------------------------------------------------- /app/src/main/java/com/guru/composecookbook/ui/home/dynamic/DynamicUiType.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.ui.home.dynamic 2 | 3 | enum class DynamicUiType { 4 | TABS, 5 | BOTTOMSHEET, 6 | LAYOUTS, 7 | CONSTRAINTLAYOUT, 8 | CAROUSELL, 9 | MODIFIERS, 10 | ANDROIDVIEWS, 11 | PULLRERESH, 12 | MOTIONLAYOUT 13 | } -------------------------------------------------------------------------------- /app/src/main/java/com/guru/composecookbook/ui/home/lists/ListViewType.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.ui.home.lists 2 | 3 | enum class ListViewType(string: String) { 4 | VERTICAL("Vertical"), 5 | HORIZONTAL("Horizontal"), 6 | GRID("Grid"), 7 | MIX("Vertical+Horizontal") 8 | } -------------------------------------------------------------------------------- /app/src/main/java/com/guru/composecookbook/ui/home/timer/TimerViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.ui.home.timer 2 | 3 | import androidx.lifecycle.ViewModel 4 | import androidx.lifecycle.viewModelScope 5 | import kotlinx.coroutines.delay 6 | import kotlinx.coroutines.flow.MutableStateFlow 7 | import kotlinx.coroutines.flow.StateFlow 8 | import kotlinx.coroutines.launch 9 | import java.util.* 10 | 11 | class TimerViewModel : ViewModel() { 12 | 13 | private val todayMax = Calendar.getInstance().apply { 14 | set(Calendar.HOUR_OF_DAY, 23) 15 | set(Calendar.MINUTE, 59) 16 | set(Calendar.SECOND, 59) 17 | }.timeInMillis 18 | 19 | private val _timerState = MutableStateFlow( 20 | TimerData(todayMax.minus(Calendar.getInstance().timeInMillis)) 21 | ) 22 | val timerState: StateFlow = _timerState 23 | 24 | init { 25 | initTimer() 26 | } 27 | 28 | private fun initTimer() { 29 | viewModelScope.launch { 30 | while (true) { 31 | val next = timerState.value.millis.minus(1000) 32 | _timerState.emit(timerState.value.copy(millis = next)) 33 | delay(1000L) 34 | } 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /app/src/main/java/com/guru/composecookbook/ui/learnwidgets/Loaders.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.ui.learnwidgets 2 | 3 | import androidx.compose.foundation.layout.Column 4 | import androidx.compose.foundation.layout.Row 5 | import androidx.compose.foundation.layout.fillMaxWidth 6 | import androidx.compose.foundation.layout.padding 7 | import androidx.compose.material.CircularProgressIndicator 8 | import androidx.compose.material.LinearProgressIndicator 9 | import androidx.compose.material3.Text 10 | import androidx.compose.runtime.Composable 11 | import androidx.compose.ui.Alignment 12 | import androidx.compose.ui.Modifier 13 | import androidx.compose.ui.unit.dp 14 | import com.guru.composecookbook.theme.typography 15 | 16 | @Composable 17 | fun Loaders() { 18 | Text(text = "Progress bars", style = typography.h6, modifier = Modifier.padding(8.dp)) 19 | 20 | Row(modifier = Modifier.padding(8.dp)) { 21 | LinearProgressIndicator() 22 | CircularProgressIndicator() 23 | CircularProgressIndicator(strokeWidth = 8.dp) 24 | } 25 | 26 | Column( 27 | modifier = Modifier 28 | .fillMaxWidth() 29 | .padding(16.dp), 30 | horizontalAlignment = Alignment.CenterHorizontally 31 | ) { 32 | LinearProgressIndicator() 33 | Text(text = "Loading with text...", modifier = Modifier.padding(8.dp)) 34 | } 35 | 36 | 37 | } -------------------------------------------------------------------------------- /app/src/main/java/com/guru/composecookbook/ui/utils/Extentions.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.ui.utils 2 | 3 | fun Boolean?.orFalse(): Boolean = this ?: false 4 | -------------------------------------------------------------------------------- /app/src/main/java/com/guru/composecookbook/ui/utils/FloatUtil.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.ui.utils 2 | 3 | import android.text.TextUtils 4 | 5 | /** 6 | * This is a util class that is created to help the editTexts to convert string values into float. 7 | */ 8 | fun String.toFloatNum(): Float { 9 | return if (isNotEmpty() && length == 1 && 10 | TextUtils.equals(get(0).toString(), ".") 11 | ) { 12 | "0.".toFloat() 13 | } else if (isEmpty()) { 14 | "0".toFloat() 15 | } else { 16 | toFloat() 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/heart_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/app/src/main/res/drawable/heart_grey.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/heart_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/app/src/main/res/drawable/heart_red.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_access_time_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /build.gradle.kts: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | mavenCentral() 4 | google() 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath("com.android.tools.build:gradle:7.2.2") 9 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10") 10 | } 11 | } 12 | 13 | allprojects { 14 | repositories { 15 | mavenCentral() 16 | google() 17 | maven(url = "https://jitpack.io") 18 | jcenter() 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /buildSrc/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | `kotlin-dsl` 3 | `kotlin-dsl-precompiled-script-plugins` 4 | } 5 | 6 | sourceSets { 7 | main { 8 | java { 9 | setSrcDirs(listOf("src")) 10 | } 11 | } 12 | } 13 | 14 | buildscript { 15 | 16 | repositories { 17 | mavenLocal() 18 | mavenCentral() 19 | google() 20 | } 21 | 22 | dependencies { 23 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10") 24 | } 25 | } 26 | 27 | 28 | repositories { 29 | mavenLocal() 30 | mavenCentral() 31 | google() 32 | } 33 | 34 | dependencies { 35 | // in order to be able to use "kotlin-android" in the common script 36 | implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10") 37 | 38 | // in order to recognize the "plugins" block in the common script 39 | implementation("com.android.tools.build:gradle:7.2.2") 40 | 41 | // in order to recognize the "android" block in the common script 42 | implementation("com.android.tools.build:gradle-api:7.2.2") 43 | } 44 | -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/com/guru/composecookbook/build/configurations/ProjectConfigs.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.build.configurations 2 | 3 | import com.guru.composecookbook.build.dependencies.Versions 4 | 5 | object ProjectConfigs { 6 | const val compileSdkVersion = 33 7 | const val minSdkVersion = 25 8 | const val targetSdkVersion = 30 9 | const val applicationId = "com.guru.composecookbook" 10 | const val kotlinCompilerExtensionVersion = Versions.composeCompiler 11 | } -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/common-compose-module-configs-script-plugin.gradle.kts: -------------------------------------------------------------------------------- 1 | import com.guru.composecookbook.build.configurations.ProjectConfigs 2 | 3 | plugins { 4 | id("com.android.library") 5 | id("kotlin-android") 6 | } 7 | 8 | android { 9 | compileSdk = ProjectConfigs.compileSdkVersion 10 | 11 | defaultConfig { 12 | minSdk = ProjectConfigs.minSdkVersion 13 | targetSdk = ProjectConfigs.targetSdkVersion 14 | } 15 | 16 | compileOptions { 17 | sourceCompatibility = JavaVersion.VERSION_1_8 18 | targetCompatibility = JavaVersion.VERSION_1_8 19 | } 20 | kotlinOptions { 21 | jvmTarget = "1.8" 22 | freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.RequiresOptIn" 23 | } 24 | buildFeatures { 25 | compose = true 26 | } 27 | composeOptions { 28 | kotlinCompilerExtensionVersion = ProjectConfigs.kotlinCompilerExtensionVersion 29 | } 30 | dexOptions { 31 | javaMaxHeapSize = "4G" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/common-kotlin-module-configs-script-plugin.gradle.kts: -------------------------------------------------------------------------------- 1 | import com.guru.composecookbook.build.configurations.ProjectConfigs 2 | 3 | plugins { 4 | id("com.android.library") 5 | id("kotlin-android") 6 | id("kotlin-kapt") 7 | } 8 | 9 | android { 10 | compileSdk = ProjectConfigs.compileSdkVersion 11 | 12 | defaultConfig { 13 | minSdk = ProjectConfigs.minSdkVersion 14 | targetSdk = ProjectConfigs.targetSdkVersion 15 | } 16 | 17 | compileOptions { 18 | sourceCompatibility = JavaVersion.VERSION_1_8 19 | targetCompatibility = JavaVersion.VERSION_1_8 20 | } 21 | kotlinOptions { 22 | jvmTarget = "1.8" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /components/carousel/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /components/carousel/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies 2 | 3 | plugins { 4 | /** 5 | * See [common-compose-module-configs-script-plugin.gradle.kts] file 6 | */ 7 | id("common-compose-module-configs-script-plugin") 8 | } 9 | 10 | dependencies { 11 | implementation(project(":theme")) 12 | implementation(project(":data")) 13 | 14 | addComposeOfficialDependencies() 15 | } 16 | -------------------------------------------------------------------------------- /components/carousel/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /components/carousel/src/main/java/com/guru/composecookbook/carousel/PageData.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.carousel 2 | 3 | import androidx.compose.runtime.Immutable 4 | import androidx.compose.ui.layout.ParentDataModifier 5 | import androidx.compose.ui.unit.Density 6 | 7 | @Immutable 8 | internal data class PageData(val page: Int) : ParentDataModifier { 9 | override fun Density.modifyParentData(parentData: Any?): Any = this@PageData 10 | } -------------------------------------------------------------------------------- /components/carousel/src/main/java/com/guru/composecookbook/carousel/SelectionState.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.carousel 2 | 3 | enum class SelectionState { 4 | Selected, 5 | Undecided 6 | } 7 | -------------------------------------------------------------------------------- /components/charts/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /components/charts/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies 2 | import com.guru.composecookbook.build.dependencies.addCoreAndroidUiDependencies 3 | 4 | plugins { 5 | /** 6 | * See [common-compose-module-configs-script-plugin.gradle.kts] file 7 | */ 8 | id("common-compose-module-configs-script-plugin") 9 | } 10 | 11 | dependencies { 12 | implementation(project(":theme")) 13 | 14 | addComposeOfficialDependencies() 15 | addCoreAndroidUiDependencies() 16 | } -------------------------------------------------------------------------------- /components/charts/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /components/colorpicker/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /components/colorpicker/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies 2 | 3 | plugins { 4 | /** 5 | * See [common-compose-module-configs-script-plugin.gradle.kts] file 6 | */ 7 | id("common-compose-module-configs-script-plugin") 8 | } 9 | 10 | dependencies { 11 | implementation(project(":theme")) 12 | 13 | addComposeOfficialDependencies() 14 | } 15 | -------------------------------------------------------------------------------- /components/colorpicker/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /components/comingsoon/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /components/comingsoon/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies 2 | 3 | plugins { 4 | /** 5 | * See [common-compose-module-configs-script-plugin.gradle.kts] file 6 | */ 7 | id("common-compose-module-configs-script-plugin") 8 | } 9 | 10 | dependencies { 11 | implementation(project(":animations:lottie")) 12 | implementation(project(":theme")) 13 | 14 | addComposeOfficialDependencies() 15 | } 16 | -------------------------------------------------------------------------------- /components/comingsoon/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /components/fab/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /components/fab/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies 2 | 3 | plugins { 4 | /** 5 | * See [common-compose-module-configs-script-plugin.gradle.kts] file 6 | */ 7 | id("common-compose-module-configs-script-plugin") 8 | } 9 | 10 | dependencies { 11 | addComposeOfficialDependencies() 12 | } 13 | -------------------------------------------------------------------------------- /components/fab/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /components/tags/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /components/tags/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies 2 | 3 | plugins { 4 | /** 5 | * See [common-compose-module-configs-script-plugin.gradle.kts] file 6 | */ 7 | id("common-compose-module-configs-script-plugin") 8 | } 9 | 10 | dependencies { 11 | implementation(project(":theme")) 12 | 13 | addComposeOfficialDependencies() 14 | } 15 | -------------------------------------------------------------------------------- /components/tags/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /components/verticalgrid/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /components/verticalgrid/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies 2 | 3 | plugins { 4 | /** 5 | * See [common-compose-module-configs-script-plugin.gradle.kts] file 6 | */ 7 | id("common-compose-module-configs-script-plugin") 8 | } 9 | 10 | dependencies { 11 | addComposeOfficialDependencies() 12 | } 13 | -------------------------------------------------------------------------------- /components/verticalgrid/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /data/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /data/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | /** 3 | * See [common-kotlin-module-configs-script-plugin.gradle.kts] file 4 | */ 5 | id("common-kotlin-module-configs-script-plugin") 6 | } 7 | -------------------------------------------------------------------------------- /data/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /data/src/main/java/com/guru/composecookbook/data/model/Album.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.data.model 2 | 3 | import java.io.Serializable 4 | 5 | data class Album( 6 | val id: Int, 7 | val genre: String = "Pop", 8 | val artist: String, 9 | val song: String, 10 | val descriptions: String, 11 | val imageId: Int, 12 | val swiped: Boolean = false 13 | ) : Serializable -------------------------------------------------------------------------------- /data/src/main/java/com/guru/composecookbook/data/model/Item.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.data.model 2 | 3 | data class Item( 4 | val id: Int, 5 | val title: String, 6 | val subtitle: String, 7 | val imageId: Int, 8 | val source: String = "demo source" 9 | ) -------------------------------------------------------------------------------- /data/src/main/java/com/guru/composecookbook/data/model/Tweet.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.data.model 2 | 3 | data class Tweet( 4 | val id: Int, 5 | val text: String, 6 | val author: String, 7 | val handle: String, 8 | val time: String, 9 | val authorImageId: Int, 10 | val likesCount: Int, 11 | val commentsCount: Int, 12 | val retweetCount: Int, 13 | val source: String, 14 | val tweetImageId: Int = 0 15 | ) -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/adele.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/adele.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/adele21.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/adele21.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/billie.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/billie.jpg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/bp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/bp.jpg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/camelia.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/camelia.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/dancemonkey.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/dancemonkey.jpg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/dualipa.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/dualipa.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/ed2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/ed2.jpg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/edsheeran.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/edsheeran.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/eminem.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/eminem.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/food1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/food1.jpg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/food10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/food10.jpg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/food11.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/food11.webp -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/food12.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/food12.webp -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/food13.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/food13.webp -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/food14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/food14.jpg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/food15.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/food15.webp -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/food16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/food16.jpg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/food2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/food2.jpg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/food3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/food3.jpg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/food4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/food4.jpg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/food5.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/food5.webp -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/food6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/food6.jpg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/food7.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/food7.webp -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/food8.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/food8.webp -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/food9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/food9.jpg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/imagindragon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/imagindragon.jpg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/james.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/james.jpg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/katy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/katy.jpg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/khalid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/khalid.png -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/lana.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/lana.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/marsh.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/marsh.jpg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/p1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/p1.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/p10.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/p10.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/p11.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/p11.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/p2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/p2.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/p3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/p3.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/p4.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/p4.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/p5.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/p5.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/p6.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/p6.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/p7.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/p7.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/p8.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/p8.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/p9.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/p9.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/sam.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/sam.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/shawn.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/shawn.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/tylor.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/tylor.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/weekend.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/weekend.jpeg -------------------------------------------------------------------------------- /data/src/main/res/drawable-nodpi/wolves.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/data/src/main/res/drawable-nodpi/wolves.jpg -------------------------------------------------------------------------------- /demos/betty/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | -------------------------------------------------------------------------------- /demos/betty/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /src/main/java/com/adwi/betty/util/ApiKey.kt -------------------------------------------------------------------------------- /demos/betty/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /demos/betty/app/src/androidTest/java/com/adwi/betty/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.adwi.betty", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /demos/betty/app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/demos/betty/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/BettyApp.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty 2 | 3 | import android.app.Application 4 | import android.os.Build 5 | import android.util.Log 6 | import androidx.annotation.RequiresApi 7 | import androidx.compose.animation.ExperimentalAnimationApi 8 | import androidx.compose.foundation.ExperimentalFoundationApi 9 | import androidx.compose.material.ExperimentalMaterialApi 10 | import androidx.hilt.work.HiltWorkerFactory 11 | import androidx.work.Configuration 12 | import dagger.hilt.android.HiltAndroidApp 13 | import javax.inject.Inject 14 | 15 | @OptIn(ExperimentalFoundationApi::class) 16 | @OptIn(ExperimentalMaterialApi::class) 17 | @OptIn(ExperimentalAnimationApi::class) 18 | @RequiresApi(Build.VERSION_CODES.M) 19 | @HiltAndroidApp 20 | class BettyApp : Application(), Configuration.Provider { 21 | 22 | @Inject 23 | lateinit var workerFactory: HiltWorkerFactory 24 | 25 | override fun getWorkManagerConfiguration() = 26 | Configuration.Builder() 27 | .setWorkerFactory(workerFactory) 28 | .setMinimumLoggingLevel(Log.DEBUG) 29 | .build() 30 | } 31 | 32 | -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/data/local/BettyDatabase.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.data.local 2 | 3 | 4 | import androidx.room.Database 5 | import androidx.room.RoomDatabase 6 | import com.adwi.betty.data.local.dao.OddsDao 7 | import com.adwi.betty.data.local.entity.Odd 8 | 9 | @Database( 10 | entities = [ 11 | Odd::class 12 | ], 13 | version = 1, 14 | exportSchema = false 15 | ) 16 | abstract class BettyDatabase : RoomDatabase() { 17 | 18 | abstract fun oddsDao(): OddsDao 19 | } -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/data/local/dao/OddsDao.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.data.local.dao 2 | 3 | import androidx.room.* 4 | import com.adwi.betty.data.local.entity.Odd 5 | import kotlinx.coroutines.flow.Flow 6 | 7 | @Dao 8 | interface OddsDao { 9 | 10 | @Insert(onConflict = OnConflictStrategy.REPLACE) 11 | suspend fun insertOdds(odds: List) 12 | 13 | @Query("SELECT * FROM odd_table ORDER BY difference DESC") 14 | fun getAllOdds(): Flow> 15 | 16 | @Update 17 | suspend fun updateOdd(odd: Odd) 18 | 19 | @Query("DELETE FROM odd_table") 20 | suspend fun deleteAllOdds() 21 | 22 | @Query("DELETE FROM odd_table WHERE commenceTime < :timestampInMillis AND hasBetOn = 0") 23 | suspend fun deleteOddsWithNoBetsOlderThan(timestampInMillis: Long) 24 | } -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/data/remote/dto/MatchDto.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.data.remote.dto 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class MatchDto( 6 | @SerializedName("id") val id: String, 7 | @SerializedName("sport_key") val sportKey: String, 8 | @SerializedName("sport_title") val sportName: String, 9 | @SerializedName("commence_time") val commenceTime: String, 10 | @SerializedName("home_team") val homeTeam: String?, 11 | @SerializedName("away_team") val awayTeam: String?, 12 | @SerializedName("bookmakers") val bookmakers: List 13 | ) 14 | 15 | data class BookmakerDto( 16 | @SerializedName("key") var key: String, 17 | @SerializedName("title") var title: String, 18 | @SerializedName("last_update") var lastUpdate: String, 19 | @SerializedName("markets") var markets: List 20 | ) 21 | 22 | data class MarketDto( 23 | @SerializedName("key") var key: String, 24 | @SerializedName("outcomes") var outcomes: List 25 | ) 26 | 27 | data class OutcomeDto( 28 | @SerializedName("name") var name: String, 29 | @SerializedName("price") var price: Double 30 | ) -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/data/remote/dto/SportKey.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.data.remote.dto 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class SportKeyDto( 6 | val key: String, 7 | val group: String, 8 | val title: String, 9 | val description: String, 10 | val active: Boolean = true, 11 | @SerializedName("has_outrights") 12 | val hasOutright: Boolean = false 13 | ) -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/data/repository/OddsRepositoryInterface.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.data.repository 2 | 3 | import com.adwi.betty.data.local.entity.Odd 4 | import com.adwi.betty.ui.main.Range 5 | import kotlinx.coroutines.flow.Flow 6 | 7 | interface OddsRepositoryInterface { 8 | 9 | suspend fun fetchOddsRemote(sportKey: String) 10 | 11 | fun getOddsLocal(): Flow> 12 | 13 | suspend fun updateOdd(odd: Odd) 14 | 15 | suspend fun deleteAllOdds() 16 | suspend fun deleteOddsOlderThan(timeMillis: Long) 17 | 18 | fun workoutDifference(teamA: Double, teamB: Double): Double 19 | fun setRangeFromDifference(difference: Double): Range 20 | fun isItGoodOdd(odd: Odd): Boolean 21 | } -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/di/AppModule.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.di 2 | 3 | import android.content.Context 4 | import androidx.compose.animation.ExperimentalAnimationApi 5 | import androidx.compose.foundation.ExperimentalFoundationApi 6 | import androidx.compose.material.ExperimentalMaterialApi 7 | import com.adwi.betty.util.NotificationUtil 8 | import dagger.Module 9 | import dagger.Provides 10 | import dagger.hilt.InstallIn 11 | import dagger.hilt.android.qualifiers.ApplicationContext 12 | import dagger.hilt.components.SingletonComponent 13 | import javax.inject.Singleton 14 | 15 | @InstallIn(SingletonComponent::class) 16 | @Module 17 | class AppModule { 18 | 19 | @OptIn(ExperimentalAnimationApi::class) 20 | @OptIn(ExperimentalMaterialApi::class) 21 | @OptIn(ExperimentalFoundationApi::class) 22 | @Singleton 23 | @Provides 24 | fun provideNotificationTools( 25 | @ApplicationContext context: Context 26 | ) = NotificationUtil(context) 27 | } -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/di/DispatcherModule.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.di 2 | 3 | import dagger.Module 4 | import dagger.Provides 5 | import dagger.hilt.InstallIn 6 | import dagger.hilt.android.components.ViewModelComponent 7 | import kotlinx.coroutines.CoroutineDispatcher 8 | import kotlinx.coroutines.Dispatchers 9 | import javax.inject.Qualifier 10 | 11 | @Module 12 | @InstallIn(ViewModelComponent::class) 13 | object DispatcherModule { 14 | 15 | @DefaultDispatcher 16 | @Provides 17 | fun providesDefaultDispatcher(): CoroutineDispatcher = Dispatchers.Default 18 | 19 | @IoDispatcher 20 | @Provides 21 | fun providesIoDispatcher(): CoroutineDispatcher = Dispatchers.IO 22 | 23 | @MainDispatcher 24 | @Provides 25 | fun providesMainDispatcher(): CoroutineDispatcher = Dispatchers.Main 26 | } 27 | 28 | @Retention(AnnotationRetention.BINARY) 29 | @Qualifier 30 | annotation class DefaultDispatcher 31 | 32 | @Retention(AnnotationRetention.BINARY) 33 | @Qualifier 34 | annotation class IoDispatcher 35 | 36 | @Retention(AnnotationRetention.BINARY) 37 | @Qualifier 38 | annotation class MainDispatcher -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/di/LocalModule.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.di 2 | 3 | import android.app.Application 4 | import androidx.room.Room 5 | import com.adwi.betty.data.local.BettyDatabase 6 | import com.adwi.betty.util.Constants.Companion.BETTY_DATABASE 7 | import dagger.Module 8 | import dagger.Provides 9 | import dagger.hilt.InstallIn 10 | import dagger.hilt.components.SingletonComponent 11 | import javax.inject.Singleton 12 | 13 | @Module 14 | @InstallIn(SingletonComponent::class) 15 | object LocalModule { 16 | 17 | @Provides 18 | @Singleton 19 | fun provideAppDatabase(application: Application) = 20 | Room 21 | .databaseBuilder( 22 | application, 23 | BettyDatabase::class.java, 24 | BETTY_DATABASE 25 | ) 26 | .fallbackToDestructiveMigration() 27 | .build() 28 | 29 | @Provides 30 | @Singleton 31 | fun provideOdsDao(appDatabase: BettyDatabase) = 32 | appDatabase.oddsDao() 33 | } -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/di/ViewModelModule.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.di 2 | 3 | import com.adwi.betty.data.local.BettyDatabase 4 | import com.adwi.betty.data.remote.OddsApi 5 | import com.adwi.betty.data.repository.OddsRepository 6 | import com.adwi.betty.data.repository.OddsRepositoryInterface 7 | import dagger.Module 8 | import dagger.Provides 9 | import dagger.hilt.InstallIn 10 | import dagger.hilt.android.components.ViewModelComponent 11 | import dagger.hilt.android.scopes.ViewModelScoped 12 | import kotlinx.coroutines.CoroutineDispatcher 13 | 14 | @Module 15 | @InstallIn(ViewModelComponent::class) 16 | object ViewModelModule { 17 | 18 | @Provides 19 | @ViewModelScoped 20 | fun provideSettingsRepository( 21 | api: OddsApi, 22 | database: BettyDatabase 23 | ) = OddsRepository(api, database) as OddsRepositoryInterface 24 | } -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/ui/base/BaseViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.ui.base 2 | 3 | import androidx.lifecycle.ViewModel 4 | import kotlinx.coroutines.flow.MutableStateFlow 5 | 6 | abstract class BaseViewModel : ViewModel() { 7 | 8 | val TAG: String = javaClass.simpleName 9 | 10 | val snackBarMessage = MutableStateFlow("") 11 | val toastMessage = MutableStateFlow("") 12 | } -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/ui/components/AnimatedView.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.ui.components 2 | 3 | import androidx.compose.foundation.layout.padding 4 | import androidx.compose.runtime.Composable 5 | import androidx.compose.runtime.getValue 6 | import androidx.compose.ui.Modifier 7 | import androidx.compose.ui.layout.ContentScale 8 | import androidx.compose.ui.unit.dp 9 | import com.airbnb.lottie.compose.* 10 | 11 | @Composable 12 | fun AnimatedView(resource: Int, modifier: Modifier) { 13 | val composition by rememberLottieComposition(LottieCompositionSpec.RawRes(resource)) 14 | val progress by animateLottieCompositionAsState( 15 | composition, 16 | iterations = LottieConstants.IterateForever 17 | ) 18 | LottieAnimation( 19 | composition = composition, progress = progress, modifier = modifier.padding(80.dp), contentScale = ContentScale.Fit 20 | ) 21 | } -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/ui/home/Home.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.ui.home 2 | 3 | import androidx.compose.animation.ExperimentalAnimationApi 4 | import androidx.compose.foundation.ExperimentalFoundationApi 5 | import androidx.compose.foundation.layout.fillMaxSize 6 | import androidx.compose.material.ExperimentalMaterialApi 7 | import androidx.compose.runtime.Composable 8 | import androidx.compose.runtime.collectAsState 9 | import androidx.compose.runtime.getValue 10 | import androidx.compose.ui.Modifier 11 | import com.adwi.betty.ui.components.BettyOddList 12 | import com.adwi.betty.ui.components.BettyScaffold 13 | import com.adwi.betty.ui.main.MainViewModel 14 | 15 | @OptIn(ExperimentalAnimationApi::class) 16 | @OptIn(ExperimentalFoundationApi::class) 17 | @OptIn(ExperimentalMaterialApi::class) 18 | @Composable 19 | fun HomeScreen( 20 | viewModel: MainViewModel 21 | ) { 22 | val odds by viewModel.odds.collectAsState() 23 | val progress by viewModel.progress.collectAsState() 24 | 25 | BettyScaffold( 26 | viewModel = viewModel 27 | ) { 28 | BettyOddList( 29 | progress = progress, 30 | onRefresh = { viewModel.onManualRefresh() }, 31 | list = odds, 32 | modifier = Modifier.fillMaxSize() 33 | ) 34 | } 35 | } -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/ui/theme/Color.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.ui.theme 2 | 3 | import androidx.compose.ui.graphics.Color 4 | 5 | val Purple200 = Color(0xFFBB86FC) 6 | val Purple500 = Color(0xFF6200EE) 7 | val Purple700 = Color(0xFF3700B3) 8 | val Teal200 = Color(0xFF03DAC5) 9 | val LightGray = Color(0xFFE6E6E6) 10 | val MediumGray = Color(0xFF8D8D8D) 11 | val DarkGray = Color(0xFF464646) 12 | 13 | // Ranges 14 | val LowRange = Color(0xFFFFE252) 15 | val MediumRange = Color(0xFFFCAF3D) 16 | val HighRange = Color(0xFFFF5656) -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/ui/theme/Shape.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.ui.theme 2 | 3 | import androidx.compose.foundation.shape.RoundedCornerShape 4 | import androidx.compose.material.Shapes 5 | import androidx.compose.ui.unit.dp 6 | 7 | val Shapes = Shapes( 8 | small = RoundedCornerShape(4.dp), 9 | medium = RoundedCornerShape(4.dp), 10 | large = RoundedCornerShape(0.dp) 11 | ) -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/ui/theme/Type.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.ui.theme 2 | 3 | import androidx.compose.material.Typography 4 | import androidx.compose.ui.text.TextStyle 5 | import androidx.compose.ui.text.font.FontFamily 6 | import androidx.compose.ui.text.font.FontWeight 7 | import androidx.compose.ui.unit.sp 8 | 9 | // Set of Material typography styles to start with 10 | val Typography = Typography( 11 | body1 = TextStyle( 12 | fontFamily = FontFamily.Default, 13 | fontWeight = FontWeight.Normal, 14 | fontSize = 16.sp 15 | ) 16 | /* Other default text styles to override 17 | button = TextStyle( 18 | fontFamily = FontFamily.Default, 19 | fontWeight = FontWeight.W500, 20 | fontSize = 14.sp 21 | ), 22 | caption = TextStyle( 23 | fontFamily = FontFamily.Default, 24 | fontWeight = FontWeight.Normal, 25 | fontSize = 12.sp 26 | ) 27 | */ 28 | ) -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/util/Constants.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.util 2 | 3 | import com.adwi.betty.BuildConfig 4 | 5 | 6 | class Constants { 7 | companion object { 8 | 9 | 10 | const val BASE_URL = "https://api.the-odds-api.com/" 11 | const val API_KEY = BuildConfig.BETTY_API_KEY 12 | const val BETTY_DATABASE = "wallpaper_database" 13 | 14 | const val MIN_ODD_DIFFERENCE = 3.0 15 | 16 | const val DEFAULT_BOOKMAKER = "William Hill" 17 | } 18 | } -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/util/Extensions.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.util 2 | 3 | import android.app.Activity 4 | import android.content.Context 5 | import android.view.View 6 | import android.widget.Toast 7 | import androidx.appcompat.app.AppCompatActivity 8 | import androidx.core.app.ActivityCompat 9 | import androidx.fragment.app.Fragment 10 | import androidx.lifecycle.ViewModel 11 | import androidx.lifecycle.lifecycleScope 12 | import androidx.lifecycle.viewModelScope 13 | import com.google.android.material.snackbar.Snackbar 14 | import kotlinx.coroutines.CoroutineDispatcher 15 | import kotlinx.coroutines.Job 16 | import kotlinx.coroutines.launch 17 | import kotlin.math.round 18 | 19 | 20 | val T.exhaustive: T 21 | get() = this 22 | 23 | fun concatenate(vararg lists: List): List { 24 | return listOf(*lists).flatten() 25 | } 26 | 27 | fun Double.round(decimals: Int): Double { 28 | var multiplier = 1.0 29 | repeat(decimals) { multiplier *= 10 } 30 | return round(this * multiplier) / multiplier 31 | } 32 | 33 | fun AppCompatActivity.launchCoroutine(body: suspend () -> Unit): Job { 34 | return lifecycleScope.launchWhenStarted { 35 | body() 36 | } 37 | } 38 | 39 | fun ViewModel.onDispatcher(dispatcher: CoroutineDispatcher, body: suspend () -> Unit): Job { 40 | return viewModelScope.launch(dispatcher) { 41 | body() 42 | } 43 | } -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/util/ModifierExtensions.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.util 2 | 3 | import androidx.compose.runtime.Stable 4 | import androidx.compose.ui.Modifier 5 | import androidx.compose.ui.draw.alpha 6 | 7 | @Stable 8 | fun Modifier.visible(visibility: Boolean): Modifier { 9 | return if (visibility) { 10 | this.then(alpha(1f)) 11 | } else { 12 | this.then(alpha(0f)) 13 | } 14 | } -------------------------------------------------------------------------------- /demos/betty/app/src/main/java/com/adwi/betty/util/Resource.kt: -------------------------------------------------------------------------------- 1 | package com.adwi.betty.util 2 | 3 | sealed class Resource( 4 | val data: T? = null, 5 | val error: Throwable? = null 6 | ) { 7 | class Success(data: T) : Resource(data) 8 | class Loading(data: T? = null) : Resource(data) 9 | class Error(throwable: Throwable, data: T? = null) : Resource(data, throwable) 10 | } -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/drawable/ic_fire_animated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/demos/betty/app/src/main/res/drawable/ic_fire_animated.png -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/drawable/ic_refresh.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/demos/betty/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/demos/betty/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/demos/betty/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/demos/betty/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/demos/betty/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/demos/betty/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/demos/betty/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/demos/betty/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/demos/betty/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gurupreet/ComposeCookBook/1b82b0b990648b2ece5c890fef622d9bdb00e4d8/demos/betty/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #5867AB 4 | -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Betty 3 | 4 | 5 | Could not refresh: %s 6 | An unknown error occurred 7 | Betty downloaded some new ods for you. Have a look! 8 | 9 | -------------------------------------------------------------------------------- /demos/betty/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 21 | 22 | 12 | 13 | -------------------------------------------------------------------------------- /templates/profile/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /templates/profile/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies 2 | 3 | plugins { 4 | /** 5 | * See [common-compose-module-configs-script-plugin.gradle.kts] file 6 | */ 7 | id("common-compose-module-configs-script-plugin") 8 | } 9 | 10 | dependencies { 11 | implementation(project(":theme")) 12 | implementation(project(":data")) 13 | implementation(project(":components:tags")) 14 | 15 | addComposeOfficialDependencies() 16 | } -------------------------------------------------------------------------------- /templates/profile/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /templates/profile/src/main/java/com/guru/composecookbook/profile/InterestsSection.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.profile 2 | 3 | import androidx.compose.foundation.layout.Row 4 | import androidx.compose.foundation.layout.padding 5 | import androidx.compose.material.Divider 6 | import androidx.compose.material3.MaterialTheme 7 | import androidx.compose.material3.Text 8 | import androidx.compose.runtime.Composable 9 | import androidx.compose.ui.Modifier 10 | import androidx.compose.ui.unit.dp 11 | import com.guru.composecookbook.tags.InterestTag 12 | import com.guru.composecookbook.theme.typography 13 | 14 | @Composable 15 | fun InterestsSection() { 16 | Text( 17 | text = "My Interests", 18 | style = typography.h6, 19 | color = MaterialTheme.colorScheme.primary, 20 | modifier = Modifier.padding(start = 8.dp, top = 16.dp) 21 | ) 22 | Divider(modifier = Modifier.padding(vertical = 4.dp, horizontal = 8.dp)) 23 | Row(modifier = Modifier.padding(start = 8.dp, top = 8.dp)) { 24 | InterestTag("Android") 25 | InterestTag("Compose") 26 | InterestTag("Flutter") 27 | InterestTag("SwiftUI") 28 | } 29 | Row(modifier = Modifier.padding(start = 8.dp)) { 30 | InterestTag("Video games") 31 | InterestTag("Podcasts") 32 | InterestTag("Basketball") 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /templates/profile/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | I am an enthusiastic Developer. I love to create things that make the world a better place. I like to work where technology is used to improve core components of life like Health, Education and Environment. 3 | This project was started because of my curiosity about declarative UIs.I have been tracking Jetpack Compose long before alpha release and trying to understand how it is gonna fit in our current existing system. So this is an attempt to showcase how it can be used to make android development more fun, easy and interesting. 4 | -------------------------------------------------------------------------------- /theme/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /theme/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies 2 | import com.guru.composecookbook.build.dependencies.addComposeThirdPartyDependencies 3 | import com.guru.composecookbook.build.dependencies.addCoreAndroidUiDependencies 4 | 5 | plugins { 6 | /** 7 | * See [common-compose-module-configs-script-plugin.gradle.kts] file 8 | */ 9 | id("common-compose-module-configs-script-plugin") 10 | } 11 | 12 | dependencies { 13 | addComposeOfficialDependencies() 14 | addComposeThirdPartyDependencies() 15 | addCoreAndroidUiDependencies() 16 | } -------------------------------------------------------------------------------- /theme/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /theme/src/main/java/com/guru/composecookbook/theme/Color.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.theme 2 | 3 | import androidx.compose.ui.graphics.Color 4 | 5 | val green200 = Color(0xffa5d6a7) 6 | val green500 = Color(0xff4caf50) 7 | val green700 = Color(0xff388e3c) 8 | 9 | val blue500 = Color(0xFF3F51B5) 10 | val blue200 = Color(0xFF9FA8DA) 11 | val blue700 = Color(0xFF303F9F) 12 | 13 | val purple200 = Color(0xFFB39DDB) 14 | val purple = Color(0xFF833AB4) 15 | val purple700 = Color(0xFF512DA8) 16 | 17 | val orange200 = Color(0xFFff7961) 18 | val orange500 = Color(0xFFf44336) 19 | val orange700 = Color(0xFFba000d) 20 | 21 | 22 | val teal200 = Color(0xff80deea) 23 | val twitterColor = Color(0xFF1DA1F2) 24 | val tiktokBlue = Color(0xFF69C9D0) 25 | val tiktokRed = Color(0xFFEE1D52) 26 | val tiktokBlack = Color(0xFF010101) 27 | val blue = Color(0xFF5851DB) 28 | 29 | val orange = Color(0xFFF56040) 30 | val yellow = Color(0xFFFCAF45) 31 | val graySurface = Color(0xFF2A2A2A) 32 | val gradientGreenColors = listOf(green200, green500, green700) 33 | val gradientRedColors = listOf(orange, tiktokRed) 34 | val gradientBluePurple = listOf(blue, purple) 35 | val instagramGradient = listOf(blue, purple, orange, yellow) -------------------------------------------------------------------------------- /theme/src/main/java/com/guru/composecookbook/theme/Shape.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.theme 2 | 3 | import androidx.compose.foundation.shape.RoundedCornerShape 4 | import androidx.compose.material.Shapes 5 | import androidx.compose.ui.unit.dp 6 | 7 | val shapes = Shapes( 8 | small = RoundedCornerShape(4.dp), 9 | medium = RoundedCornerShape(4.dp), 10 | large = RoundedCornerShape(0.dp) 11 | ) -------------------------------------------------------------------------------- /theme/src/main/java/com/guru/composecookbook/theme/components/Material3Card.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.theme.components 2 | 3 | import androidx.compose.foundation.BorderStroke 4 | import androidx.compose.material3.MaterialTheme 5 | import androidx.compose.material3.Surface 6 | import androidx.compose.material3.contentColorFor 7 | import androidx.compose.runtime.Composable 8 | import androidx.compose.ui.Modifier 9 | import androidx.compose.ui.graphics.Color 10 | import androidx.compose.ui.graphics.Shape 11 | import androidx.compose.ui.unit.Dp 12 | import androidx.compose.ui.unit.dp 13 | 14 | @Composable 15 | fun Material3Card( 16 | modifier: Modifier = Modifier, 17 | shape: Shape = androidx.compose.material.MaterialTheme.shapes.medium, 18 | backgroundColor: Color = MaterialTheme.colorScheme.surface, 19 | contentColor: Color = contentColorFor(backgroundColor), 20 | border: BorderStroke? = null, 21 | elevation: Dp = 1.dp, 22 | content: @Composable () -> Unit 23 | ) { 24 | Surface( 25 | modifier = modifier, 26 | shape = shape, 27 | color = backgroundColor, 28 | contentColor = contentColor, 29 | tonalElevation = elevation, 30 | shadowElevation = elevation, 31 | border = border, 32 | content = content 33 | ) 34 | } -------------------------------------------------------------------------------- /theme/src/main/java/com/guru/composecookbook/theme/extensions/BitmapExt.kt: -------------------------------------------------------------------------------- 1 | package com.guru.composecookbook.theme.extensions 2 | 3 | import android.graphics.Bitmap 4 | import androidx.palette.graphics.Palette 5 | 6 | fun Bitmap.generateDominantColorState(): Palette.Swatch = Palette.Builder(this) 7 | .resizeBitmapArea(0) 8 | .maximumColorCount(16) 9 | .generate() 10 | .swatches 11 | .maxByOrNull { swatch -> swatch.population }!! 12 | -------------------------------------------------------------------------------- /theme/src/main/res/drawable/ic_baseline_home_24.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /theme/src/main/res/drawable/ic_comment_dots_solid.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /theme/src/main/res/drawable/ic_ethereum_brands.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /theme/src/main/res/drawable/ic_hashtag_solid.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /theme/src/main/res/drawable/ic_heart_solid.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /theme/src/main/res/drawable/ic_instagram.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /theme/src/main/res/drawable/ic_linkedin_brands.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /theme/src/main/res/drawable/ic_retweet_solid.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /theme/src/main/res/drawable/ic_send.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /theme/src/main/res/drawable/ic_share_solid.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /theme/src/main/res/drawable/ic_speech_bubble.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /theme/src/main/res/drawable/ic_twitter.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /theme/src/main/res/drawable/ic_twitter_square_brands.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /theme/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /theme/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ffa5d6a7 4 | #ff4caf50 5 | #ff388e3c 6 | #FF03DAC5 7 | #ff80deea 8 | #FF833AB4 9 | #FF000000 10 | #FFFFFFFF 11 | -------------------------------------------------------------------------------- /theme/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | 22 | 23 |