向上按钮无法使用我的自定义转换

时间:2017-05-19 05:00:30

标签: java android

我在值>样式中定义了customWindowAnimation。这与后退按钮正常工作,但当我按工具栏中的向上按钮时,转换不起作用:(

您能帮我找一个解决方案吗? 。提前致谢 。

这是资源文件

<!-- Base application theme. -->
<style name="AppTheme" parent="AppTheme.Base">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">#c9416f</item>
    <item name="colorPrimaryDark">#c4265b</item>
    <item name="colorAccent">#c21b53</item>

    <item name="android:windowAnimationStyle">@style/CustomActivityAnimation</item>
</style>



<style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
    <item name="colorControlNormal">@android:color/white</item>

</style>

<style name="CustomActivityAnimation" parent="@android:style/Animation.Activity">
    <item name="android:activityOpenEnterAnimation">@anim/slide_in_right</item>
    <item name="android:activityOpenExitAnimation">@anim/slide_out_left</item>
    <item name="android:activityCloseEnterAnimation">@anim/slide_in_left</item>
    <item name="android:activityCloseExitAnimation">@anim/slide_out_right</item>
</style>

清单文件`

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name=".eshohor"
        android:parentActivityName="com.sonalirod.run6.MainActivity">
        <meta-data
        android:name="android.support.parentActivity"
        android:value=".MainActivity"
        />
    </activity>

    <activity android:name=".namkoron" />

    <activity android:name=".Jelaporicity"/>

    <activity android:name=".potovumi"
              android:parentActivityName="com.sonalirod.run6.MainActivity" />

    <activity android:name=".thanasomoho"></activity>
</application>

`

0 个答案:

没有答案