mars885 / gamedge Goto Github PK
View Code? Open in Web Editor NEWAn Android application for browsing video games and checking the latest gaming news from around the world.
License: Apache License 2.0
An Android application for browsing video games and checking the latest gaming news from around the world.
License: Apache License 2.0
At the moment of this writing, KSP requires us to specify where the generated code lives. If we were to omit it, the generated code does not get picked up and the build fails.
The solution, however, causes the popup with text "Duplicate content roots detected" appear after every Gradle sync.
Firstly, follow google/ksp#37 issue and see whether a better solution is provided.
Second, follow AS issue for Duplicate content roots detected
popup appearing.
I'm trying to build the project with new Android Studio (Arctic Fox), but it says (The project is using an incompatible version (7.0.0-beta05) of the Android Gradle plugin.), and If I upgrade it manually Hilt doesn't work properly, I keep getting @HiltAndroidApp base class must extend Application
, tried cleaning the project, invalidate cache and restart but no success.
The ViewPager2
class has the method setOffscreenPageLimit
that allows to preload a specified number of items on either side.
Before the Jetpack Compose migration, it was used to preload images inside the image viewer screen.
However, the Accompanist's analogue of the ViewPager2
, does not currently support that. Consider adding it as soon as support for this feature is released.
The issue to track on the Accompanist's side.
The video entities coming from the IGDB API do not contain name
field sometimes, which causes an error when trying to load a game inside the game info screen, since that field is required in the JSON schema.
Another issue arises in terms of what to show on the UI side. Two solutions:
Video
or Trailer
.Remove comments like <!-- GamesDiscovery -->
and <!-- LikedGames -->
from resource files.
Jetpack Compose is the new UI framework for Android that is going to replace the current one in the near future.
For the horizontal sliding animations to work properly, they require specifying the zIndex
for both the entering & exiting animations.
However, from the research done, it seems like it's not possible to specify it inside AnimatedNavHost.enterTransition
, AnimatedNavHost.exitTransition
, AnimatedNavHost.popEnterTransition
, and AnimatedNavHost.popExitTransition
as of 0.23.1
version of the Accompanist library.
The Accompanist's issue can be tracked here.
Refactor the GameInfoViewModel
by extracting the logic for loading game's information into a separate use case named something like GetGameInfoUseCase
.
Apparently, starting from Compose 1.2, it's possible to create a single annotation for previewing multiple configurations of a particular composable instead of duplicating @Preview
multiple times everywhere.
However, as of Jetpack Compose version 1.2 and Android Studio Chipmunk, preview just don't work. Therefore, as soon as previews get fixed, create a single preview annotation and use it for previewing composables. Something like this:
@Preview
@Preview(uiMode = Configuration.UI_MODE_NIGHT_YES)
annotation class GamedgePreview
Then, use it like so:
@GamedgePreview
@Composable
private fun GameInfoLoadingStatePreview() {
// ...
}
The ViewPager2
class has the support to enable/disable swiping by calling the method setUserInputEnabled(boolean isEnabled)
.
Before the migration, whe the game info header was collapsed, the scrolling of artworks was disabled like this.
However, the Accompanist's analogue, as of the 0.23.1
, does not support doing that. Starting from the 0.24.1-alpha, the support has been added.
Consider using that as soon as #139 issue is resolved & the version of Accompanist gets updated inside the project.
In the XML world, TextView
allows disabling the font padding by specifying includeFontPadding="false"
. This was used by the second title of the game info header to remove any extra space between the first title & second one.
However, as of 1.1.1
version of the Jetpack Compose, it's not possible to do that. As of the 1.2.0-beta01
, the support for that has been added. As soon as the project gets updated to use 1.2.0
version of the Jetpack Compose, consider removing the font padding, just like it was before the migration to Compose.
do you have plans to implement translations? there are services like webblate and crowdin.
Starting from the 1.2.0
version, the Compose comes with ready-to-be used APIs for managing insets.
Resources:
Incorporate the java-test-fixtures
plugin to share common testing code across the project and delete commons-testing module, which acts as a replacement for it at this point.
Unfortunately, the plugin, at the moment of writing this issue, is only available for pure java
and kotlin
modules, meaning it cannot be used for android modules. There is a feature request on the Google Issue Tracker to support java-test-fixtures
plugin.
A good resource about what text-fixtures-plugin
is and what it can do can be found here.
Start enforing trailling comma styling rule as soon as ktlint starts supporting it. It seems at the moment that the rule is experimental. As soon as it is deemed stable, consider enabling it.
The issue to track about its support.
Before the migration to the Jetpack Compose, the action of liking & unliking a game by clicking the like button was animated using the animated vector drawable.
However, the latest version of the Jetpack Compose (1.1.1
as of now) does not support that. Consider adding it back once the support comes along.
The issue on the google issue tracker about this problem.
Currently, when a user is on the game info screen and clicks on an image, we need to pass a ready-to-be consumed URL of a clicked image to the image viewer screen. The logic for getting a particular image URL is embedded inside the GameInfoViewModel
(like here, here, and here).
It looks quite dirty and a separate use case named something like GetGameImageUrlsUseCase
is needed to be created and then GameInfoViewModel
refactored to use it.
More info here.
Each feature-*
module can contain three subpackages called domain
, data
, and presentation
. Ideally, the domain
layer should not reference anything that lives inside data
or presentation
modules.
Therefore, to automate this, a lint check can be created to enforce this behavior.
Resources:
Hi thanks for a great sample about modular application with compose. I'm curious about why are you seperate common-domain instead of adding domain package in every feature modules?
The latest release of MotionLayout for Jetpack Compose, 1.1.0-alpha02, does not seem to support OnSwipe
gestures for the LazyColumn
composable. Try again as soon as the support for that comes out.
Monitoring the releases can be done here.
It's a good practice to allow users to change the theme of the app according to their preference.
Therefore, a setting needs to be added to implement this requirement.
Check what Kotlin compiler flags are no longer needed to be specified here and delete them.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.