补充实验

master
FinalJcsp 2 years ago
parent fc3d94f556
commit 3d9e621525

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<runningDeviceTargetSelectedWithDropDown>
<Target>
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="SERIAL_NUMBER" />
<value value="emulator-5554" />
</Key>
</deviceKey>
</Target>
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2023-04-01T11:11:38.454193600Z" />
</component>
</project>

@ -29,6 +29,24 @@
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".GoodsActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".PeopleActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

@ -0,0 +1,34 @@
package com.example.myapplication;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import java.util.ArrayList;
public class CustomAdapter extends ArrayAdapter<Item> {
public CustomAdapter(Context context, ArrayList<Item> items) {
super(context, 0, items);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
Item item = getItem(position);
if (convertView == null) {
convertView = LayoutInflater.from(getContext())
.inflate(R.layout.list_item, parent, false);
}
TextView price = (TextView) convertView.findViewById(R.id.price);
price.setText(item.getPrice());
System.out.println(price);
TextView name = (TextView) convertView.findViewById(R.id.name);
name.setText(item.getText());
ImageView imageView = (ImageView) convertView.findViewById(R.id.image);
imageView.setImageResource(item.getImageResourceId());
return convertView;
}
}

@ -0,0 +1,62 @@
package com.example.myapplication;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;
import androidx.appcompat.app.AppCompatActivity;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class GoodsActivity extends AppCompatActivity {
private static final String[] mListData = {"太阳", "水星", "金星", "地球", "火星", "木星", "土星", "天王星", "海王星", "谷神星", "冥王星", "鸟神星", "妊神星", "阋神星"};
private static final String[] strs = new String[]{
"一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二", "十三", "十四", "十五", "十六", "十七", "十八", "十九", "二十", "二十一", "二十二", "二十三"};
private ListView shoesList;
private Button shoesButton, clothesButton;
List mAddHeaderFooterList = new ArrayList<String>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_goods);
init();
shoesButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ArrayList<Item> items = new ArrayList<>();
items.add(new Item("599元", "欧文五", R.drawable.kyrie5));
items.add(new Item("699元", "欧文infinity", R.drawable.kyrieinfinity));
items.add(new Item("899元", "欧文low 五", R.drawable.kyrielow5));
CustomAdapter adapter = new CustomAdapter(GoodsActivity.this, items);
shoesList.setAdapter(adapter);
// shoesList.setAdapter(new ArrayAdapter<String>(GoodsActivity.this, android.R.layout.simple_list_item_1, strs));
}
});
clothesButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ArrayList<Item> items = new ArrayList<>();
items.add(new Item("599", "篮网球衣白", R.drawable.clothewhite));
items.add(new Item("699", "篮网球衣黑", R.drawable.clotheblack));
CustomAdapter adapter = new CustomAdapter(GoodsActivity.this, items);
shoesList.setAdapter(adapter);
}
});
}
void init() {
shoesButton = findViewById(R.id.shoes);
shoesList = findViewById(R.id.shoesView);
clothesButton = findViewById(R.id.clothes);
}
}

@ -0,0 +1,36 @@
package com.example.myapplication;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;
import android.widget.Toast;
import androidx.fragment.app.Fragment;
import java.util.List;
public class GoodsFragment extends Fragment {
private static final String[] strs = new String[]{
"一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二", "十三", "十四", "十五", "十六", "十七", "十八", "十九", "二十", "二十一", "二十二", "二十三"};
private ListView shoesList;
private Button shoesButton;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_goods, null);
return view;
}
void init(View view) {
shoesButton = view.findViewById(R.id.shoes);
shoesList = view.findViewById(R.id.shoesView);
}
}

