Merge pull request #14 from N-YOKU-jp/CreateUi

Create UI
This commit is contained in:
ユタ氏 2024-06-14 12:50:46 +09:00 committed by GitHub
commit 79818ca141
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 169 additions and 84 deletions

View File

@ -1,29 +0,0 @@
{
"project_info": {
"project_number": "317219128586",
"project_id": "oplogy-b6971",
"storage_bucket": "oplogy-b6971.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:317219128586:android:c29583456e8fbd5f12a6f3",
"android_client_info": {
"package_name": "com.example.oplogy"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyDaULi2TFHLiscR7DSZBCKS08d76Rtb49c"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}

View File

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
@ -13,27 +15,30 @@
android:supportsRtl="true"
android:theme="@style/Theme.Oplogy"
tools:ignore="ExtraText"
tools:targetApi="31">
tools:targetApi="31" >
<!-- TODO: Before you run your application, you need a Google Maps API key.-->
<!--
TODO: Before you run your application, you need a Google Maps API key.
<!-- To get one, follow the directions here:-->
To get one, follow the directions here:
<!-- https://developers.google.com/maps/documentation/android-sdk/get-api-key-->
<!-- Once you have your API key (it starts with "AIza"), define a new property in your-->
<!-- project's local.properties file (e.g. MAPS_API_KEY=Aiza...), and replace the-->
<!-- "YOUR_API_KEY" string in this file with "${MAPS_API_KEY}".-->
https://developers.google.com/maps/documentation/android-sdk/get-api-key
Once you have your API key (it starts with "AIza"), define a new property in your
project's local.properties file (e.g. MAPS_API_KEY=Aiza...), and replace the
"YOUR_API_KEY" string in this file with "${MAPS_API_KEY}".
-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyBQ1Ak-I2NL5TP4K59ZI0VgzKk6HNZuusw" />
<activity
android:name=".Maps"
android:exported="false"
android:label="@string/title_activity_maps" />
<activity
android:name=".Map_Activity"
android:exported="false" />
<activity
android:name=".TutorialActivity"
android:exported="false" />
@ -49,16 +54,13 @@
<activity
android:name=".CreateUUID"
android:exported="false" />
<activity
android:name="com.example.oplogy.DialogFragment"
android:name=".DialogFragment"
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="true"
tools:ignore="DuplicateActivity">
tools:ignore="DuplicateActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@ -69,10 +71,3 @@
</manifest>

View File

@ -19,20 +19,18 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
// ID作成のTextViewとImageView
private TextView creatUUID;
private ImageView imageUuid;
private int previousCreateUUid = 0; //元の画像のインデックス
// セットアップのTextViewとImageView
private TextView setUp;
private ImageView imageSetup;
private int previousSetUp = 0; //元の画像のインデックス
// セットアップのTextViewとImageView
private TextView root;
private ImageView imageRoot;
private int previousRoot = 0; //元の画像のインデックス
// 提出状況のTextViewとImageView
private TextView submission;
private ImageView imageSubmission;
//firestoreの受信関連
private FirebaseFirestore db;
@ -61,6 +59,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
// 提出状況のインテント
submission = findViewById(R.id.submission);
submission.setOnClickListener(this);
imageSubmission = findViewById(R.id.imageSubmission);
// firestoreの受信関連
db = FirebaseFirestore.getInstance();
@ -93,7 +92,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
// ルート作成のクリック処理
if(view == root){
imageRoot.setImageResource(R.drawable.pin);
Intent toRoot = new Intent(MainActivity.this,RootSearchActivity.class);
Intent toRoot = new Intent(MainActivity.this, Map_Activity.class);
startActivity(toRoot);
}
// 提出状況のクリック処理

View File

@ -0,0 +1,50 @@
package com.example.oplogy;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
public class Map_Activity extends AppCompatActivity implements View.OnClickListener, OnMapReadyCallback {
ImageView toMain;
private GoogleMap mMap;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.map_activity);
// ボタンの戻る処理
toMain = findViewById(R.id.toMain);
toMain.setOnClickListener(this);
}
@Override
public void onClick(View view) {
if(view == toMain){
Intent toMain = new Intent(Map_Activity.this,MainActivity.class);
startActivity(toMain);
}
}
@Override
public void onMapReady(@NonNull GoogleMap googleMap) {
mMap = googleMap;
FragmentManager fragmentManager = getSupportFragmentManager();
}
}

View File

@ -1,7 +1,6 @@
package com.example.oplogy;
import androidx.fragment.app.FragmentActivity;
import android.os.Bundle;
import com.google.android.gms.maps.CameraUpdateFactory;
@ -15,7 +14,7 @@ import com.example.oplogy.databinding.MapsBinding;
public class Maps extends FragmentActivity implements OnMapReadyCallback {
private GoogleMap mMap;
private MapsBinding binding;
private MapsBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -75,17 +75,18 @@
<!-- ルート表示のレイアウト-->
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="400dp"
android:layout_height="0dp"
android:layout_weight="3"
android:weightSum="2"
android:layout_gravity="center"
android:orientation="horizontal">
<ImageView
android:id="@+id/imageRoot"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:src="@drawable/box_root"
android:src="@drawable/pin"
android:layout_weight="1"
/>
@ -104,18 +105,37 @@
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"/>
android:layout_weight="3"/>
<!-- 提出状況のレイアウト-->
<LinearLayout
android:layout_width="350dp"
android:layout_height="0dp"
android:layout_weight="3"
android:layout_gravity="center"
android:weightSum="2"
android:orientation="horizontal">
<ImageView
android:id="@+id/imageSubmission"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:src="@drawable/submission"
android:layout_weight="1"
/>
<TextView
android:id="@+id/submission"
android:layout_width="wrap_content"
android:layout_width="99dp"
android:layout_height="wrap_content"
android:text="提出状況"
android:textSize="40dp"
android:textStyle="bold"
android:layout_weight="1"
android:gravity="center"
android:gravity="left"
android:layout_gravity="center"/>
</LinearLayout>

View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="10"
tools:context=".Map_Activity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="10">
<ImageView
android:id="@+id/toMain"
android:layout_width="40dp"
android:layout_height="90dp"
android:src="@drawable/back_button"
android:layout_weight="5"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="4"
android:id="@+id/date"
android:hint="今日の日付"
android:textSize="40dp"
/>
</LinearLayout>
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="0dp"
android:id="@+id/map_fragment_container"
tools:context=".Map"
android:layout_weight="6"
android:name="com.google.android.gms.maps.SupportMapFragment"
/>
<ScrollView
android:id="@+id/scrollName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="3"
/>
</LinearLayout>

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
xmlns:map="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Maps" />
android:id="@+id/map"
tools:context=".Maps"
android:name="com.google.android.gms.maps.SupportMapFragment"/>

View File

@ -1,9 +0,0 @@
<?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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".SetupActivity">
</androidx.constraintlayout.widget.ConstraintLayout>