Skip to content

Commit 8884ebf

Browse files
committed
added intent to main activity
1 parent a456c63 commit 8884ebf

11 files changed

Lines changed: 87 additions & 9 deletions

File tree

.idea/gradle.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/main/java/com/barney/dmcprojectprayge/MainActivity.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,36 @@
22

33
import androidx.appcompat.app.AppCompatActivity;
44

5+
import android.content.Intent;
56
import android.os.Bundle;
7+
import android.view.View;
8+
import android.widget.Button;
69

710
public class MainActivity extends AppCompatActivity {
811

12+
913
@Override
1014
protected void onCreate(Bundle savedInstanceState) {
1115
super.onCreate(savedInstanceState);
1216
setContentView(R.layout.activity_main);
17+
18+
// Button btnHotel = findViewById(R.id.btnHotel);
19+
// Button btnRestaurant = findViewById(R.id.btnRestaurant);
20+
// Button btnTour = findViewById(R.id.btnTourSpot);
21+
}
22+
23+
public void sendMessage1(View view) {
24+
Intent intent = new Intent(MainActivity.this, ListHotelActivity.class);
25+
startActivity(intent);
26+
}
27+
28+
public void sendMessage2(View view) {
29+
Intent intent = new Intent(MainActivity.this, ListRestaurantActivity.class);
30+
startActivity(intent);
31+
}
32+
33+
public void sendMessage3(View view) {
34+
Intent intent = new Intent(MainActivity.this, ListTourSpotActivity.class);
35+
startActivity(intent);
1336
}
1437
}
7.54 KB
Loading
1.08 MB
Loading
3.28 MB
Loading
Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<LinearLayout
3+
xmlns:android="http://schemas.android.com/apk/res/android"
34
xmlns:app="http://schemas.android.com/apk/res-auto"
45
xmlns:tools="http://schemas.android.com/tools"
56
android:layout_width="match_parent"
67
android:layout_height="match_parent"
7-
tools:context=".ListHotelActivity">
8+
tools:context=".ListHotelActivity"
9+
android:orientation="vertical">
810

9-
</androidx.constraintlayout.widget.ConstraintLayout>
11+
<TextView
12+
android:gravity="center"
13+
android:layout_marginTop="40dp"
14+
android:textSize="20dp"
15+
android:text="ntar isi ny recycler view buat nampilin hotel"
16+
android:layout_width="match_parent"
17+
android:layout_height="wrap_content"/>
18+
19+
<ImageView
20+
android:layout_gravity="center"
21+
android:src="@drawable/download"
22+
android:layout_width="wrap_content"
23+
android:layout_height="wrap_content"/>
24+
25+
</LinearLayout>
Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<LinearLayout
3+
android:orientation="vertical"
4+
xmlns:android="http://schemas.android.com/apk/res/android"
35
xmlns:app="http://schemas.android.com/apk/res-auto"
46
xmlns:tools="http://schemas.android.com/tools"
57
android:layout_width="match_parent"
68
android:layout_height="match_parent"
79
tools:context=".ListRestaurantActivity">
810

9-
</androidx.constraintlayout.widget.ConstraintLayout>
11+
<TextView
12+
android:gravity="center"
13+
android:layout_marginTop="40dp"
14+
android:textSize="20dp"
15+
android:text="klo yg ini ntar isi ny recycler view buat nampilin restoran"
16+
android:layout_width="match_parent"
17+
android:layout_height="wrap_content"/>
18+
19+
<ImageView
20+
android:layout_gravity="center"
21+
android:src="@drawable/wanmin"
22+
android:layout_width="wrap_content"
23+
android:layout_height="250dp"/>
24+
25+
</LinearLayout>
Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<LinearLayout
3+
android:orientation="vertical"
4+
xmlns:android="http://schemas.android.com/apk/res/android"
35
xmlns:app="http://schemas.android.com/apk/res-auto"
46
xmlns:tools="http://schemas.android.com/tools"
57
android:layout_width="match_parent"
68
android:layout_height="match_parent"
79
tools:context=".ListTourSpotActivity">
810

9-
</androidx.constraintlayout.widget.ConstraintLayout>
11+
<TextView
12+
android:gravity="center"
13+
android:layout_marginTop="40dp"
14+
android:textSize="20dp"
15+
android:text="sama yg ini terakhir isi ny recycler view buat nampilin lokasi wisata"
16+
android:layout_width="match_parent"
17+
android:layout_height="wrap_content"/>
18+
19+
<ImageView
20+
android:layout_gravity="center"
21+
android:src="@drawable/img_1"
22+
android:layout_width="wrap_content"
23+
android:layout_height="300dp"/>
24+
25+
</LinearLayout>

0 commit comments

Comments
 (0)