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