Button Privacy Policy doesn’t open the activity

  Kiến thức lập trình

I have the following code:

privacyButton = (Button)findViewById(R.id.buttonteste);
        privacyButton.setOnClickListener(new Button.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getApplicationContext(), Privacy.class);
                startActivity(intent);
            }
        });

However, in debug mode, it doens’t entered in the:

Intent intent = new Intent(getApplicationContext(), Privacy.class);
startActivity(intent);

The manifest file is like this:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.programa.logotipodeportugal">

    <application
        android:label="Logótipo de Portugal"
        android:hardwareAccelerated="true"
        android:icon="@drawable/icon">

        <activity
            android:name="com.programa.logotipodeportugal.Pong"
            android:theme="@android:style/Theme.NoTitleBar"
            android:screenOrientation="landscape"
            android:configChanges="keyboardHidden|orientation"
            android:exported="true">

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

        </activity>

        <!-- Acrescentando a activity Privacy -->
        <activity
            android:name="com.programa.logotipodeportugal.Privacy"
            android:theme="@android:style/Theme.NoTitleBar"
            android:screenOrientation="landscape"
            android:configChanges="keyboardHidden|orientation"
            android:exported="false"/>


    </application>

</manifest>

Why it doesn’t open the Privacy.class?

Kind regards,

LEAVE A COMMENT