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

Граф нафигации и основные экраны #19

Merged
merged 9 commits into from
Aug 4, 2024

Conversation

AnShok
Copy link
Collaborator

@AnShok AnShok commented Aug 3, 2024

No description provided.

@AnShok AnShok linked an issue Aug 3, 2024 that may be closed by this pull request
container: ViewGroup?,
savedInstanceState: Bundle?
): View {
return inflater.inflate(R.layout.fragment_favourites, 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.

Давай во всех фрагментах заменим конструкции типа R.layout.fragment_favourites и view.findViewById на ViewBinding, как это делали на курсе, это даже есть в требованиях
Снимок экрана 2024-08-03 в 16 30 08

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)

view.findViewById<Button>(R.id.button_back_to_search_from_filter).setOnClickListener {
Copy link
Owner

Choose a reason for hiding this comment

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

Аналогично + в остальных fragment

@@ -4,16 +4,18 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.root.RootActivity">
Copy link
Owner

Choose a reason for hiding this comment

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

Зачем убрал эту строчку?

@@ -4,16 +4,18 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.root.RootActivity">
android:orientation="vertical">
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
android:orientation="vertical">
android:orientation="vertical">

Эта строчка точно нужна?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

в ConstraintLayout нет
Уберу

app:navGraph="@navigation/main_navigation_graph"
app:defaultNavHost="true"
android:name="androidx.navigation.fragment.NavHostFragment"
tools:ignore="MissingConstraints" />
Copy link
Owner

Choose a reason for hiding this comment

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

Давай вместо tools:ignore="MissingConstraints" все таки укажем нужные констрэйнты, например левый, верхний, правый - parent

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
Copy link
Owner

Choose a reason for hiding this comment

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

Может лучше все описывать не на LinearLayout а на ConstraintLayout? Давай обсудим в телеге

android:label="fragment_vacancy"
tools:layout="@layout/fragment_vacancy" />
<fragment
android:id="@+id/team_screen"
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
android:id="@+id/team_screen"
android:id="@+id/teamFragment"

app:destination="@id/vacancyFragment" />
</fragment>
<fragment
android:id="@+id/favorite_screen"
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
android:id="@+id/favorite_screen"
android:id="@+id/favoriteFragment"

app:startDestination="@id/main_screen">

<fragment
android:id="@+id/main_screen"
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
android:id="@+id/main_screen"
android:id="@+id/mainFragment"

@AnShok AnShok requested a review from ElchinGasymov August 3, 2024 16:31
@ElchinGasymov ElchinGasymov merged commit b197f39 into develop Aug 4, 2024
3 checks passed
@ElchinGasymov ElchinGasymov deleted the Career_Hub_Navigation_graph_and_screen_caps branch August 4, 2024 08:39
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.

Добавить граф навигацию
4 participants