-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInfoActivity.java
More file actions
42 lines (38 loc) · 1.39 KB
/
Copy pathInfoActivity.java
File metadata and controls
42 lines (38 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.example.itay.sumika;
import android.media.Image;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.ImageView;
public class InfoActivity extends AppCompatActivity {
ImageView rightArrow,leftArrow,instructions;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_info);
initializeVaribales();
initializeLiseners();
}
public void initializeVaribales(){
this.rightArrow=findViewById(R.id.right_arrow);
this.leftArrow=findViewById(R.id.left_arrow);
this.instructions=findViewById(R.id.imageView_instructions);
}
public void initializeLiseners(){
leftArrow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
instructions.setImageResource(R.drawable.menu_instruction);
}
});
rightArrow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
instructions.setImageResource(R.drawable.game_instruction);
}
});
}
}