Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianGJ committed Oct 25, 2014
2 parents f74a6ba + a5cf09b commit c3600db
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
19 changes: 19 additions & 0 deletions app/src/main/java/worten/aebd/com/worten/Product.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ public void onItemClick(AdapterView<?> pariente, View view, int posicion, long i
desc = (TextView) findViewById(R.id.desc);
desc.setText((CharSequence) producto.getDesc());

juego = (Button) findViewById(R.id.button3);


imagen = (ImageView) findViewById(R.id.imageView);
if (imagen != null)
imagen.setImageResource(producto.get_idImagen());
Expand Down Expand Up @@ -125,6 +128,22 @@ public void onClick(View v) {
});


juego.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
CharSequence texto = "Juega para ganar descuentos";
Toast toast = Toast.makeText(Product.this, texto, Toast.LENGTH_LONG);
toast.show();

Intent mainIntent = new Intent();
mainIntent = new Intent().setClass(
Product.this, Games.class);
startActivity(mainIntent);

}
});


}

@Override
Expand Down
18 changes: 18 additions & 0 deletions app/src/main/java/worten/aebd/com/worten/Scaner.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ public void onItemClick(AdapterView<?> pariente, View view, int posicion, long i
desc = (TextView) findViewById(R.id.desc);
desc.setText((CharSequence) producto.getDesc());

juego = (Button) findViewById(R.id.button3);


imagen = (ImageView) findViewById(R.id.imageView);
if (imagen != null)
imagen.setImageResource(producto.get_idImagen());
Expand Down Expand Up @@ -132,6 +135,21 @@ public void onClick(View v) {
}
});

juego.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
CharSequence texto = "Juega para ganar descuentos";
Toast toast = Toast.makeText(Scaner.this, texto, Toast.LENGTH_LONG);
toast.show();

Intent mainIntent = new Intent();
mainIntent = new Intent().setClass(
Scaner.this, Games.class);
startActivity(mainIntent);

}
});


}

Expand Down

0 comments on commit c3600db

Please sign in to comment.