-
Notifications
You must be signed in to change notification settings - Fork 523
Expand file tree
/
Copy pathMainActivity.java
More file actions
72 lines (55 loc) · 2.19 KB
/
MainActivity.java
File metadata and controls
72 lines (55 loc) · 2.19 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package uk.co.deanwild.materialshowcaseviewsample;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView;
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button button = findViewById(R.id.btn_simple_example);
button.setOnClickListener(this);
button = findViewById(R.id.btn_custom_example);
button.setOnClickListener(this);
button = findViewById(R.id.btn_sequence_example);
button.setOnClickListener(this);
button = findViewById(R.id.btn_tooltip_example);
button.setOnClickListener(this);
button = findViewById(R.id.btn_recyclerview_example);
button.setOnClickListener(this);
button = findViewById(R.id.btn_reset_all);
button.setOnClickListener(this);
}
@Override
public void onClick(View v) {
Intent intent = null;
switch (v.getId()) {
case R.id.btn_simple_example:
intent = new Intent(this, SimpleSingleExample.class);
break;
case R.id.btn_custom_example:
intent = new Intent(this, CustomExample.class);
break;
case R.id.btn_sequence_example:
intent = new Intent(this, SequenceExample.class);
break;
case R.id.btn_tooltip_example:
intent = new Intent(this, TooltipExample.class);
break;
case R.id.btn_recyclerview_example:
intent = new Intent(this, RecyclerViewExample.class);
break;
case R.id.btn_reset_all:
MaterialShowcaseView.resetAll(this);
Toast.makeText(this, "All Showcases reset", Toast.LENGTH_SHORT).show();
break;
}
if (intent != null) {
startActivity(intent);
}
}
}