菊池
インテント繋げました
This commit is contained in:
parent
5ec3e7929c
commit
5bb1a225ba
29
app/src/google-services.json
Normal file
29
app/src/google-services.json
Normal 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"
|
||||||
|
}
|
|
@ -12,9 +12,7 @@
|
||||||
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.
|
||||||
|
|
||||||
|
@ -37,9 +35,6 @@
|
||||||
<activity
|
<activity
|
||||||
android:name=".TutorialActivity"
|
android:name=".TutorialActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
<activity
|
|
||||||
android:name=".NotSubmissionActivity"
|
|
||||||
android:exported="false" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".SubmissionActivity"
|
android:name=".SubmissionActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
@ -52,16 +47,12 @@
|
||||||
<activity
|
<activity
|
||||||
android:name=".CreateUUID"
|
android:name=".CreateUUID"
|
||||||
android:exported="false" />
|
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
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
|
@ -71,6 +62,7 @@
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
103
app/src/main/java/com/example/oplogy/MainActivity.java
Normal file
103
app/src/main/java/com/example/oplogy/MainActivity.java
Normal 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -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 |
BIN
app/src/main/res/drawable/map_icon.png
Normal file
BIN
app/src/main/res/drawable/map_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
|
@ -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>
|
|
@ -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="未提出"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user