默认页面不会改变
Default Page will not change
我的主页需要显示两个按钮:登录和注册。带有两个按钮的登录页面 Activity 应该首先出现,但只会出现注册屏幕。
我对编码很陌生。所以,请保持友善 :( 我已经坚持了好几天了。
下面是AndroidManifest.xml。谁能发现我做错了什么?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.thrd">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".LoginActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".RegisterActivity"></activity>
<activity android:name=".UserAreaActivity"></activity>
</application>
</manifest>
你的清单文件没问题。可能您的代码中存在一些逻辑错误。在登录活动中。所以它启动 RegisterActivity(可能在 onCreate 中),而不是显示自己。
我的主页需要显示两个按钮:登录和注册。带有两个按钮的登录页面 Activity 应该首先出现,但只会出现注册屏幕。
我对编码很陌生。所以,请保持友善 :( 我已经坚持了好几天了。
下面是AndroidManifest.xml。谁能发现我做错了什么?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.thrd">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".LoginActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".RegisterActivity"></activity>
<activity android:name=".UserAreaActivity"></activity>
</application>
</manifest>
你的清单文件没问题。可能您的代码中存在一些逻辑错误。在登录活动中。所以它启动 RegisterActivity(可能在 onCreate 中),而不是显示自己。