インテント繋げました
This commit is contained in:
oKikuti 2024-06-07 13:12:21 +09:00
parent 5ec3e7929c
commit 5bb1a225ba
10 changed files with 192 additions and 82 deletions

View File

@ -0,0 +1,29 @@
{
"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,21 +1,19 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" > xmlns:tools="http://schemas.android.com/tools">
<application <application
android:allowBackup="true" android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules" android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules" android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/Theme.Oplogy" android:theme="@style/Theme.Oplogy"
tools:targetApi="31" > tools:targetApi="31">
<activity
android:name=".Main" <!--
android:exported="false" />
<!--
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:
@ -26,51 +24,45 @@
project's local.properties file (e.g. MAPS_API_KEY=Aiza...), and replace the 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}". "YOUR_API_KEY" string in this file with "${MAPS_API_KEY}".
--> -->
<meta-data <meta-data
android:name="com.google.android.geo.API_KEY" android:name="com.google.android.geo.API_KEY"
android:value="YOUR_API_KEY" /> android:value="YOUR_API_KEY" />
<activity <activity
android:name=".Maps" android:name=".Maps"
android:exported="false" android:exported="false"
android:label="@string/title_activity_maps" /> android:label="@string/title_activity_maps" />
<activity <activity
android:name=".TutorialActivity" android:name=".TutorialActivity"
android:exported="false" /> android:exported="false" />
<activity <activity
android:name=".NotSubmissionActivity" android:name=".SubmissionActivity"
android:exported="false" /> android:exported="false" />
<activity <activity
android:name=".SubmissionActivity" android:name=".RootSearchActivity"
android:exported="false" /> android:exported="false" />
<activity <activity
android:name=".RootSearchActivity" android:name=".SetupActivity"
android:exported="false" /> android:exported="false" />
<activity <activity
android:name=".SetupActivity" android:name=".CreateUUID"
android:exported="false" /> android:exported="false" />
<activity
android:name=".CreateUUID"
android:exported="false" />
<activity
android:name=".MapsActivity"
android:exported="true"
android:label="@string/title_activity_maps" >
<!-- <intent-filter> --> <activity
<!-- <action android:name="android.intent.action.MAIN" /> --> android:name="com.example.oplogy.DialogFragment"
<!-- <category android:name="android.intent.category.LAUNCHER" /> --> android:exported="false"
<!-- </intent-filter> --> />
</activity>
<activity
android:name=".MainActivity"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <activity
</intent-filter> android:name=".MainActivity"
</activity> android:exported="true">
</application> <intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest> </manifest>

View File

@ -1,14 +1,13 @@
package com.example.oplogy; package com.example.oplogy;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle; import android.os.Bundle;
public class Main extends AppCompatActivity { public class DialogFragment extends AppCompatActivity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.main); setContentView(R.layout.dialog_fragment);
} }
} }

View File

@ -0,0 +1,103 @@
package com.example.oplogy;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity implements View.OnClickListener{
// 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; //元の画像のインデックス
// 未提出提出済みのボタン
private Button notSubmission;
private Button submission;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// ID作成用のインテント
creatUUID = findViewById(R.id.creatUUID);
creatUUID.setOnClickListener(this);
imageUuid = findViewById(R.id.imageUuid);
// セットアップ用のインテント
setUp = findViewById(R.id.setUp);
setUp.setOnClickListener(this);
imageSetup = findViewById(R.id.imageSetup);
// ルート作成用のインテント
root = findViewById(R.id.root);
root.setOnClickListener(this);
imageRoot = findViewById(R.id.imageRoot);
// 未提出のボタンのインテント
notSubmission = findViewById(R.id.notSubmission);
notSubmission.setOnClickListener(this);
// 未提出のボタンのインテント
submission = findViewById(R.id.submission);
submission.setOnClickListener(this);
}
// クリック処理
@Override
public void onClick(View view) {
// ID作成のクリック処理
if(view == creatUUID){
imageUuid.setImageResource(R.drawable.ischecked_uuid);
Intent toCreateUUID = new Intent(MainActivity.this, CreateUUID.class);
startActivity(toCreateUUID);
}
// セットアップのクリック処理
if(view == setUp){
imageSetup.setImageResource(R.drawable.ischecked_uuid);
Intent toSetup = new Intent(MainActivity.this,SetupActivity.class);
startActivity(toSetup);
}
// ルート作成のクリック処理
if(view == root){
imageRoot.setImageResource(R.drawable.pin);
Intent toRoot = new Intent(MainActivity.this,RootSearchActivity.class);
startActivity(toRoot);
}
if(view == notSubmission){
Intent toNotsubmission = new Intent(MainActivity.this,SubmissionActivity.class);
startActivity(toNotsubmission);
}
if(view == submission){
Intent toSubmission = new Intent(MainActivity.this,SubmissionActivity.class);
startActivity(toSubmission);
}
}
}

View File

@ -1,14 +0,0 @@
package com.example.oplogy;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class NotSubmissionActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.not_submission);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".NotSubmissionActivity"> tools:context=".DialogFragment">
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -6,7 +6,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:weightSum="20" android:weightSum="20"
tools:context=".Main"> tools:context=".MainActivity">
<Space <Space
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -156,7 +156,7 @@
android:orientation="horizontal"> android:orientation="horizontal">
<Button <Button
android:id="@+id/Notsubmission" android:id="@+id/notSubmission"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="未提出" android:text="未提出"