In my application I am trying to click on the text view and redirect it to another location. But after opening the application, when I click on the text view, my application closes. Where am I making the mistake? Can you help me?
MainActivity;
txt_kayitsayfasinagit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(MainActivity.this,KaydolActivity.class));
}
});
TextView;
<TextView
android:id="@+id/txt_kayitsayfasinagit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hesabin_yok_mu_kaydol"
android:textColor="#B2B2B2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btn_giris"
app:layout_constraintVertical_bias="0.10" />
Manifest;
<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/Theme.Picker">
<activity android:name=".KaydolActivity" />
<activity android:name=".AnaSayfaActivity" />
<meta-data
android:name="com.google.android.actions"
android:resource="@xml/background_splash" />
<meta-data
android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />
<activity android:name=".SplashActivity" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Logcat;