-
Notifications
You must be signed in to change notification settings - Fork 18
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
base: develop
Are you sure you want to change the base?
Develop #24
Conversation
There was a problem hiding this 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" |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
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" /> |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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
There was a problem hiding this 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
I added the navigation_graph and fragments for the splash screen and onboarding screen