Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #24

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Develop #24

wants to merge 3 commits into from

Conversation

codenameobi
Copy link
Contributor

I added the navigation_graph and fragments for the splash screen and onboarding screen

Copy link
Owner

@kulloveth kulloveth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should checkout changes that I made and fix the lines I pointed out then complete the feature, also for future PR branch out with a new name to avoid altering develop or master

@@ -33,6 +33,13 @@ android {
}

dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
def nav_version = "2.3.1"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should move to the project level gradle

savedInstanceState: Bundle?
): View? {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_onboarding, container, false)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are using viewbinding instead

// supportActionBar?.hide()

Handler().postDelayed({
navController!!.navigate(R.id.action_splashScreenFragment_to_onboardingFragment)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!! causes null pointer exception should be replaced with ? and also we are using safeargs for navigation to avoid runtime error which I already added the dependency

app:layout_constraintBottom_toTopOf="@id/indicatorsContainer"
android:layout_marginBottom="12dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

their is no need for framelayout lets maintain only constraint when there are more than one child view

android:layout_height="match_parent"
tools:context=".SplashScreenFragment">

<androidx.constraintlayout.widget.ConstraintLayout
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is best an imageView, we should avoid nested parent views

xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nav_graph"
app:startDestination="@id/onboardingFragment">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be splashfragment instead

android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@id/buttonNext" />
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also its best we use a library for indicator which I already added

android:id="@+id/introSliderViewPager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:overScrollMode="never"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not advisable, it should be removed

android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/textSkipIntro"
android:minWidth="110dp"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont know the reason for this minWidth dont think its necessary

android:id="@+id/buttonNext"
android:textSize="14sp"
android:textStyle="bold"
android:layout_marginBottom="10dp"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always add sizes to dimens file to avoid repetition, you will see a sample with what I have done

Copy link
Contributor Author

@codenameobi codenameobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will carry the new review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants