MeteoriteDB

Log | Files | Refs | README

commit 45fe50b67031bf34bfe8bb20ad83fdf5ce72c3fb
parent f17507337ce55a4bfc017c9d3d5784dc4bbe8add
Author: William Lindholm <william_lindholm@outlook.com>
Date:   Wed,  3 May 2023 15:04:27 +0200

Created Meteorite activity for detailed view of meteorite.

Diffstat:
Mapp/src/main/AndroidManifest.xml | 4+++-
Aapp/src/main/java/com/example/project_assignment/meteorite_activity.java | 15+++++++++++++++
Aapp/src/main/res/layout/activity_meteorite.xml | 43+++++++++++++++++++++++++++++++++++++++++++
3 files changed, 61 insertions(+), 1 deletion(-)

diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml @@ -5,7 +5,6 @@ <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> - <application android:allowBackup="true" android:dataExtractionRules="@xml/data_extraction_rules" @@ -16,6 +15,9 @@ android:theme="@style/Theme.Projectassignment" tools:targetApi="31"> <activity + android:name=".meteorite_activity" + android:exported="false" /> + <activity android:name=".MainActivity" android:exported="true"> <intent-filter> diff --git a/app/src/main/java/com/example/project_assignment/meteorite_activity.java b/app/src/main/java/com/example/project_assignment/meteorite_activity.java @@ -0,0 +1,14 @@ +package com.example.project_assignment; + +import androidx.appcompat.app.AppCompatActivity; + +import android.os.Bundle; + +public class meteorite_activity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_meteorite); + } +} +\ No newline at end of file diff --git a/app/src/main/res/layout/activity_meteorite.xml b/app/src/main/res/layout/activity_meteorite.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/meteoriteLocation" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".meteorite_activity"> + + <com.google.android.gms.maps.MapView + android:id="@+id/mapView" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="28dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/textview_meteoriteTitle" /> + + <TextView + android:id="@+id/textview_meteoriteTitle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="40dp" + android:text="TextView" + android:textSize="25sp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.051" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/textview_meteoriteInfo" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="32dp" + android:text="TextView" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.498" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/mapView" /> +</androidx.constraintlayout.widget.ConstraintLayout> +\ No newline at end of file