Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeHap committed Apr 22, 2018
1 parent b159b25 commit e784056
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
package edu.soft1614080902329.password_record;

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

public class soft1614080902329Activity extends AppCompatActivity{

public class soft1614080902329Activity extends AppCompatActivity {
private Button login_buttom = null;

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

login_buttom = findViewById(R.id.login);
login_buttom.setOnClickListener(new MyButtonListener());
}

class MyButtonListener implements View.OnClickListener {
public void onClick(View v) {
Intent intent = new Intent();
intent.setClass(soft1614080902329Activity.this, soft1614080902329RecordActivity.class);
soft1614080902329Activity.this.startActivity(intent);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package edu.soft1614080902329.password_record;

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

public class soft1614080902329RecordActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_soft1614080902329_record);
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
android:layout_marginTop="80px"
/>

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_password_logo"
android:layout_gravity="center_horizontal"
android:layout_marginTop="80px"
/>

<EditText
android:id="@+id/username"
android:layout_width="wrap_content"
Expand All @@ -31,7 +39,7 @@
android:textSize="26dp"
android:inputType="textPersonName"
android:layout_gravity="center_horizontal"
android:layout_marginTop="170px"
android:layout_marginTop="80px"
/>

<EditText
Expand All @@ -43,7 +51,7 @@
android:textSize="26dp"
android:inputType="textPassword"
android:layout_gravity="center_horizontal"
android:layout_marginTop="60px"
android:layout_marginTop="40px"
/>


Expand All @@ -56,6 +64,7 @@
android:layout_gravity="center_horizontal"
android:layout_marginTop="130px"
/>

</LinearLayout>

</android.support.constraint.ConstraintLayout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="edu.soft1614080902329.password_record.soft1614080902329RecordActivity">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>

<TextView
android:id="@+id/title_sys"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="跳转成功"
android:textSize="32dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="80px"
/>

</LinearLayout>

</android.support.constraint.ConstraintLayout>
16 changes: 16 additions & 0 deletions soft1614080902329/Password_Record/report3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 第2次实验

## 1.实验目标
* 将图片放入界面中
* 实现Activity间的跳转

## 2.实验步骤
* 设置TextView节点,将图片导入相应位置
* 实现OnClickListener接口,复写onClick方法,findViewById获取监听组件,startActivity执行跳转

## 3.实验结果
* 实验截图
![实验截图](https://github.com/OrangeHap/android-labs-2018/blob/master/soft1614080902329/second_labs.png)

## 4.实验体会
* 还好
Binary file added soft1614080902329/lab3_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 soft1614080902329/lab3_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e784056

Please sign in to comment.