转换在设置输入、退出、popEnter和popExit转换后仍然无法工作。
我的导航代码是:
<fragment
android:id="@+id/introFragment"
android:name="IntroFragment"
android:label="IntroFragment" >
<action
android:id="@+id/action_introFragment_to_signinFragment"
app:destination="@id/signinFragment"
app:enterAnim="@anim/slide_from_right"
app:exitAnim="@anim/slide_to_left"
app:popEnterAnim="@anim/slide_from_left"
app:popExitAnim="@anim/slide_to_right"
app:popUpTo="@+id/nav_graph" />
<action
android:id="@+id/action_introFragment_to_signupFragment"
app:destination="@id/signupFragment"
app:enterAnim="@anim/slide_from_right"
app:exitAnim="@anim/slide_to_left"
app:popEnterAnim="@anim/slide_from_left"
app:popExitAnim="@anim/slide_to_right"
app:popUpTo="@+id/nav_graph" />
</fragment>
我正在使用
def nav_version = "1.0.0-alpha05"
// Navigation Component - Jetpack
implementation "android.arch.navigation:navigation-fragment-ktx:$nav_version"
implementation "android.arch.navigation:navigation-ui-ktx:$nav_version"
androidTestImplementation "android.arch.navigation:navigation-testing-ktx:$nav_version"
我的导航代码是:
button.setOnClickListener(
Navigation.createNavigateOnClickListener(R.id.signinFragment))
我漏掉了什么?