在我的Manifest.xml
文件中,我为我正在使用的所有活动设置了android:parentActivityName
,
但是,尽管我将其设置为某个屏幕,但它仍会转到最后使用的屏幕。
有没有办法控制后退按钮的屏幕,而无需在android:parentActivityName
中设置?
为什么它不起作用?
这是我的AndroidManifes.xml
文件>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="apps.radwin.wintouch">
<!-- Permisions -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<!-- Applicatino properties -->
<application
android:name=".appContext"
android:allowBackup="true"
android:configChanges="orientation"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:screenOrientation="portrait"
android:supportsRtl="false"
android:theme="@style/AppTheme"
android:windowSoftInputMode="adjustPan|adjustResize">
<!-- META DATA -->
<!-- Active android Meta -->
<meta-data
android:name="AA_DB_NAME"
android:value="Wintouchdatabase.db" />
<meta-data
android:name="AA_DB_VERSION"
android:value="1" />
<meta-data
android:name="AA_MODELS"
android:value="apps.radwin.wintouch.models.ProjectsModel, apps.radwin.wintouch.models.WorkingOrdersModel, apps.radwin.wintouch.models.BandsModel" />
<!-- dDfault Meta -->
<uses-library
android:name="com.sec.android.app.multiwindow"
android:required="false" />
<meta-data
android:name="com.sec.android.support.multiwindow"
android:value="true" />
<meta-data
android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W"
android:value="632.0dip" />
<meta-data
android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H"
android:value="598.0dip" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<!-- Activities -->
<activity
android:name=".activities.alignmentActivities.Scanning_Barcode_Activity"
android:configChanges="orientation"
android:label="@string/app_name"
android:parentActivityName=".activities.alignmentActivities.Project_Selection_Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.alignmentActivities.Aligment_Scan_Activity"
android:label="@string/title_activity_aligment__scan_"
android:parentActivityName=".activities.alignmentActivities.Scanning_Barcode_Activity"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.alignmentActivities.Fine_Aligment_Activity"
android:label="@string/title_activity_fine__aligment_"
android:parentActivityName=".activities.alignmentActivities.Aligment_Scan_Activity"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.alignmentActivities.Project_Selection_Activity"
android:label="Wintouch"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".activities.alignmentActivities.Add_New_Project_Activity"
android:label="Add new Project"
android:parentActivityName=".activities.alignmentActivities.Project_Selection_Activity"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.alignmentActivities.WorkOrders_election_Activity"
android:label="@string/title_activity_work_orders_election_"
android:theme="@style/AppTheme.NoActionBar" />
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.alignmentActivities.Project_Selection_Activity" />
/activity>
<activity
android:name=".activities.alignmentActivities.Splash_Activity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.alignmentActivities.Add_New_Work_Order"
android:label="@string/title_activity_add__new__work__order"
android:parentActivityName=".activities.alignmentActivities.WorkOrders_election_Activity"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".activities.alignmentActivities.Testings_Activity"
android:label="@string/title_activity_testings_"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".activities.alignmentActivities.Workorder_Settings_Report"
android:label="@string/title_activity_workorder__settings__report"
android:theme="@style/AppTheme.NoActionBar"></activity>
</application>
</manifest>
Thnx