작성
·
215
·
수정됨
0
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?,
): View? {
val view = inflater.inflate(R.layout.fragment_blank1, container, false)
val action = BlankFragment1Directions.actionBlankFragment1ToBlankFragment2("ABCDE")
위의 코드중에서 "ABCD" 부분에서 빨간줄이 생기고 오류가 나네요 ... 왜 그럴까요 ???
소스코드는 아래 GITHUB 에 올려두었습니다
https://github.com/dongguntechnology/NaviDataTransfer
nav_test 부분을 이렇게 변경해보시겠어요?
<navigation xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/nav_test" app:startDestination="@id/blankFragment1"> <fragment android:id="@+id/blankFragment1" android:name="com.dongguninnovatiion.navidatatransfer.BlankFragment1" android:label="fragment_blank1" tools:layout="@layout/fragment_blank1" > <action android:id="@+id/action_blankFragment1_to_blankFragment2" app:destination="@id/blankFragment2" /> </fragment> <fragment android:id="@+id/blankFragment2" android:name="com.dongguninnovatiion.navidatatransfer.BlankFragment2" android:label="fragment_blank2" tools:layout="@layout/fragment_blank2" > <argument android:name="key" app:argType="string" android:defaultValue="Corea(Core)" /> <action android:id="@+id/action_blankFragment2_to_blankFragment1" app:destination="@id/blankFragment1" /> </fragment> </navigation>