学习记录(3.27)
学习时长:8h
代码行数:约200行
今天学习了团队的相关知识,这让我感受到了团队合作是一门很深的学问,而团队也是有多种多样的,他们各有优劣。之后进行了团队选题,我们小组决定了选择图片识别系统,又可以学习一些人工智能知识也可以做一些有新意的软件。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="欢迎使用图片分类系统" />
<Button
android:id="@+id/btn_tg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:text="跳过广告"
android:background="@color/teal_200"/>
</RelativeLayout>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center">
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:background="@color/teal_200"
android:layout_height="wrap_content"
android:text="广告位招租"
android:textSize="40dp"/>
</LinearLayout>
</LinearLayout>
package com.example.photo;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button button = findViewById(R.id.btn_tg);
button.setOnClickListener(this);
}
@Override
public void onClick(View view) {
Intent intent = new Intent();
intent.setClass(MainActivity.this,Menu.class);
startActivity(intent);
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="欢迎使用图像分类系统\n"
android:textSize="40dp"/>
<Button
android:id="@+id/btn_fenlei"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/teal_200"
android:text="图像分类"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/btn_history"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/teal_200"
android:text="历史记录"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/btn_chengfen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/teal_200"
android:text="查 成 分"/>
</LinearLayout>
package com.example.photo;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class Menu extends AppCompatActivity implements View.OnClickListener {
private Button fenlei;
private Button history;
private Button chengfen;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_menu);
fenlei = findViewById(R.id.btn_fenlei);
history = findViewById(R.id.btn_history);
chengfen = findViewById(R.id.btn_chengfen);
fenlei.setOnClickListener(this);
history.setOnClickListener(this);
chengfen.setOnClickListener(this);
}
@Override
public void onClick(View view)
{
if(view.getId()==R.id.btn_fenlei)
{
Intent intent = new Intent();
intent.setClass(Menu.this,Fenlei.class);
startActivity(intent);
}
if(view.getId()==R.id.btn_history)
{
Intent intent = new Intent();
intent.setClass(Menu.this,History.class);
startActivity(intent);
}
if(view.getId()==R.id.btn_chengfen)
{
Intent intent = new Intent();
intent.setClass(Menu.this,Chengfen.class);
startActivity(intent);
}
}
}



浙公网安备 33010602011771号