@ -4,6 +4,7 @@ import android.app.Activity;
import android.app.Notification;
import android.content.ComponentName;
import android.content.Intent;
import android.icu.text.IDNA;
import android.os.Bundle;
import android.text.Editable;
import android.widget.Button;
@ -16,27 +17,41 @@ import org.w3c.dom.Text;
public class InfoActivity extends Activity {
private EditText usernameET;
private TextView nickName;
private Button back;
private Button back, goods, people;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_info);
initView();
System.out.println(usernameET == null);
Editable text = usernameET == null ? new Editable.Factory().newEditable("暂未填写") : usernameET.getText();
nickName.setText(text);
nickName.setText(getIntent().getCharSequenceExtra("username"));
back.setOnClickListener(v -> {
Intent intent = new Intent();
ComponentName componentName = new ComponentName(InfoActivity.this, MainActivity.class);
intent.setComponent(componentName);
startActivity(intent);
});
goods.setOnClickListener(v -> {
Intent intent = new Intent();
ComponentName componentName = new ComponentName(InfoActivity.this, GoodsActivity.class);
intent.setComponent(componentName);
startActivity(intent);
});
people.setOnClickListener(v -> {
Intent intent = new Intent();
ComponentName componentName = new ComponentName(InfoActivity.this, PeopleActivity.class);
intent.setComponent(componentName);
startActivity(intent);
});
}
private void initView(){
usernameET = findViewById(R.id.username);
nickName = findViewById(R.id.nickName);
back = findViewById(R.id.bt7);
goods = findViewById(R.id.goods);
people = findViewById(R.id.people);
}
}

@ -0,0 +1,26 @@
package com.example.myapplication;
public class Item {
private String mText;
private String price;
private int mImageResourceId;
public Item(String price, String text, int imageResourceId) {
this.price = price;
mText = text;
mImageResourceId = imageResourceId;
}
public String getText() {
return mText;
}
public String getPrice() {
return price;
}
public int getImageResourceId() {
return mImageResourceId;
}
}

