Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class activity_fruit extends AppCompatActivity {
- TextView textView;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setTitle("Fruit");
- setContentView(R.layout.activity_fruit);
- textView = (TextView) findViewById(R.id.txtstatus);
- textView.setText(((Globals) this.getApplication()).getTaal());
- int fruit1 = R.drawable.kumato;
- ImageView targetImageView1 = findViewById(R.id.img_fruit1);
- targetImageView1.setOnClickListener(new DoubleClickListener() {
- @Override
- public void onSingleClick(View v) {
- if(textView.equals("ENG")) {
- Toast.makeText(getApplicationContext(), "eng single", Toast.LENGTH_SHORT).show();
- }
- if (textView.equals("")) {
- Toast.makeText(getApplicationContext(), "nl single", Toast.LENGTH_SHORT).show();
- }}
- @Override
- public void onDoubleClick(View v) {
- Toast.makeText(getApplicationContext(), "double", Toast.LENGTH_SHORT).show();
- }
- });
- Glide.with(this)
- .load(fruit1)
- .into(targetImageView1);
Add Comment
Please, Sign In to add comment