私はこのようなボタンを持っています:
<Button
android:id="@+id/logout_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Log out"
/>
そして私にはこのようなリスナーがいます:
Button logout = (Button)findViewById(R.id.logout_button);
logout.setOnClickListener(new Button.OnClickListener()
{
public void onClick(View v)
{
Toast.makeText(getApplicationContext(), "Logging out. Please wait...", Toast.LENGTH_LONG).show();
sendEmail("Logout Chosen", "From home page, user clicked on logout" );
Intent myIntent = new Intent(ProblemioActivity.this, LogoutActivity.class);
ProblemioActivity.this.startActivity(myIntent);
}
});
これにあまり多くの変更を加えたのを覚えていませんが、ボタンが突然クリックに反応しなくなりました。面白いことに、同じページに他のボタンはすべてまだうまく機能しています。
なぜこれが起こるのか考えてみませんか?
ありがとう!