@ -13,17 +13,26 @@ public class MainActivity extends AppCompatActivity {
Button loginB, newUser;
EditText usernameET, passwordET;
private static final String correctName = "admin";
private static final String correctPassword = "rootadmin";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
initView();
loginB.setOnClickListener(v -> {
Toast.makeText(MainActivity.this, "登录成功", Toast.LENGTH_LONG).show();
Intent intent = new Intent();
ComponentName componentName = new ComponentName(MainActivity.this, InfoActivity.class);
intent.setComponent(componentName);
startActivity(intent);
if (submit()) {
System.out.println(usernameET.getText());
Toast.makeText(MainActivity.this, "登录成功", Toast.LENGTH_LONG).show();
Intent intent = new Intent();
ComponentName componentName = new ComponentName(MainActivity.this, InfoActivity.class);
intent.setComponent(componentName);
intent.putExtra("username", usernameET.getText());
startActivity(intent);
}else{
Toast.makeText(MainActivity.this, "账号或密码输入错误", Toast.LENGTH_LONG).show();
}
});
newUser.setOnClickListener(v -> {
Intent intent = new Intent();
@ -42,4 +51,16 @@ public class MainActivity extends AppCompatActivity {
passwordET = findViewById(R.id.password);
newUser = findViewById(R.id.newUser);
}
boolean submit() {
return getUsername().equals(correctName) && getPassword().equals(correctPassword);
}
String getUsername() {
return usernameET.getText().toString();
}
String getPassword() {
return passwordET.getText().toString();
}
}

@ -0,0 +1,55 @@
package com.example.myapplication;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
public class PeopleActivity extends Activity {
private Button ylp, qxs, lsg, tyy, djx;
private TextView textView;
private ImageView imageView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.people);
initView();
ylp.setOnClickListener(v -> {
imageView.setImageResource(R.drawable.ylp);
textView.setText("袁隆平汉族江西德安人中国杂交水稻育种专家中国工程院院士和美国科学院外籍院士于1960年代至1970年代对杂交水稻品种的研究提高了中国大陆和世界各地的粮产获美誉“杂交水稻之父”。 1953年袁隆平毕业于西南农学院分发到湖南安江农业学校。");
});
qxs.setOnClickListener(v -> {
imageView.setImageResource(R.drawable.qxs);
textView.setText("钱学森,男,浙江临安人,生于上海,中国空气动力学家和系统科学家,工程控制论创始人之一,美国空军原上校,中国人民解放军特级文职干部、一级英雄模范,中国科学院院士暨中国工程院院士。");
});
lsg.setOnClickListener(v -> {
imageView.setImageResource(R.drawable.lsg);
textView.setText("李四光,字仲揆,原名李仲揆,男,湖北黄冈人,中国地质学家和古生物学家,大清工科进士,中华民国中央研究院院士,中华人民共和国中国科学院院士。");
});
tyy.setOnClickListener(v -> {
imageView.setImageResource(R.drawable.tyy);
textView.setText("屠呦呦1930年12月30日汉族中国共产党党员浙江省宁波人中国中医科学院终身研究员兼首席研究员中国中医科学院中药研究所青蒿素研究中心主任博士研究生导师抗疟药青蒿素和双氢青蒿素的发现者.这些抗疟药为亚洲南部、非洲和南美洲等热带发展中国家的人改善了健康状况是20世纪热带医学的显著突破。");
});
djx.setOnClickListener(v -> {
imageView.setImageResource(R.drawable.djx);
textView.setText("邓稼先安徽怀宁人中国理论物理学家核物理学家中国科学院学部委员第12届中共中央委员、九三学社中央委员。邓稼先本科毕业于中华民国的国立西南联大后赴美国求学、1950年获得普渡大学物理学博士学位。邓稼先为中华人民共和国的原子弹研制做出了重大贡献被誉为“两弹元勋”1999年被中国政府评为“两弹一星元勋”。");
});
}
private void initView() {
ylp = findViewById(R.id.ylp);
qxs = findViewById(R.id.qxs);
lsg = findViewById(R.id.lsg);
tyy = findViewById(R.id.tyy);
djx = findViewById(R.id.djx);
textView = findViewById(R.id.peopletext);
imageView = findViewById(R.id.peoplezp);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:id="@+id/fragment1"
android:name="com.example.myapplication.GoodsFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -176,8 +176,8 @@
android:gravity="left"
android:paddingLeft="10px"
android:paddingTop="12dp"
android:textSize="18dp"
android:text="湖南省" />
android:text="湖南省"
android:textSize="18dp" />
</LinearLayout>
@ -191,8 +191,8 @@
android:paddingTop="12dp"
android:text="爱好:"
android:textSize="18dp"
tools:ignore="DuplicateIds,RtlHardcoded"
android:textStyle="bold"/>
android:textStyle="bold"
tools:ignore="DuplicateIds,RtlHardcoded" />
</LinearLayout>
@ -207,6 +207,30 @@
android:textSize="15sp"
tools:ignore="DuplicateIds" />
<Button
android:id="@+id/goods"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:background="@color/blue"
android:gravity="center"
android:text="查看商品"
android:textSize="15sp"
tools:ignore="DuplicateIds" />
<Button
android:id="@+id/people"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:background="@color/blue"
android:gravity="center"
android:text="查看名人"
android:textSize="15sp"
tools:ignore="DuplicateIds" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/nike"></ImageView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<FrameLayout
android:id="@+id/fl_left"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
android:background="@color/white"
android:id="@+id/shoes"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="球 鞋 >"
android:textSize="20dp"
android:textColor="@color/black"></Button>
<Button
android:background="@color/white"
android:id="@+id/clothes"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="球 衣>"
android:textSize="20dp"
android:textColor="@color/black"></Button>
</LinearLayout>
</FrameLayout>
<FrameLayout
android:id="@+id/fl_right"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:background="@color/nike">
<ListView
android:id="@+id/shoesView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:entries="@array/goods"></ListView>
</FrameLayout>
<!-- <ListView-->
<!-- android:id="@+id/lv"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content" />-->
</LinearLayout>
</LinearLayout>

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:cardCornerRadius="8dp"
app:cardElevation="8dp"
app:cardUseCompatPadding="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:padding="8dp">
<ImageView
android:id="@+id/image"
android:layout_width="80dp"
android:layout_height="100dp"
android:scaleType="centerInside"
app:srcCompat="@drawable/flowerr" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="59dp"
android:text="Product Name"
android:textSize="16sp"
android:textStyle="bold"
android:layout_marginBottom="8dp"/>
<TextView
android:id="@+id/price"
android:layout_width="match_parent"
android:layout_height="35dp"
android:text="Price: $9.99"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:padding="8dp">
<ImageView
android:id="@+id/image"
android:layout_width="80dp"
android:layout_height="50dp"
android:scaleType="centerInside"
app:srcCompat="@drawable/flowerr" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Product Name"
android:textSize="19sp"
android:textStyle="bold" />
<TextView
android:id="@+id/price"
android:layout_width="match_parent"
android:layout_height="30dp"
android:text="Price: $9.99"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="10dp">
<!-- <ImageView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="match_parent"-->
<!-- android:src="@drawable/nike"></ImageView>-->
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<FrameLayout
android:id="@+id/fl_left"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:id="@+id/ylp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:text="孔子"
android:textColor="@color/black"
android:textSize="20dp"></Button>
<Button
android:id="@+id/djx"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:text="宋庆龄"
android:textColor="@color/black"
android:textSize="20dp"></Button>
<Button
android:id="@+id/tyy"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:text="宋美龄"
android:textColor="@color/black"
android:textSize="20dp"></Button>
<Button
android:id="@+id/lsg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:text="胡适"
android:textColor="@color/black"
android:textSize="20dp"></Button>
<Button
android:id="@+id/qxs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:text="钱学森"
android:textColor="@color/black"
android:textSize="20dp"></Button>
</LinearLayout>
</FrameLayout>
<FrameLayout
android:id="@+id/fl_right"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="2"
android:background="@color/nike">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/kz"
android:layout_width="100dp"
android:layout_height="130dp"
android:src="@drawable/kz"></ImageView>
<TextView
android:id="@+id/peopletext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="孔子公元前551年-公元前479年4月11日子姓孔氏名丘字仲尼春秋时期鲁国陬邑今山东省曲阜市祖籍宋国栗邑今河南省夏邑县中国古代伟大的思想家、政治家、教育家儒家学派创始人、“大成至圣先师”。"
android:textSize="15dp"></TextView>
</LinearLayout>
</FrameLayout>
<!-- <ListView-->
<!-- android:id="@+id/lv"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content" />-->
</LinearLayout>
</LinearLayout>

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="10dp">
<!-- <ImageView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="match_parent"-->
<!-- android:src="@drawable/nike"></ImageView>-->
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<FrameLayout
android:id="@+id/fl_left"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:id="@+id/ylp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:text="袁隆平 >"
android:textColor="@color/black"
android:textSize="20dp"></Button>
<Button
android:id="@+id/djx"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:text="邓稼先>"
android:textColor="@color/black"
android:textSize="20dp"></Button>
<Button
android:id="@+id/tyy"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:text="屠呦呦>"
android:textColor="@color/black"
android:textSize="20dp"></Button>
<Button
android:id="@+id/lsg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:text="李四光>"
android:textColor="@color/black"
android:textSize="20dp"></Button>
<Button
android:id="@+id/qxs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:text="钱学森>"
android:textColor="@color/black"
android:textSize="20dp"></Button>
</LinearLayout>
</FrameLayout>
<FrameLayout
android:id="@+id/fl_right"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="2"
android:background="@color/nike">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/peoplezp"
android:layout_width="100dp"
android:layout_height="130dp"
android:src="@drawable/ylp"></ImageView>
<TextView
android:id="@+id/peopletext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text=" 袁隆平汉族江西德安人中国杂交水稻育种专家中国工程院院士和美国科学院外籍院士于1960年代至1970年代对杂交水稻品种的研究提高了中国大陆和世界各地的粮产获美誉“杂交水稻之父”。 1953年袁隆平毕业于西南农学院分发到湖南安江农业学校。"
android:textSize="15dp"></TextView>
</LinearLayout>
</FrameLayout>
<!-- <ListView-->
<!-- android:id="@+id/lv"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content" />-->
</LinearLayout>
</LinearLayout>

@ -8,4 +8,5 @@
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="blue"> #1E90FF</color>
<color name="nike">#EAEAEF</color>
</resources>

@ -38,4 +38,15 @@
<item>哈尔滨</item>
<item>沈阳</item>
</array>
<string-array name="goods">
<!-- <item>北京</item>-->
<!-- <item>上海</item>-->
<!-- <item>广州</item>-->
<!-- <item>深圳</item>-->
<!-- <item>郑州</item>-->
<!-- <item>成都</item>-->
</string-array>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources>

@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.MyApplication" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<style name="Theme.MyApplication" parent="Theme.MaterialComponents.DayNight.DarkActionBar.Bridge">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/blue</item>
<item name="colorPrimaryVariant">@color/blue</item>

Loading…
Cancel
Save