0

申し訳ありませんが、エラーは別のものです。イメージボタンにあります。しかし、この問題は現在修正されています。そのため、R.id.none に変更します。しかし、正しい名前に変更すると、実行されないと思っていましたが実行されます。非常に奇妙な。

    imgbutton = (ImageButton) findViewById(R.id.none);

    imgbutton.setOnClickListener(new OnClickListener() {

            @Override
        public void onClick(View arg0) {

        Toast.makeText(Insertarlugar.this, "ImageButton is clicked!", 
                    Toast.LENGTH_SHORT).show();

          }

    });
}

    @Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.insertarlugar, menu);
    return true;
}

 }
4

0 に答える 0