-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelpActivity.java
More file actions
94 lines (77 loc) · 2.65 KB
/
Copy pathHelpActivity.java
File metadata and controls
94 lines (77 loc) · 2.65 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
package com.org.proj;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnTouchListener;
import android.widget.Button;
public class HelpActivity extends Activity implements OnTouchListener{
Button getHelp,home,setting,play;
Handler mHandler;
View mv;
float x;
float y;
String Tag="hi";
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.help_screen);
//final MediaPlayer buttonSound=MediaPlayer.create(this,R.raw.button_1);
// MediaPlayer mp=MediaPlayer.create(this,R.raw.iron_man);
// mp.start();
View view=findViewById(R.id.scrollView1);
view.setOnTouchListener(this);
getHelp=(Button)findViewById(R.id.home);
getHelp.setBackgroundColor(Color.TRANSPARENT);
getHelp.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
// Log.d(Tag,"clicked");
Intent i=new Intent(HelpActivity.this,HomeActivity.class);
finish();
startActivity(i);
//buttonSound.start();
}
});
setting=(Button)findViewById(R.id.settings);
setting.setBackgroundColor(Color.TRANSPARENT);
setting.setOnClickListener(new OnClickListener()
{
public void onClick(View v){
Intent i=new Intent(HelpActivity.this,SettingsActivity.class);
finish();
startActivity(i);
//buttonSound.start();
}
});
play=(Button)findViewById(R.id.play2);
play.setBackgroundColor(Color.TRANSPARENT);
play.setOnClickListener(new OnClickListener()
{
public void onClick(View v){
Intent i=new Intent(HelpActivity.this,lock.class);
finish();
startActivity(i);
// buttonSound.start();
}
});
}
public boolean onTouch(View arg0, MotionEvent arg1) {
// TODO Auto-generated method stub
// final MediaPlayer buttonSound=MediaPlayer.create(this,R.raw.button_start);
x=arg1.getX();
y=arg1.getY();
// if(x<100||y>400)
// {
Intent i=new Intent(HelpActivity.this,SettingsActivity.class);
startActivity(i);
//buttonSound.start();
//
Log.d(Tag, "msg");
return false;
}
}