나는 선형 레이어를 클릭 가능하게 설정했으며 버튼처럼 동작하고 새로운 활동을 시작하려고합니다. 그러나 나는 오류가있어. 여기가 된 .java 버튼 bProduct1 = (버튼) findViewById를 (R.id.llproduct1) 인Android 클릭 가능한 레이어
<LinearLayout
android:id="@+id/llproduct1"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:orientation="vertical" android:clickable="true">
<ImageView .... />
<TextView .... />
</LinearLayout>
.XML의 일부이고; bProduct1.setOnClickListener (새 View.OnClickListener() 잘못된 무엇 {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
startActivity(new Intent("com.testing.PRODUCTDESCRIPTION"));
}
는 당신이 얻을 오류가 무엇입니까? –
ClassCastException 분명히 – Blackbelt