-
Notifications
You must be signed in to change notification settings - Fork 0
/
Activity2.java
74 lines (68 loc) · 2.62 KB
/
Activity2.java
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
package com.example.hackmol;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.google.firebase.auth.FirebaseAuth;
public class Activity2 extends AppCompatActivity {
private Button signout;
private LinearLayout L1,L2,L3,L4,L5;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_2);
signout=findViewById(R.id.signout);
signout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
FirebaseAuth.getInstance().signOut();
Toast.makeText(Activity2.this,"Successfully Signed Out",Toast.LENGTH_SHORT).show();
startActivity(new Intent(Activity2.this,LogInScreen.class));
finish();
}
});
L1=findViewById(R.id.linear_view);
L2=findViewById(R.id.linear_view2);
L3=findViewById(R.id.linear_view3);
L4=findViewById(R.id.linear_view4);
L5=findViewById(R.id.linear_view5);
L1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent(Activity2.this,SellingPage.class);
startActivity(intent);
}
});
L2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent(Activity2.this,FurnitureSellingPage.class);
startActivity(intent);
}
});
L3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent(Activity2.this,PlasticSellingPage.class);
startActivity(intent);
}
});
L4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent(Activity2.this,ClothesSellingPage.class);
startActivity(intent);
}
});
L5.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent(Activity2.this,BrokCrocSellingPage.class);
startActivity(intent);
}
});
}
}