我正在使用Android Studio 3.2 Canary 14和导航架构组件.使用此功能,您可以像使用Intent一样定义过渡动画.
但是动画被设置为导航图中动作的属性,如下所示:
<fragment
android:id="@+id/startScreenFragment"
android:name="com.example.startScreen.StartScreenFragment"
android:label="fragment_start_screen"
tools:layout="@layout/fragment_start_screen" >
<action
android:id="@+id/action_startScreenFragment_to_findAddressFragment"
app:destination="@id/findAddressFragment"
app:enterAnim="@animator/slide_in_right"
app:exitAnim="@animator/slide_out_left"
app:popEnterAnim="@animator/slide_in_left"
app:popExitAnim="@animator/slide_out_right"/>
</fragment>
Run Code Online (Sandbox Code Playgroud)
为图表中的所有操作定义这一过程非常繁琐!
有没有办法在动作上将一组动画定义为默认值?
我没有运气使用款式.
android android-animation android-jetpack android-architecture-navigation