インテント繋げました
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"?>
<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
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Oplogy"
tools:targetApi="31" >
<activity
android:name=".Main"
android:exported="false" />
<!--
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Oplogy"
tools:targetApi="31">
<!--
TODO: Before you run your application, you need a Google Maps API key.
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
"YOUR_API_KEY" string in this file with "${MAPS_API_KEY}".
-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOUR_API_KEY" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOUR_API_KEY" />
<activity
android:name=".Maps"
android:exported="false"
android:label="@string/title_activity_maps" />
<activity
android:name=".TutorialActivity"
android:exported="false" />
<activity
android:name=".NotSubmissionActivity"
android:exported="false" />
<activity
android:name=".SubmissionActivity"
android:exported="false" />
<activity
android:name=".RootSearchActivity"
android:exported="false" />
<activity
android:name=".SetupActivity"
android:exported="false" />
<activity
android:name=".CreateUUID"
android:exported="false" />
<activity
android:name=".MapsActivity"
android:exported="true"
android:label="@string/title_activity_maps" >
<activity
android:name=".Maps"
android:exported="false"
android:label="@string/title_activity_maps" />
<activity
android:name=".TutorialActivity"
android:exported="false" />
<activity
android:name=".SubmissionActivity"
android:exported="false" />
<activity
android:name=".RootSearchActivity"
android:exported="false" />
<activity
android:name=".SetupActivity"
android:exported="false" />
<activity
android:name=".CreateUUID"
android:exported="false" />
<!-- <intent-filter> -->
<!-- <action android:name="android.intent.action.MAIN" /> -->
<!-- <category android:name="android.intent.category.LAUNCHER" /> -->
<!-- </intent-filter> -->
</activity>
<activity
android:name=".MainActivity"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<activity
android:name="com.example.oplogy.DialogFragment"
android:exported="false"
/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@ -1,14 +1,13 @@
package com.example.oplogy;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class Main extends AppCompatActivity {
public class DialogFragment extends AppCompatActivity {
@Override
protected void onCreate(Bundle 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"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="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:orientation="vertical"
android:weightSum="20"
tools:context=".Main">
tools:context=".MainActivity">
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -156,7 +156,7 @@
android:orientation="horizontal">
<Button
android:id="@+id/Notsubmission"
android:id="@+id/notSubmission"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="未提出"