This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomAdapter extends RecyclerView.Adapter<CustomAdapter.MyViewHolder> { | |
private List<Pizza> mPizzaList; | |
private OnRecyclerViewItemClickListener listener; | |
public static class MyViewHolder extends RecyclerView.ViewHolder { | |
public TextView mTvPizzaName; | |
public ImageView mIvPizza; | |
public MyViewHolder(View itemView) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomAdapter extends RecyclerView.Adapter<CustomAdapter.MyViewHolder> { | |
private List<Pizza> mPizzaList; | |
public static class MyViewHolder extends RecyclerView.ViewHolder { | |
public TextView mTvPizzaName; | |
public ImageView mIvPizza; | |
public MyViewHolder(View itemView) { | |
super(itemView); | |
mTvPizzaName = itemView.findViewById(R.id.tv_pizzaname); | |
mIvPizza = itemView.findViewById(R.id.iv_pizza); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PizzaListActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_pizza_list); | |
RecyclerView recyclerView = findViewById(R.id.recycler_view); | |
List<Pizza> pizzaList = new ArrayList<>(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PizzaListActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_pizza_list); | |
RecyclerView recyclerView = findViewById(R.id.recycler_view); | |
List<Pizza> pizzaList = new ArrayList<>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface OnRecyclerViewItemClickListener { | |
void onItemClick(Pizza pizza_selected); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val et_nombre = findViewById<TextView>(R.id.et_nombre) | |
val button = findViewById<TextView>(R.id.button_enviar_nombre) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
button.setOnClickListener { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Toast.makeText(this,"mensaje que quieres mostrar",Toast.LENGTH_SHORT).show() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
button.setOnClickListener { | |
Toast.makeText(this,"El nombre que has ingresado es ${et_nombre.text}",Toast.LENGTH_LONG).show() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_login) | |
val mainActivityIntent = Intent(this, MainActivity::class.java) | |
startActivity(mainActivityIntent) | |
} |