forked from ariyantez/RKS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Toko.java
40 lines (34 loc) · 1.22 KB
/
Toko.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
package com.example.uasrks_ariyankt;
import androidx.appcompat.app.AppCompatActivity;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class Toko extends AppCompatActivity {
protected Cursor cursor;
Button gbr1, gbr2;
@SuppressLint("WrongViewCast")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_toko);
gbr1 = (Button) findViewById(R.id.hoodie1);
gbr2 = (Button) findViewById(R.id.hoodie2);
gbr1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent inte = new Intent(Toko.this, DetailBarang.class);
startActivity(inte);
}
});
gbr2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
Intent inte = new Intent(Toko.this, DetailBarang.class);
startActivity(inte);
}
});
}
}