Skip to content

Commit

Permalink
Merge pull request #2557 from AisakaTaika/master
Browse files Browse the repository at this point in the history
#3 第三次实验
  • Loading branch information
zengsn authored Jun 2, 2018
2 parents 9dd2dbf + 7d5ffad commit 72f5318
Show file tree
Hide file tree
Showing 15 changed files with 624 additions and 3 deletions.
Binary file added soft1614080902435/3.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added soft1614080902435/3.2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added soft1614080902435/4.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added soft1614080902435/4.2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions soft1614080902435/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.pc.standardcalculator">
package="edu.hzuapps.androidlabs.Soft1614080902435">

<application
android:allowBackup="true"
Expand All @@ -9,13 +9,14 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<activity android:name=".Soft1614080902435">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".jiemianerActivity"></activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
package edu.hzuapps.androidlabs.Soft1614080902435;

public class Soft1614080902435 {
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

public class Soft1614080902435 extends AppCompatActivity implements View.OnClickListener {

Button b;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_soft1614080902435);
Log.d("dd","123");
b = (Button)findViewById(R.id.open);
b.setOnClickListener(this);
}
@Override
public void onClick(View view) {
if(view==b){
Intent intent = new Intent();
Log.d("dd","123");
intent.setClass(Soft1614080902435.this,jiemianerActivity.class);
startActivity(intent);
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package edu.hzuapps.androidlabs.Soft1614080902435;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.TextView;

public class jiemianerActivity extends AppCompatActivity implements View.OnClickListener {
TextView t[] = new TextView[19];
TextView counting,result;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_jiemianer);
this.RegisterEvent();
}
public void RegisterEvent(){
counting = (TextView) findViewById(R.id.counting);
result = (TextView) findViewById(R.id.result);
String str = "R.id.n_0";
t[0] = (TextView) findViewById(R.id.n_0);
t[1] = (TextView) findViewById(R.id.n_1);
t[2] = (TextView) findViewById(R.id.n_2);
t[3] = (TextView) findViewById(R.id.n_3);
t[4] = (TextView) findViewById(R.id.n_4);
t[5] = (TextView) findViewById(R.id.n_5);
t[6] = (TextView) findViewById(R.id.n_6);
t[7] = (TextView) findViewById(R.id.n_7);
t[8] = (TextView) findViewById(R.id.n_8);
t[9] = (TextView) findViewById(R.id.n_9);
t[10] = (TextView) findViewById(R.id.n_10);
t[11] = (TextView) findViewById(R.id.n_11);
t[12] = (TextView) findViewById(R.id.n_12);
t[13] = (TextView) findViewById(R.id.n_13);
t[14] = (TextView) findViewById(R.id.n_14);
t[15] = (TextView) findViewById(R.id.n_15);
t[16] = (TextView) findViewById(R.id.n_16);
t[17] = (TextView) findViewById(R.id.n_17);
t[18] = (TextView) findViewById(R.id.n_18);
for(int i=0;i<19;i++){
t[i].setOnClickListener(this);
}
}

@Override
public void onClick(View view) {
for(int i=0;i<19;i++){
if(t[i]==view){
String str = t[i].getText().toString();
Log.d("dd",str);
counting.setText(str);
}
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
170 changes: 170 additions & 0 deletions soft1614080902435/app/src/main/res/drawable/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillColor="#26A69A"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
</vector>
Loading

0 comments on commit 72f5318

Please sign in to comment.