I am making a quiz app in the google glass. After the clicking the main activity (Which is a question) the user is taken to a list of cards, in mCardScrollView (which are answers to the question in main activity), I want user to be taken to the next question only after the correct option (i.e card in cardscrollview) is clicked.
Currently I am using the following itemclicklistener which turns every card to a clickable item,
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// Plays disallowed sound to indicate that TAP actions are not supported.
AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
am.playSoundEffect(Sounds.DISALLOWED);
Toast.makeText(Questionactivity.this, "this is selected : " + position, Toast.LENGTH_SHORT).show();
//mCardScrollView.deactivate();
Intent gotoquestion;
gotoquestion = new Intent(Questionactivity.this, MainActivity.class);
startActivity(gotoquestion);
finish();
And I am trying to do something as follows on one of the card in cardscrollview,
mCards.add(new CardBuilder(this, CardBuilder.Layout.COLUMNS)
.setText("This card has a mosaic of puppies.")
.setFootnote("Aren't they precious?")
.addImage(R.drawable.ic_glass_logo));
.View.OnClickListener
Thanks!