クリック可能になるようにlinearlayerを設定し、ボタンのように機能して新しいアクティビティを開始したいと考えています。しかし、私はエラーが発生しました。ここに.xmlの一部があります
<LinearLayout
android:id="@+id/llproduct1"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:orientation="vertical" android:clickable="true">
<ImageView .... />
<TextView .... />
</LinearLayout>
これは .java ボタンです bProduct1 = (Button) findViewById(R.id.llproduct1); bProduct1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
startActivity(new Intent("com.testing.PRODUCTDESCRIPTION"));
}
何が悪かったのか?