Skip to content

Commit

Permalink
hzuapps#4 hzuapps#1052 提交实验四代码
Browse files Browse the repository at this point in the history
  • Loading branch information
ReiujiTenshi committed Apr 19, 2019
1 parent 418d5ca commit 16cfea3
Show file tree
Hide file tree
Showing 13 changed files with 364 additions and 4 deletions.
8 changes: 4 additions & 4 deletions TouhouProject/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".Soft1714080902318MainActivity" />
<activity android:name=".SecondActivity" />
<activity android:name=".ThirdActivity" />
<activity android:name=".FourthActivity"></activity>
<activity android:name="com.example.gdy.soft1714080902318touhouproject.Soft1714080902318MainActivity" />
<activity android:name="com.example.gdy.soft1714080902318touhouproject.SecondActivity" />
<activity android:name="com.example.gdy.soft1714080902318touhouproject.ThirdActivity" />
<activity android:name="com.example.gdy.soft1714080902318touhouproject.FourthActivity"></activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package com.example.gdy.soft1714080902318touhouproject;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.example.gdy.touhouproject.R;

public class SecondActivity extends AppCompatActivity {

private TextView textView, textView1;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_second);

textView = (TextView)findViewById(R.id.button1);

textView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.setClass(SecondActivity.this, FourthActivity.class);
startActivity(intent);
}
});

textView1 = (TextView) findViewById(R.id.button2);

textView1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.setClass(SecondActivity.this, ThirdActivity.class);
startActivity(intent);
}
});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.example.gdy.soft1714080902318touhouproject;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.example.gdy.touhouproject.R;

public class Soft1714080902318MainActivity extends AppCompatActivity {
private TextView textView;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_soft1714080902318_main);

textView = (TextView)findViewById(R.id.button1);

textView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.setClass(Soft1714080902318MainActivity.this, SecondActivity.class);
startActivity(intent);
}
});
}




}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.example.gdy.soft1714080902318touhouproject;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.example.gdy.touhouproject.R;

public class ThirdActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_third);
}
}
17 changes: 17 additions & 0 deletions soft1714080902318/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.gdy.touhouproject">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".Soft1714080902318MainActivity" />
<activity android:name=".SecondActivity" />
<activity android:name=".ThirdActivity" />
<activity android:name=".FourthActivity"></activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.example.gdy.touhouproject;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class FourthActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_fourth);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package com.example.gdy.touhouproject;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class SecondActivity extends AppCompatActivity {

private TextView textView, textView1;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_second);

textView = (TextView)findViewById(R.id.button1);

textView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.setClass(SecondActivity.this, FourthActivity.class);
startActivity(intent);
}
});

textView1 = (TextView) findViewById(R.id.button2);

textView1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.setClass(SecondActivity.this, ThirdActivity.class);
startActivity(intent);
}
});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.example.gdy.touhouproject;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class Soft1714080902318MainActivity extends AppCompatActivity {
private TextView textView;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_soft1714080902318_main);

textView = (TextView)findViewById(R.id.button1);

textView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.setClass(Soft1714080902318MainActivity.this, SecondActivity.class);
startActivity(intent);
}
});
}




}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.example.gdy.touhouproject;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class ThirdActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_third);
}
}
49 changes: 49 additions & 0 deletions soft1714080902318/app/src/main/res/layout/activity_fourth.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.gdy.touhouproject.FourthActivity">

<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text="角色的姓名:"
android:ems="10"
android:id="@+id/editText2"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="71dp" />

<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text="角色的能力:"
android:ems="10"
android:id="@+id/editText3"
android:layout_below="@+id/editText2"
android:layout_centerHorizontal="true"
android:layout_marginTop="37dp" />

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="上传新角色"
android:id="@+id/button3"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />

<TextView
android:id="@+id/okuu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/koishi1"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" />
</RelativeLayout>
52 changes: 52 additions & 0 deletions soft1714080902318/app/src/main/res/layout/activity_second.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="@drawable/tenshi"
tools:context="com.example.gdy.touhouproject.SecondActivity">

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="新建角色"
android:id="@+id/button1"
android:layout_below="@+id/textView3"
android:layout_centerHorizontal="true"
android:layout_marginTop="68dp" />


<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="查看已拥有的角色"
android:id="@+id/button2"
android:layout_marginBottom="101dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="这里是沉浸于幻想之中的乐园"
android:id="@+id/textView2"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="(请选择要执行的操作:)"
android:id="@+id/textView3"
android:textColor="@color/colorAccent"
android:layout_below="@+id/textView2"
android:layout_alignRight="@+id/textView2"
android:layout_alignEnd="@+id/textView2"
android:layout_marginTop="50dp" />
</RelativeLayout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="@drawable/tenshi1"
tools:context="com.example.gdy.touhouproject.Soft1714080902318MainActivity">

<TextView
android:id="@+id/okuu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/utsuho"
android:text="欢迎来到东方求闻史记"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="点此开始"
android:id="@+id/button1"
android:layout_marginTop="44dp"
android:layout_below="@+id/okuu"
android:layout_alignLeft="@+id/okuu"
android:layout_alignStart="@+id/okuu"
android:layout_alignRight="@+id/okuu"
android:layout_alignEnd="@+id/okuu" />
</RelativeLayout>
19 changes: 19 additions & 0 deletions soft1714080902318/app/src/main/res/layout/activity_third.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.gdy.touhouproject.ThirdActivity">

<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/listView"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="118dp" />
</RelativeLayout>

0 comments on commit 16cfea3

Please sign in to comment.