Android代码第一次提交

This commit is contained in:
Levi 2024-10-27 23:18:07 +08:00
commit c0ca9316e0
105 changed files with 4547 additions and 0 deletions

15
.gitignore vendored Normal file
View File

@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties

3
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

1
.idea/.name Normal file
View File

@ -0,0 +1 @@
My Application

6
.idea/compiler.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="17" />
</component>
</project>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetSelector">
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
<DropdownSelection timestamp="2024-10-27T07:07:49.151573Z">
<Target type="DEFAULT_BOOT">
<handle>
<DeviceId pluginId="LocalEmulator" identifier="path=C:\Users\Levi\.android\avd\Pixel_4_XL_API_31.avd" />
</handle>
</Target>
</DropdownSelection>
<DialogSelection />
</SelectionState>
</selectionStates>
</component>
</project>

19
.idea/gradle.xml Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveExternalAnnotations" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>

10
.idea/migrations.xml Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectMigrations">
<option name="MigrateToGradleLocalJavaHome">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</component>
</project>

10
.idea/misc.xml Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

1
app/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

69
app/build.gradle Normal file
View File

@ -0,0 +1,69 @@
plugins {
alias(libs.plugins.android.application)
}
android {
namespace 'com.c202101020117'
compileSdk 34
defaultConfig {
applicationId "com.c202101020117"
minSdk 24
targetSdk 34
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
// implementation libs.appcompat
// implementation libs.material
// implementation libs.activity
// implementation libs.constraintlayout
// testImplementation libs.junit
// androidTestImplementation libs.ext.junit
// androidTestImplementation libs.espresso.core
implementation 'com.github.bumptech.glide:glide:4.4.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation("com.squareup.okhttp3:okhttp:4.11.0")
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
//
implementation 'com.geyifeng.immersionbar:immersionbar:3.2.2'
// kotlin扩展
implementation 'com.geyifeng.immersionbar:immersionbar-ktx:3.2.2'
// fragment快速实现
implementation 'com.geyifeng.immersionbar:immersionbar-components:3.2.2'
implementation 'io.github.scwang90:refresh-layout-kernel:2.0.5'//
implementation 'io.github.scwang90:refresh-header-classics:2.0.5'//
implementation 'io.github.scwang90:refresh-header-radar:2.0.5'//
implementation 'io.github.scwang90:refresh-header-falsify:2.0.5'//
implementation 'io.github.scwang90:refresh-header-material:2.0.5' //
implementation 'io.github.scwang90:refresh-header-two-level:2.0.5' //
implementation 'io.github.scwang90:refresh-footer-ball:2.0.5' //
implementation 'io.github.scwang90:refresh-footer-classics:2.0.5' //
}

21
app/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -0,0 +1,26 @@
package com.c202101020117;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.c202101020117", appContext.getPackageName());
}
}

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.MyApplication"
android:usesCleartextTraffic="true">
<activity
android:name=".Action.Action5"
android:exported="false" />
<activity
android:name=".Action.Action4"
android:exported="false" />
<activity
android:name=".Action.Action3"
android:exported="false" />
<activity
android:name=".Action.Action2"
android:exported="false" />
<activity
android:name=".Action.Action1"
android:exported="false" />
<activity
android:name=".Action.DetailedInformation"
android:exported="false" />
<activity
android:name=".Home"
android:exported="false" />
<activity
android:name=".Login"
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
<!--<manifest xmlns:android="http://schemas.android.com/apk/res/android"-->
<!-- xmlns:tools="http://schemas.android.com/tools">-->
<!-- <application-->
<!-- android:allowBackup="true"-->
<!-- android:dataExtractionRules="@xml/data_extraction_rules"-->
<!-- android:fullBackupContent="@xml/backup_rules"-->
<!-- android:icon="@mipmap/ic_launcher"-->
<!-- android:label="@string/app_name"-->
<!-- android:roundIcon="@mipmap/ic_launcher_round"-->
<!-- android:supportsRtl="true"-->
<!-- android:theme="@style/Theme.MyApplication"-->
<!-- tools:targetApi="31">-->
<!-- <activity-->
<!-- android:name=".MainActivity"-->
<!-- android:exported="true">-->
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.MAIN" />-->
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
<!-- </intent-filter>-->
<!-- </activity>-->
<!-- </application>-->
<!--</manifest>-->

View File

@ -0,0 +1,226 @@
package com.c202101020117.Action;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.bumptech.glide.Glide;
import com.c202101020117.Home;
import com.c202101020117.Login;
import com.c202101020117.package1.Api;
import com.c202101020117.package1.Drug3;
import com.c202101020117.package1.InformationList;
import com.c202101020117.package1.MySQLiteOpenHelper;
import com.c202101020117.R;
import com.c202101020117.package1.Drug2;
import com.gyf.immersionbar.ImmersionBar;
import com.scwang.smart.refresh.footer.ClassicsFooter;
import com.scwang.smart.refresh.header.ClassicsHeader;
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.scwang.smart.refresh.layout.api.RefreshLayout;
import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
import java.util.ArrayList;
import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class Action1 extends AppCompatActivity {
RecyclerView recyclerView;
MyAdapter myAdapter;
List<Drug2> drug2List = new ArrayList<>();
TextView back;
List<InformationList.InformationlistBean> informationListBeans;
SmartRefreshLayout smartRefreshLayout;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_action1);
ImmersionBar.with(this).init();
informationListBeans = new ArrayList<>();
myAdapter = new MyAdapter();
recyclerView = findViewById(R.id.recyclerView2);
recyclerView.setAdapter(myAdapter);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
smartRefreshLayout=findViewById(R.id.smarlayout1);
smartRefreshLayout.setRefreshHeader(new ClassicsHeader(this));
smartRefreshLayout.setRefreshFooter(new ClassicsFooter(this));
//列表下拉刷新
smartRefreshLayout.setOnRefreshListener(new OnRefreshListener() {
@Override
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
smartRefreshLayout.finishRefresh(500);
//列表旧数据清除
drug2List.clear();
//构造数据
MySQLiteOpenHelper mySQLiteOpenHelper = new MySQLiteOpenHelper(Action1.this,"test1.db",null,1);
SQLiteDatabase db = mySQLiteOpenHelper.getWritableDatabase();
Cursor cursor = db.query("Drugs",new String[] {"Dno","Dname","Dclassification","Quantity_required","Sno"},null,null,null,null,null);
Cursor cursor1 = db.query("Sum_view",new String[] {"Dno","sum"},null,null,null,null,null);
while (cursor.moveToNext()){
Drug2 drug2 = new Drug2();
drug2.Dno = cursor.getString(0);
drug2.Dname = cursor.getString(1);
drug2.Quantity_required = cursor.getInt(3);
drug2.Sno = cursor.getString(4);
while (cursor1.moveToNext()){
if(drug2.Dno.equals(cursor1.getString(0))){
drug2.Quantity = cursor1.getInt(1);
if(drug2.Quantity-drug2.Quantity_required<0){
drug2List.add(drug2);
}
}
}
cursor1.moveToFirst();
}
myAdapter.notifyDataSetChanged();
}
});
MySQLiteOpenHelper mySQLiteOpenHelper = new MySQLiteOpenHelper(Action1.this,"test1.db",null,1);
SQLiteDatabase db = mySQLiteOpenHelper.getWritableDatabase();
Cursor cursor = db.query("Drugs",new String[] {"Dno","Dname","Dclassification","Quantity_required","Sno"},null,null,null,null,null);
Cursor cursor1 = db.query("Sum_view",new String[] {"Dno","sum"},null,null,null,null,null);
while (cursor.moveToNext()){
Drug2 drug2 = new Drug2();
drug2.Dno = cursor.getString(0);
drug2.Dname = cursor.getString(1);
drug2.Quantity_required = cursor.getInt(3);
drug2.Sno = cursor.getString(4);
while (cursor1.moveToNext()){
if(drug2.Dno.equals(cursor1.getString(0))){
drug2.Quantity = cursor1.getInt(1);
if(drug2.Quantity-drug2.Quantity_required<0){
drug2List.add(drug2);
}
}
}
cursor1.moveToFirst();
}
myAdapter.notifyDataSetChanged();
back = findViewById(R.id.textView64);
back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
}
public class MyAdapter extends RecyclerView.Adapter<MyViewHoler>{
@NonNull
@Override
//加载布局文件
public MyViewHoler onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(Action1.this)
.inflate(R.layout.item2_layout,parent,false);
MyViewHoler myViewHoler = new MyViewHoler(view);
return myViewHoler;
}
@Override
//每个条目加载一次该方法就会被调用一次
public void onBindViewHolder(@NonNull MyViewHoler holder, int position) {
holder.DnoTv.setText(drug2List.get(position).Dno);
holder.DnameTv.setText(drug2List.get(position).Dname);
holder.Quantity_required.setText(drug2List.get(position).Quantity_required+"");
holder.QuantityTv.setText(drug2List.get(position).Quantity+"");
holder.SnoTv.setText(drug2List.get(position).Sno);
holder.constraintLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
SharedPreferences sharedPreferences = getSharedPreferences("action1",MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean("need",true);
editor.putString("Dno",holder.DnoTv.getText()+"");
editor.commit();
Intent intent = new Intent(Action1.this, Action4.class);
startActivity(intent);
}
});
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("https://www.fastmock.site/")
.addConverterFactory(GsonConverterFactory.create()) //返回结果用Gson解析
.build();
Api api = retrofit.create(Api.class);
Call<InformationList> informationListCall = api.getInformationList();
informationListCall.enqueue(new Callback<InformationList>() {
@Override
public void onResponse(Call<InformationList> call, Response<InformationList> response) {
informationListBeans.addAll(response.body().informationlist);
for(int i=0;i<informationListBeans.size();i++){
InformationList.InformationlistBean informationListBean;
informationListBean = informationListBeans.get(i);
if(informationListBean.Dno.equals(holder.DnoTv.getText())){
Glide.with(Action1.this).load(informationListBean.head).into(holder.imageView);
}
}
}
@Override
public void onFailure(Call<InformationList> call, Throwable t) {
}
});
}
@Override
//用来控制限制列表条数
public int getItemCount() {
return drug2List.size();
}
}
//缓存列表数据
public class MyViewHoler extends RecyclerView.ViewHolder{
TextView DnoTv;
TextView DnameTv;
TextView Quantity_required;
TextView QuantityTv;
TextView SnoTv;
ConstraintLayout constraintLayout;
ImageView imageView;
public MyViewHoler(@NonNull View itemView) {
super(itemView);
DnoTv = itemView.findViewById(R.id.textView48);
DnameTv = itemView.findViewById(R.id.textView46);
Quantity_required = itemView.findViewById(R.id.textView52);
QuantityTv = itemView.findViewById(R.id.textView53);
SnoTv = itemView.findViewById(R.id.textView50);
imageView = itemView.findViewById(R.id.imageView14);
constraintLayout = itemView.findViewById(R.id.constraintLayout13);
}
}
}

View File

@ -0,0 +1,223 @@
package com.c202101020117.Action;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.c202101020117.package1.Api;
import com.c202101020117.package1.InformationList;
import com.c202101020117.package1.MySQLiteOpenHelper;
import com.c202101020117.R;
import com.c202101020117.package1.Drug3;
import com.gyf.immersionbar.ImmersionBar;
import com.scwang.smart.refresh.footer.ClassicsFooter;
import com.scwang.smart.refresh.header.ClassicsHeader;
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.scwang.smart.refresh.layout.api.RefreshLayout;
import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
import java.util.ArrayList;
import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class Action2 extends AppCompatActivity {
RecyclerView recyclerView;
MyAdapter myAdapter;
List<Drug3> drug3List = new ArrayList<>();
TextView back;
List<InformationList.InformationlistBean> informationListBeans;
SmartRefreshLayout smartRefreshLayout;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_action2);
ImmersionBar.with(this).init();
informationListBeans = new ArrayList<>();
myAdapter = new MyAdapter();
recyclerView = findViewById(R.id.recyclerView3);
recyclerView.setAdapter(myAdapter);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
smartRefreshLayout=findViewById(R.id.smarlayout);
smartRefreshLayout.setRefreshHeader(new ClassicsHeader(this));
smartRefreshLayout.setRefreshFooter(new ClassicsFooter(this));
//列表下拉刷新
smartRefreshLayout.setOnRefreshListener(new OnRefreshListener() {
@Override
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
smartRefreshLayout.finishRefresh(500);
//列表旧数据清除
drug3List.clear();
//构造数据
MySQLiteOpenHelper mySQLiteOpenHelper = new MySQLiteOpenHelper(Action2.this,"test1.db",null,1);
SQLiteDatabase db = mySQLiteOpenHelper.getWritableDatabase();
Cursor cursor1 = db.query("Information_view",new String[] {"Dno","Dname","Sno","MFD","EXP","Datediff","Quantity"},null,null,null,null,null);
while (cursor1.moveToNext()){
Drug3 drug3 = new Drug3();
drug3.Datediff = cursor1.getDouble(5);
if(drug3.Datediff<=15){
drug3.Dno = cursor1.getString(0);
drug3.Dname = cursor1.getString(1);
drug3.Sno = cursor1.getString(2);
drug3.MFD = cursor1.getString(3);
drug3.EXP = cursor1.getString(4);
drug3.Quantity = cursor1.getInt(6);
drug3List.add(drug3);
}
}
myAdapter.notifyDataSetChanged();
}
});
MySQLiteOpenHelper mySQLiteOpenHelper = new MySQLiteOpenHelper(Action2.this,"test1.db",null,1);
SQLiteDatabase db = mySQLiteOpenHelper.getWritableDatabase();
Cursor cursor = db.query("Information_view",new String[] {"Dno","Dname","Sno","MFD","EXP","Datediff","Quantity"},null,null,null,null,null);
while (cursor.moveToNext()){
Drug3 drug3 = new Drug3();
drug3.Datediff = cursor.getDouble(5);
if(drug3.Datediff<=15){
drug3.Dno = cursor.getString(0);
drug3.Dname = cursor.getString(1);
drug3.Sno = cursor.getString(2);
drug3.MFD = cursor.getString(3);
drug3.EXP = cursor.getString(4);
drug3.Quantity = cursor.getInt(6);
drug3List.add(drug3);
}
}
myAdapter.notifyDataSetChanged();
back = findViewById(R.id.textView67);
back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
}
public class MyAdapter extends RecyclerView.Adapter<MyViewHoler>{
@NonNull
@Override
//加载布局文件
public MyViewHoler onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(Action2.this)
.inflate(R.layout.item3_layout,parent,false);
MyViewHoler myViewHoler = new MyViewHoler(view);
return myViewHoler;
}
@Override
//每个条目加载一次该方法就会被调用一次
public void onBindViewHolder(@NonNull MyViewHoler holder, int position) {
holder.DnoTv.setText(drug3List.get(position).Dno);
holder.DnameTv.setText(drug3List.get(position).Dname);
holder.SnoTv.setText(drug3List.get(position).Sno);
holder.MFDTv.setText(drug3List.get(position).MFD);
holder.EXPTv.setText(drug3List.get(position).EXP);
holder.DatediffTv.setText((int)(drug3List.get(position).Datediff)+"");
holder.QuantityTv.setText(drug3List.get(position).Quantity+"");
holder.constraintLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
SharedPreferences sharedPreferences = getSharedPreferences("action2",MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean("need",true);
editor.putString("Dno",holder.DnoTv.getText()+"");
editor.putString("MFD",holder.MFDTv.getText()+"");
editor.putString("EXP",holder.EXPTv.getText()+"");
editor.putString("Quantity",holder.QuantityTv.getText()+"");
editor.commit();
Intent intent = new Intent(Action2.this, Action5.class);
startActivity(intent);
}
});
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("https://www.fastmock.site/")
.addConverterFactory(GsonConverterFactory.create()) //返回结果用Gson解析
.build();
Api api = retrofit.create(Api.class);
Call<InformationList> informationListCall = api.getInformationList();
informationListCall.enqueue(new Callback<InformationList>() {
@Override
public void onResponse(Call<InformationList> call, Response<InformationList> response) {
informationListBeans.addAll(response.body().informationlist);
for(int i=0;i<informationListBeans.size();i++){
InformationList.InformationlistBean informationListBean;
informationListBean = informationListBeans.get(i);
if(informationListBean.Dno.equals(holder.DnoTv.getText())){
Glide.with(Action2.this).load(informationListBean.head).into(holder.imageView);
}
}
}
@Override
public void onFailure(Call<InformationList> call, Throwable t) {
}
});
}
@Override
//用来控制限制列表条数
public int getItemCount() {
return drug3List.size();
}
}
//缓存列表数据
public class MyViewHoler extends RecyclerView.ViewHolder{
//Dno,Dname,Sno,MFD,EXP,Datediff,Quantity
TextView DnoTv;
TextView DnameTv;
TextView SnoTv;
TextView MFDTv;
TextView EXPTv;
TextView DatediffTv;
TextView QuantityTv;
ImageView imageView;
ConstraintLayout constraintLayout;
public MyViewHoler(@NonNull View itemView) {
super(itemView);
DnoTv = itemView.findViewById(R.id.textView58);
DnameTv = itemView.findViewById(R.id.textView55);
SnoTv = itemView.findViewById(R.id.textView61);
MFDTv = itemView.findViewById(R.id.textView71);
EXPTv = itemView.findViewById(R.id.textView73);
DatediffTv = itemView.findViewById(R.id.textView62);
QuantityTv = itemView.findViewById(R.id.textView59);
imageView = itemView.findViewById(R.id.imageView15);
constraintLayout = itemView.findViewById(R.id.action2_item);
}
}
}

View File

@ -0,0 +1,21 @@
package com.c202101020117.Action;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import com.c202101020117.R;
import com.gyf.immersionbar.ImmersionBar;
public class Action3 extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_action3);
ImmersionBar.with(this).init();
}
}

View File

@ -0,0 +1,81 @@
package com.c202101020117.Action;
import androidx.appcompat.app.AppCompatActivity;
import android.content.ContentValues;
import android.content.SharedPreferences;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.c202101020117.R;
import com.c202101020117.package1.MySQLiteOpenHelper;
import com.gyf.immersionbar.ImmersionBar;
public class Action4 extends AppCompatActivity {
TextView back;
EditText text1;
EditText text2;
EditText text3;
EditText text4;
TextView confirm;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_action4);
ImmersionBar.with(this).init();
text1 = findViewById(R.id.editTextTextPersonName5);
text2 = findViewById(R.id.editTextTextPersonName4);
text3 = findViewById(R.id.editTextTextPersonName3);
text4 = findViewById(R.id.editTextTextPersonName6);
confirm = findViewById(R.id.textView78);
SharedPreferences sharedPreferences = getSharedPreferences("action1",MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
Boolean need = sharedPreferences.getBoolean("need",false);
if(need){
text1.setText(sharedPreferences.getString("Dno",""));
editor.clear();
editor.commit();
}else{
text1.setText("");
}
confirm.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MySQLiteOpenHelper mySQLiteOpenHelper = new MySQLiteOpenHelper(Action4.this,"test1.db",null,1);
SQLiteDatabase db = mySQLiteOpenHelper.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("Dno",text1.getText()+"");
contentValues.put("MFD",text2.getText()+"");
contentValues.put("EXP",text3.getText()+"");
contentValues.put("Quantity",text4.getText()+"");
try {
db.insert("Date_and_Quantity",null,contentValues);
Toast.makeText(Action4.this,"增添成功",Toast.LENGTH_LONG).show();
} catch (Exception e) {
Toast.makeText(Action4.this,"数据输入错误",Toast.LENGTH_LONG).show();
throw new RuntimeException(e);
}
}
});
back = findViewById(R.id.textView79);
back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
}
}

View File

@ -0,0 +1,81 @@
package com.c202101020117.Action;
import androidx.appcompat.app.AppCompatActivity;
import android.content.SharedPreferences;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.c202101020117.Login;
import com.c202101020117.R;
import com.c202101020117.package1.MySQLiteOpenHelper;
import com.gyf.immersionbar.ImmersionBar;
public class Action5 extends AppCompatActivity {
TextView back;
EditText text1;
EditText text2;
EditText text3;
TextView confirm;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_action5);
ImmersionBar.with(this).init();
text1 = findViewById(R.id.editTextTextPersonName7);
text2 = findViewById(R.id.editTextTextPersonName8);
text3 = findViewById(R.id.editTextTextPersonName9);
confirm = findViewById(R.id.textView86);
SharedPreferences sharedPreferences = getSharedPreferences("action2",MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
Boolean need = sharedPreferences.getBoolean("need",false);
if(need){
text1.setText(sharedPreferences.getString("Dno",""));
text2.setText(sharedPreferences.getString("MFD",""));
text3.setText(sharedPreferences.getString("EXP",""));
editor.clear();
editor.commit();
}else{
text1.setText("");
text2.setText("");
text3.setText("");
}
confirm.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MySQLiteOpenHelper mySQLiteOpenHelper = new MySQLiteOpenHelper(Action5.this,"test1.db",null,1);
SQLiteDatabase db = mySQLiteOpenHelper.getWritableDatabase();
String Dno = text1.getText()+"";
String MFD = text2.getText()+"";
String EXP = text3.getText()+"";
String sql = "delete from Date_and_Quantity where Dno = '"+Dno+"' and MFD = '"+MFD+"' and EXP = '"+EXP+"'";
try {
db.execSQL(sql);
Toast.makeText(Action5.this,"删除成功",Toast.LENGTH_LONG).show();
} catch (SQLException e) {
Toast.makeText(Action5.this,"数据输入有误",Toast.LENGTH_LONG).show();
throw new RuntimeException(e);
}
}
});
back = findViewById(R.id.textView82);
back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
}
}

View File

@ -0,0 +1,136 @@
package com.c202101020117.Action;
import androidx.appcompat.app.AppCompatActivity;
import android.app.Activity;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.c202101020117.package1.MySQLiteOpenHelper;
import com.c202101020117.R;
import com.c202101020117.package1.Api;
import com.c202101020117.package1.InformationList;
import com.gyf.immersionbar.ImmersionBar;
import java.util.ArrayList;
import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class DetailedInformation extends AppCompatActivity {
TextView DnoTv;
TextView DnameTv;
TextView DclassificationTv;
TextView QuantityTv;
TextView Quantity_requiredTv;
TextView SnoTv;
TextView back;
TextView text1;
TextView text2;
TextView text3;
TextView text4;
TextView text5;
TextView text6;
TextView text7;
ImageView imageView;
List<InformationList.InformationlistBean> informationListBeans;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_detailed_information);
ImmersionBar.with(this).init();
DnoTv = findViewById(R.id.textView25);
DnameTv = findViewById(R.id.textView18);
DclassificationTv = findViewById(R.id.textView31);
QuantityTv = findViewById(R.id.textView22);
Quantity_requiredTv = findViewById(R.id.textView29);
SnoTv = findViewById(R.id.textView21);
text1 = findViewById(R.id.textView42);
text2 = findViewById(R.id.textView40);
text3 = findViewById(R.id.textView38);
text4 = findViewById(R.id.textView27);
text5 = findViewById(R.id.textView34);
text6 = findViewById(R.id.textView37);
text7 = findViewById(R.id.textView68);
imageView = findViewById(R.id.imageView7);
SharedPreferences sharedPreferences = getSharedPreferences("user", Activity.MODE_PRIVATE);
String thisDno = sharedPreferences.getString("Dno",null);
MySQLiteOpenHelper mySQLiteOpenHelper = new MySQLiteOpenHelper(DetailedInformation.this,"test1.db",null,1);
SQLiteDatabase db = mySQLiteOpenHelper.getWritableDatabase();
Cursor cursor = db.query("Drugs",new String[] {"Dno","Dname","Dclassification","Quantity_required","Sno"},null,null,null,null,null);
Cursor cursor1 = db.query("Sum_view",new String[] {"Dno","sum"},null,null,null,null,null);
while(cursor.moveToNext()){
if(cursor.getString(0).equals(thisDno)){
DnoTv.setText(cursor.getString(0));
DnameTv.setText(cursor.getString(1));
DclassificationTv.setText(cursor.getString(2));
Quantity_requiredTv.setText(cursor.getInt(3)+"");
SnoTv.setText(cursor.getString(4));
}
}
while(cursor1.moveToNext()){
if(cursor1.getString(0).equals(thisDno)){
QuantityTv.setText(cursor1.getInt(1)+"");
}
}
back = findViewById(R.id.textView19);
back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
informationListBeans = new ArrayList<>();
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("https://apifoxmock.com/")
.addConverterFactory(GsonConverterFactory.create()) //返回结果用Gson解析
.build();
Api api = retrofit.create(Api.class);
Call<InformationList> informationListCall = api.getInformationList();
informationListCall.enqueue(new Callback<InformationList>() {
@Override
public void onResponse(Call<InformationList> call, Response<InformationList> response) {
informationListBeans.addAll(response.body().informationlist);
for(int i=0;i<informationListBeans.size();i++){
InformationList.InformationlistBean informationListBean;
informationListBean = informationListBeans.get(i);
if(informationListBean.Dno.equals(thisDno)){
text1.setText(informationListBean.text1);
text2.setText(informationListBean.text2);
text3.setText(informationListBean.text3);
text4.setText(informationListBean.text4);
text5.setText(informationListBean.text5);
text6.setText(informationListBean.text6);
text7.setText(informationListBean.text7);
Glide.with(DetailedInformation.this).load(informationListBean.head).into(imageView);//加载网络图片
}
}
}
@Override
public void onFailure(Call<InformationList> call, Throwable t) {
}
});
}
}

View File

@ -0,0 +1,266 @@
package com.c202101020117.Fragment;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.c202101020117.Action.Action1;
import com.c202101020117.Action.DetailedInformation;
import com.c202101020117.package1.Api;
import com.c202101020117.package1.Drug2;
import com.c202101020117.package1.InformationList;
import com.c202101020117.package1.MySQLiteOpenHelper;
import com.c202101020117.package1.Drug;
import com.c202101020117.R;
import com.c202101020117.package1.Drug4;
import com.scwang.smart.refresh.footer.ClassicsFooter;
import com.scwang.smart.refresh.header.ClassicsHeader;
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.scwang.smart.refresh.layout.api.RefreshLayout;
import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
import java.util.ArrayList;
import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class DrugListFragment extends Fragment {
RecyclerView recyclerView;
ImageView select;
EditText editText;
MyAdapter myAdapter;
List<Drug> drugList = new ArrayList<>();
List<Drug4> drug4list = new ArrayList<>();
List<InformationList.InformationlistBean> informationListBeans;
SmartRefreshLayout smartRefreshLayout;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_list, container, false);
select = view.findViewById(R.id.imageView13);
editText = view.findViewById(R.id.editTextTextPersonName2);
recyclerView = view.findViewById(R.id.recycleView);
myAdapter = new MyAdapter();
recyclerView.setAdapter(myAdapter);
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
informationListBeans = new ArrayList<>();
smartRefreshLayout=view.findViewById(R.id.smarlayout2);
smartRefreshLayout.setRefreshHeader(new ClassicsHeader(getContext()));
smartRefreshLayout.setRefreshFooter(new ClassicsFooter(getContext()));
//列表下拉刷新
smartRefreshLayout.setOnRefreshListener(new OnRefreshListener() {
@Override
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
smartRefreshLayout.finishRefresh(500);
//列表旧数据清除
drugList.clear();
drug4list.clear();
//构造数据
MySQLiteOpenHelper mySQLiteOpenHelper = new MySQLiteOpenHelper(getActivity(),"test1.db",null,1);
SQLiteDatabase db = mySQLiteOpenHelper.getWritableDatabase();
Cursor cursor = db.query("Drugs",new String[] {"Dno","Dname","Dclassification","Quantity_required","Sno"},null,null,null,null,null);
Cursor cursor1 = db.query("Sum_view",new String[] {"Dno","sum"},null,null,null,null,null);
while(cursor.moveToNext()){
Drug drug = new Drug();
drug.Dno = cursor.getString(0);
drug.Dname = cursor.getString(1);
drug.Dclassification = cursor.getString(2);
drug.Quantity_required = cursor.getInt(3);
drug.Sno = cursor.getString(4);
drugList.add(drug);
}
while(cursor1.moveToNext()){
Drug4 drug4 = new Drug4();
drug4.Dno = cursor1.getString(0);
drug4.sum = cursor1.getInt(1);
drug4list.add(drug4);
}
myAdapter.notifyDataSetChanged();
}
});
MySQLiteOpenHelper mySQLiteOpenHelper = new MySQLiteOpenHelper(getActivity(),"test1.db",null,1);
SQLiteDatabase db = mySQLiteOpenHelper.getWritableDatabase();
Cursor cursor = db.query("Drugs",new String[] {"Dno","Dname","Dclassification","Quantity_required","Sno"},null,null,null,null,null);
Cursor cursor1 = db.query("Sum_view",new String[] {"Dno","sum"},null,null,null,null,null);
while(cursor.moveToNext()){
Drug drug = new Drug();
drug.Dno = cursor.getString(0);
drug.Dname = cursor.getString(1);
drug.Dclassification = cursor.getString(2);
drug.Quantity_required = cursor.getInt(3);
drug.Sno = cursor.getString(4);
drugList.add(drug);
}
while(cursor1.moveToNext()){
Drug4 drug4 = new Drug4();
drug4.Dno = cursor1.getString(0);
drug4.sum = cursor1.getInt(1);
drug4list.add(drug4);
}
myAdapter.notifyDataSetChanged();
select.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//列表旧数据清除
drugList.clear();
drug4list.clear();
String str = editText.getText().toString();
//列表旧数据清除
drugList.clear();
drug4list.clear();
//构造数据
MySQLiteOpenHelper mySQLiteOpenHelper = new MySQLiteOpenHelper(getActivity(),"test1.db",null,1);
SQLiteDatabase db = mySQLiteOpenHelper.getWritableDatabase();
Cursor cursor = db.query("Drugs",new String[] {"Dno","Dname","Dclassification","Quantity_required","Sno"},null,null,null,null,null);
Cursor cursor1 = db.query("Sum_view",new String[] {"Dno","sum"},null,null,null,null,null);
while(cursor.moveToNext()){
Drug drug = new Drug();
drug.Dno = cursor.getString(0);
drug.Dname = cursor.getString(1);
drug.Dclassification = cursor.getString(2);
drug.Quantity_required = cursor.getInt(3);
drug.Sno = cursor.getString(4);
if(drug.Dno.equals(str)||drug.Dname.equals(str)){
str = drug.Dno;
drugList.add(drug);
break;
}
}
while(cursor1.moveToNext()){
Drug4 drug4 = new Drug4();
drug4.Dno = cursor1.getString(0);
drug4.sum = cursor1.getInt(1);
if(drug4.Dno.equals(str)){
drug4list.add(drug4);
break;
}
}
myAdapter.notifyDataSetChanged();
}
});
return view;
}
public class MyAdapter extends RecyclerView.Adapter<MyViewHolder>{
@NonNull
@Override
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(getActivity()).inflate(R.layout.item_layout,parent,false);
MyViewHolder myViewHolder = new MyViewHolder(view);
return myViewHolder;
}
@Override
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
holder.DnoTv.setText(drugList.get(position).Dno);
holder.DnameTv.setText(drugList.get(position).Dname);
holder.DclassificationTv.setText(drugList.get(position).Dclassification);
for(int i=0;i<drug4list.size();i++){
Drug4 dg = drug4list.get(i);
if(dg.Dno.equals(drugList.get(position).Dno)){
holder.QuantityTv.setText(dg.sum+"");
}
}
holder.SnoTv.setText(drugList.get(position).Sno);
holder.constraintLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
SharedPreferences sharedPreferences = getActivity().getSharedPreferences("user", Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putString("Dno",holder.DnoTv.getText().toString());
editor.commit();
Intent intent = new Intent(getActivity(), DetailedInformation.class);
startActivity(intent);
}
});
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("https://apifoxmock.com/")
.addConverterFactory(GsonConverterFactory.create()) //返回结果用Gson解析
.build();
Api api = retrofit.create(Api.class);
Call<InformationList> informationListCall = api.getInformationList();
informationListCall.enqueue(new Callback<InformationList>() {
@Override
public void onResponse(Call<InformationList> call, Response<InformationList> response) {
informationListBeans.addAll(response.body().informationlist);
for(int i=0;i<informationListBeans.size();i++){
InformationList.InformationlistBean informationListBean;
informationListBean = informationListBeans.get(i);
if(informationListBean.Dno.equals(holder.DnoTv.getText())){
Glide.with(getActivity()).load(informationListBean.head).into(holder.imageView);
}
}
}
@Override
public void onFailure(Call<InformationList> call, Throwable t) {
}
});
}
@Override
public int getItemCount() {
return drugList.size();
}
}
public class MyViewHolder extends RecyclerView.ViewHolder{
TextView DnoTv;
TextView DnameTv;
TextView DclassificationTv;
TextView QuantityTv;
TextView SnoTv;
ImageView imageView;
ConstraintLayout constraintLayout;
public MyViewHolder(@NonNull View itemView) {
super(itemView);
DnoTv = itemView.findViewById(R.id.textView12);
DnameTv = itemView.findViewById(R.id.textView11);
DclassificationTv = itemView.findViewById(R.id.textView13);
QuantityTv = itemView.findViewById(R.id.textView15);
SnoTv = itemView.findViewById(R.id.textView17);
imageView = itemView.findViewById(R.id.imageView6);
constraintLayout = itemView.findViewById(R.id.constraintLayout6);
}
}
}

View File

@ -0,0 +1,56 @@
package com.c202101020117.Fragment;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.c202101020117.Home;
import com.c202101020117.Login;
import com.c202101020117.R;
public class HomeFragment extends Fragment {
TextView quit;
TextView accountTv;
TextView userTv;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_home, container, false);
SharedPreferences sharedPreferences = getActivity().getSharedPreferences("user", Activity.MODE_PRIVATE);
String thisAccount = sharedPreferences.getString("account",null);
String thisUser = sharedPreferences.getString("user",null);
accountTv = view.findViewById(R.id.textView92);
userTv = view.findViewById(R.id.textView91);
accountTv.setText(thisAccount);
userTv.setText(thisUser);
quit = view.findViewById(R.id.textView93);
quit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
SharedPreferences sharedPreferences = getActivity().getSharedPreferences("user", Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.clear();
editor.commit();
Intent intent = new Intent(getActivity(), Login.class);
startActivity(intent);
getActivity().finish();
}
});
return view;
}
}

View File

@ -0,0 +1,50 @@
package com.c202101020117.Fragment;
import android.content.Intent;
import android.os.Bundle;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.c202101020117.Action.Action1;
import com.c202101020117.Action.Action2;
import com.c202101020117.R;
public class ScreeningFragment extends Fragment {
ConstraintLayout action1;
ConstraintLayout action2;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_screening, container, false);
action1 = view.findViewById(R.id.constraintLayout9);
action2 = view.findViewById(R.id.constraintLayout8);
action1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(getActivity(), Action1.class);
startActivity(intent);
}
});
action2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(getActivity(), Action2.class);
startActivity(intent);
}
});
return view;
}
}

View File

@ -0,0 +1,60 @@
package com.c202101020117.Fragment;
import android.content.Intent;
import android.os.Bundle;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.c202101020117.Action.Action3;
import com.c202101020117.Action.Action4;
import com.c202101020117.Action.Action5;
import com.c202101020117.R;
public class UpdateFragment extends Fragment {
ConstraintLayout action3;
ConstraintLayout action4;
ConstraintLayout action5;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_update, container, false);
action3 = view.findViewById(R.id.constraintLayout11);
action4 = view.findViewById(R.id.constraintLayout13);
action5 = view.findViewById(R.id.constraintLayout12);
action3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(getActivity(), Action3.class);
startActivity(intent);
}
});
action4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(getActivity(), Action4.class);
startActivity(intent);
}
});
action5.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(getActivity(), Action5.class);
startActivity(intent);
}
});
return view;
}
}

View File

@ -0,0 +1,124 @@
package com.c202101020117;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import com.c202101020117.Fragment.HomeFragment;
import com.c202101020117.Fragment.DrugListFragment;
import com.c202101020117.Fragment.ScreeningFragment;
import com.c202101020117.Fragment.UpdateFragment;
import com.gyf.immersionbar.ImmersionBar;
public class Home extends AppCompatActivity {
HomeFragment homeFragment;
DrugListFragment drugListFragment;
ScreeningFragment screeningFragment;
UpdateFragment updateFragment;
ConstraintLayout home;
ConstraintLayout list;
ConstraintLayout screening;
ConstraintLayout update;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
ImmersionBar.with(this).init();
homeFragment = new HomeFragment();
drugListFragment = new DrugListFragment();
screeningFragment = new ScreeningFragment();
updateFragment = new UpdateFragment();
getSupportFragmentManager().beginTransaction().add(R.id.fragment,homeFragment).commit();
getSupportFragmentManager().beginTransaction().add(R.id.fragment,drugListFragment).commit();
getSupportFragmentManager().beginTransaction().add(R.id.fragment,screeningFragment).commit();
getSupportFragmentManager().beginTransaction().add(R.id.fragment,updateFragment).commit();
getSupportFragmentManager().beginTransaction()
.show(homeFragment)
.hide(drugListFragment)
.hide(screeningFragment)
.hide(updateFragment)
.commit();
home = findViewById(R.id.constraintLayout2);
list = findViewById(R.id.constraintLayout);
screening = findViewById(R.id.constraintLayout3);
update = findViewById(R.id.constraintLayout4);
home.setSelected(true);
list.setSelected(false);
screening.setSelected(false);
update.setSelected(false);
home.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
home.setSelected(true);
list.setSelected(false);
screening.setSelected(false);
update.setSelected(false);
getSupportFragmentManager().beginTransaction()
.show(homeFragment)
.hide(drugListFragment)
.hide(screeningFragment)
.hide(updateFragment)
.commit();
}
});
list.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
home.setSelected(false);
list.setSelected(true);
screening.setSelected(false);
update.setSelected(false);
getSupportFragmentManager().beginTransaction()
.hide(homeFragment)
.show(drugListFragment)
.hide(screeningFragment)
.hide(updateFragment)
.commit();
}
});
screening.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
home.setSelected(false);
list.setSelected(false);
screening.setSelected(true);
update.setSelected(false);
getSupportFragmentManager().beginTransaction()
.hide(homeFragment)
.hide(drugListFragment)
.show(screeningFragment)
.hide(updateFragment)
.commit();
}
});
update.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
home.setSelected(false);
list.setSelected(false);
screening.setSelected(false);
update.setSelected(true);
getSupportFragmentManager().beginTransaction()
.hide(homeFragment)
.hide(drugListFragment)
.hide(screeningFragment)
.show(updateFragment)
.commit();
}
});
}
}

View File

@ -0,0 +1,100 @@
package com.c202101020117;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.c202101020117.package1.Api;
import com.c202101020117.package1.UserList;
import com.gyf.immersionbar.ImmersionBar;
import java.util.ArrayList;
import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class Login extends AppCompatActivity {
EditText account;
EditText password;
Button login ;
List<UserList.UserlistBean> userlistBeans;
Boolean findAccount;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
ImmersionBar.with(this).init();
account = findViewById(R.id.editTextTextPersonName);
password = findViewById(R.id.editTextNumberPassword);
login = findViewById(R.id.button);
userlistBeans = new ArrayList<>();
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("https://apifoxmock.com/")
.addConverterFactory(GsonConverterFactory.create()) //返回结果用Gson解析
.build();
Api api = retrofit.create(Api.class);
Call<UserList> userListCall = api.getUserList();
userListCall.enqueue(new Callback<UserList>() {
@Override
public void onResponse(Call<UserList> call, Response<UserList> response) {
userlistBeans.addAll(response.body().userlist);
}
@Override
public void onFailure(Call<UserList> call, Throwable t) {
}
});
login.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
findAccount = false;
UserList.UserlistBean userlistBean;
String str1 = account.getText().toString();
String str2 = password.getText().toString();
for(int i=0;i<userlistBeans.size();i++){
userlistBean = userlistBeans.get(i);
if(userlistBean.account.equals(str1)){
if(userlistBean.password.equals(str2)){
findAccount = true;
SharedPreferences sharedPreferences = getSharedPreferences("user",MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean("isLogin",true);
editor.putString("head", userlistBean.head);
editor.putString("account",str1);
editor.putString("user",userlistBean.user);
editor.commit();
break;
}
}
}
if(findAccount==true){
Toast.makeText(Login.this,"登录成功",Toast.LENGTH_LONG).show();
Intent intent = new Intent(Login.this,Home.class);
startActivity(intent);
finish();
}else{
Toast.makeText(Login.this,"账号或者密码错误",Toast.LENGTH_LONG).show();
}
}
});
}
}

View File

@ -0,0 +1,43 @@
package com.c202101020117;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import com.gyf.immersionbar.ImmersionBar;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ImmersionBar.with(this).init();
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(3000);
SharedPreferences sharedPreferences = getSharedPreferences("user",MODE_PRIVATE);
boolean isLogin = sharedPreferences.getBoolean("isLogin",false);
if(isLogin){
Intent intent = new Intent(MainActivity.this,Home.class);
startActivity(intent);
}else{
Intent intent = new Intent(MainActivity.this,Login.class);
startActivity(intent);
}
finish();
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
});
thread.start();
}
}

View File

@ -0,0 +1,21 @@
package com.c202101020117.package1;
import com.c202101020117.package1.UserList;
import retrofit2.Call;
import retrofit2.http.GET;
//定义网络请求的方法
public interface Api {
//https://www.fastmock.site/mock/ddb290c0f0b0d2f5aed6b9d8ff2ed00b/Levi/users
//https://apifoxmock.com/m1/5358908-5030687-default/test1
@GET("m1/5358908-5030687-default/test1")
Call<UserList> getUserList();
//https://www.fastmock.site/mock/ddb290c0f0b0d2f5aed6b9d8ff2ed00b/Levi/information
//https://apifoxmock.com/m1/5358908-5030687-default/test2
@GET("m1/5358908-5030687-default/test2")
Call<InformationList> getInformationList();
}

View File

@ -0,0 +1,9 @@
package com.c202101020117.package1;
public class Drug {
public String Dno;
public String Dname;
public String Dclassification;
public int Quantity_required;
public String Sno;
}

View File

@ -0,0 +1,9 @@
package com.c202101020117.package1;
public class Drug2 {
public String Dno;
public String Dname;
public String Sno;
public int Quantity_required;
public int Quantity;
}

View File

@ -0,0 +1,12 @@
package com.c202101020117.package1;
public class Drug3 {
public String Dno;
public String Dname;
public String Sno;
public String MFD;
public String EXP;
public double Datediff;
public int Quantity;
}

View File

@ -0,0 +1,6 @@
package com.c202101020117.package1;
public class Drug4 {
public String Dno;
public int sum;
}

View File

@ -0,0 +1,33 @@
package com.c202101020117.package1;
import java.util.List;
public class InformationList {
public List<InformationlistBean> informationlist;
public static class InformationlistBean {
/**
* Dno : A0001
* head : https://tse3-mm.cn.bing.net/th/id/OIP-C.MjMKFFP09RejA7So3Gv45AHaFj?pid=ImgDet&rs=1
* text1 : 苍术陈皮厚朴(姜制)白芷茯苓大腹皮生半夏甘草浸膏广藿香油紫苏叶油
* text2 : 本品为深棕色的澄清液体贮存略有沉淀味辛
* text3 : 解表化湿理气和中
* text4 : 口服一次半支(5毫升)1支(10毫升)一日2次用时摇匀
* text5 : 服用藿香正气水有发生药疹紫癜的个别报道
* text6 : 尚不明确
* text7 : 1.忌烟酒及辛辣生冷油腻食物饮食宜清淡
1.忌烟酒及辛辣生冷油腻食物饮食宜清淡
*/
public String Dno;
public String head;
public String text1;
public String text2;
public String text3;
public String text4;
public String text5;
public String text6;
public String text7;
}
}

View File

@ -0,0 +1,52 @@
package com.c202101020117.package1;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import androidx.annotation.Nullable;
public class MySQLiteOpenHelper extends SQLiteOpenHelper {
public MySQLiteOpenHelper(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
super(context, name, factory, version);
}
//创建表
@Override
public void onCreate(SQLiteDatabase sqLiteDatabase) {
String sql1 = "create table Drugs(\n" +
"Dno varchar2(5) primary key,\n" +
"Dname varchar2(20) not null,\n" +
"Dclassification varchar2(20) not null,\n" +
"Quantity_required int not null,\n" +
"Sno varchar2(5) not null\n" +
")";
String sql2 = "create table Date_and_Quantity(\n" +
"Dno varchar2(5),\n" +
"MFD date,\n" +
"EXP date,\n" +
"Quantity int not null,\n" +
"foreign key(Dno) references Drugs(Dno)\n" +
")";
String sql3 = "create view Information_view as\n" +
"select Drugs.Dno,Dname,Sno,MFD,EXP,JULIANDAY(EXP)-JULIANDAY(date()) Datediff,Quantity\n" +
"from Drugs,Date_and_Quantity\n" +
"where Drugs.Dno = Date_and_Quantity.Dno";
String sql4 = "create view Sum_view as\n" +
"select Dno,sum(Quantity) sum\n" +
"from Date_and_Quantity\n" +
"group by Dno";
sqLiteDatabase.execSQL(sql1);
sqLiteDatabase.execSQL(sql2);
sqLiteDatabase.execSQL(sql3);
sqLiteDatabase.execSQL(sql4);
}
//更新表数据
@Override
public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
}
}

View File

@ -0,0 +1,23 @@
package com.c202101020117.package1;
import java.util.List;
public class UserList {
public List<UserlistBean> userlist;
public static class UserlistBean {
/**
* head : null
* account : 001
* user : Levi
* password : 123456
*/
public String head;
public String account;
public String user;
public String password;
}
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#B4FDFF" android:state_selected="true"/>
<item android:color="@color/white" android:state_selected="false"/>
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

@ -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:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>

View File

@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<!-- 设置上下左右内边距
top:上内边距
bottom:下内边距
left:左内边距
right:右内边距
-->
<padding
android:bottom="5dp"
android:left="5dp"
android:right="5dp"
android:top="5dp"
/>
<!-- 设置圆角矩形
radius:圆角弧度,核心代码
-->
<corners android:radius="10dp" />
<!-- 设置描边效果
width:描边宽度
color:描边颜色
-->
<stroke
android:width="2px"
android:color="#001E90FF" />
<!-- 设置填充效果
color:填充颜色
-->
<solid android:color="@color/white" />
</shape>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<!-- 设置上下左右内边距
top:上内边距
bottom:下内边距
left:左内边距
right:右内边距
-->
<padding
android:bottom="5dp"
android:left="5dp"
android:right="5dp"
android:top="5dp"
/>
<!-- 设置圆角矩形
radius:圆角弧度,核心代码
-->
<corners android:radius="10dp" />
<!-- 设置描边效果
width:描边宽度
color:描边颜色
-->
<stroke
android:width="2px"
android:color="#001E90FF" />
<!-- 设置填充效果
color:填充颜色
-->
<solid android:color="#96CDEE" />
</shape>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/shujugengxin_select" android:state_selected="true"/>
<item android:drawable="@drawable/shujugengxin_unselect" android:state_selected="false"/>
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/yaopinliebiao_select" android:state_selected="true"/>
<item android:drawable="@drawable/yaopinliebiao_unselect" android:state_selected="false"/>
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/yaopinshaicha_select" android:state_selected="true"/>
<item android:drawable="@drawable/yaopinshaicha_unselect" android:state_selected="false"/>
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/zhuye_select" android:state_selected="true"/>
<item android:drawable="@drawable/zhuye_unselect" android:state_selected="false"/>
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,56 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
tools:context=".Action.Action1">
<TextView
android:id="@+id/textView64"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="Back"
android:textColor="@color/teal_200"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/textView65"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView65" />
<TextView
android:id="@+id/textView65"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="48dp"
android:text="药品数量筛查"
android:textColor="@color/teal_200"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/smarlayout1"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView65">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView66" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,56 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
tools:context=".Action.Action2">
<TextView
android:id="@+id/textView66"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="48dp"
android:text="过期药品筛查"
android:textColor="@color/teal_200"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView67"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="Back"
android:textColor="@color/teal_200"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/textView66"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView66" />
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/smarlayout"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView66">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView66" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,8 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
tools:context=".Action.Action3"/>

View File

@ -0,0 +1,162 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
tools:context=".Action.Action4">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout10"
android:layout_width="0dp"
android:layout_height="500dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:background="@drawable/shape"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/textView74"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:text="保质期至:"
android:textColor="@color/black"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/editTextTextPersonName3"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/editTextTextPersonName3" />
<EditText
android:id="@+id/editTextTextPersonName3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:ems="10"
android:gravity="center"
android:inputType="textPersonName"
app:layout_constraintBottom_toTopOf="@+id/editTextTextPersonName6"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName4" />
<EditText
android:id="@+id/editTextTextPersonName4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:ems="10"
android:gravity="center"
android:inputType="textPersonName"
app:layout_constraintBottom_toTopOf="@+id/editTextTextPersonName3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName5" />
<TextView
android:id="@+id/textView75"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:text="生产日期:"
android:textColor="@color/black"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/editTextTextPersonName4"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/editTextTextPersonName4" />
<TextView
android:id="@+id/textView76"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:text="药品编号:"
android:textColor="@color/black"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/editTextTextPersonName5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/editTextTextPersonName5" />
<EditText
android:id="@+id/editTextTextPersonName5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:ems="10"
android:gravity="center"
android:inputType="textPersonName"
app:layout_constraintBottom_toTopOf="@+id/editTextTextPersonName4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/editTextTextPersonName6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:ems="10"
android:gravity="center"
android:inputType="textPersonName"
app:layout_constraintBottom_toTopOf="@+id/textView78"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName3" />
<TextView
android:id="@+id/textView77"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:text="增加数量:"
android:textColor="@color/black"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/editTextTextPersonName6"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/editTextTextPersonName6" />
<TextView
android:id="@+id/textView78"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape2"
android:text="增添药品"
android:textColor="@color/white"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName6" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/textView79"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="Back"
android:textColor="@color/teal_200"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/textView80"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView80" />
<TextView
android:id="@+id/textView80"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="药品录入"
android:textColor="@color/teal_200"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/constraintLayout10"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,140 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
tools:context=".Action.Action5">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout14"
android:layout_width="0dp"
android:layout_height="400dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:background="@drawable/shape"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/textView83"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:text="药品编号:"
android:textColor="@color/black"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/editTextTextPersonName7"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/editTextTextPersonName7" />
<TextView
android:id="@+id/textView84"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:text="生产日期:"
android:textColor="@color/black"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/editTextTextPersonName8"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/editTextTextPersonName8" />
<TextView
android:id="@+id/textView85"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:text="保质期至:"
android:textColor="@color/black"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/editTextTextPersonName9"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/editTextTextPersonName9" />
<TextView
android:id="@+id/textView86"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape2"
android:text="删除药品"
android:textColor="@color/white"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName9" />
<EditText
android:id="@+id/editTextTextPersonName7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:ems="10"
android:gravity="center"
android:inputType="textPersonName"
app:layout_constraintBottom_toTopOf="@+id/editTextTextPersonName8"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/editTextTextPersonName8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:ems="10"
android:gravity="center"
android:inputType="textPersonName"
app:layout_constraintBottom_toTopOf="@+id/editTextTextPersonName9"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName7" />
<EditText
android:id="@+id/editTextTextPersonName9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:ems="10"
android:gravity="center"
android:inputType="textPersonName"
app:layout_constraintBottom_toTopOf="@+id/textView86"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName8" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/textView81"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="药品删除"
android:textColor="@color/teal_200"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/constraintLayout14"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView82"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="Back"
android:textColor="@color/teal_200"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/textView81"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView81" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,357 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
tools:context=".Action.DetailedInformation">
<TextView
android:id="@+id/textView25"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="TextView"
android:textColor="@color/white"
app:layout_constraintStart_toStartOf="@+id/textView24"
app:layout_constraintTop_toBottomOf="@+id/textView24" />
<TextView
android:id="@+id/textView24"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="药品编号"
android:textColor="@color/white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/imageView7" />
<TextView
android:id="@+id/textView18"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="48dp"
android:text="药品名称"
android:textColor="@color/teal_200"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView19"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="Back"
android:textColor="@color/teal_200"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/textView18"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView18" />
<ImageView
android:id="@+id/imageView7"
android:layout_width="200dp"
android:layout_height="150dp"
android:layout_marginTop="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView18"
app:srcCompat="@color/teal_200" />
<TextView
android:id="@+id/textView20"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:text="所在货架"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/imageView7" />
<TextView
android:id="@+id/textView21"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="@+id/textView20"
app:layout_constraintTop_toBottomOf="@+id/textView20" />
<TextView
android:id="@+id/textView22"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:text="TextView"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="@+id/imageView7"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/textView23"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="库存数量"
android:textColor="@color/white"
app:layout_constraintBottom_toTopOf="@+id/textView22"
app:layout_constraintEnd_toEndOf="@+id/textView22" />
<TextView
android:id="@+id/textView26"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:text="所需数量"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView21" />
<TextView
android:id="@+id/textView29"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="@+id/textView26"
app:layout_constraintTop_toBottomOf="@+id/textView26" />
<TextView
android:id="@+id/textView30"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:text="药品分类"
android:textColor="@color/white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView25" />
<TextView
android:id="@+id/textView31"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:textColor="@color/white"
app:layout_constraintStart_toStartOf="@+id/textView30"
app:layout_constraintTop_toBottomOf="@+id/textView30" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:background="@drawable/shape"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView7">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/textView43"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="center"
android:text="成分"
android:textColor="@color/black"
android:textSize="20sp" />
<TextView
android:id="@+id/textView42"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="TextView" />
</LinearLayout>
<ImageView
android:id="@+id/imageView16"
android:layout_width="match_parent"
android:layout_height="1dp"
app:srcCompat="@color/black" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/textView41"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="center"
android:text="性状"
android:textColor="@color/black"
android:textSize="20sp" />
<TextView
android:id="@+id/textView40"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="TextView" />
</LinearLayout>
<ImageView
android:id="@+id/imageView17"
android:layout_width="match_parent"
android:layout_height="1dp"
app:srcCompat="@color/black" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/textView39"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="center"
android:text="主要功效"
android:textColor="@color/black"
android:textSize="20sp" />
<TextView
android:id="@+id/textView38"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="TextView" />
</LinearLayout>
<ImageView
android:id="@+id/imageView18"
android:layout_width="match_parent"
android:layout_height="1dp"
app:srcCompat="@color/black" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/textView28"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="center"
android:text="用法用量"
android:textColor="@color/black"
android:textSize="20sp" />
<TextView
android:id="@+id/textView27"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="TextView" />
</LinearLayout>
<ImageView
android:id="@+id/imageView19"
android:layout_width="match_parent"
android:layout_height="1dp"
app:srcCompat="@color/black" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/textView35"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="center"
android:text="不良反应"
android:textColor="@color/black"
android:textSize="20sp" />
<TextView
android:id="@+id/textView34"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="TextView" />
</LinearLayout>
<ImageView
android:id="@+id/imageView20"
android:layout_width="match_parent"
android:layout_height="1dp"
app:srcCompat="@color/black" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/textView36"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="center"
android:text="禁忌"
android:textColor="@color/black"
android:textSize="20sp" />
<TextView
android:id="@+id/textView37"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="TextView" />
</LinearLayout>
<ImageView
android:id="@+id/imageView21"
android:layout_width="match_parent"
android:layout_height="1dp"
app:srcCompat="@color/black" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
tools:layout_editor_absoluteX="-190dp"
tools:layout_editor_absoluteY="477dp">
<TextView
android:id="@+id/textView69"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="center"
android:text="注意事项"
android:textColor="@color/black"
android:textSize="20sp" />
<TextView
android:id="@+id/textView68"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="TextView" />
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,152 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
tools:context=".Home">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout5"
android:layout_width="match_parent"
android:layout_height="96dp"
android:background="#B8B8B8"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout2"
android:layout_width="60dp"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/constraintLayout"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView"
android:layout_width="60dp"
android:layout_height="60dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/zhuye" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="主页"
android:textColor="@color/color"
app:layout_constraintEnd_toEndOf="@+id/imageView"
app:layout_constraintStart_toStartOf="@+id/imageView"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="60dp"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/constraintLayout3"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/constraintLayout2"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView2"
android:layout_width="60dp"
android:layout_height="60dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/yaopinliebiao" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="药品列表"
android:textColor="@color/color"
app:layout_constraintEnd_toEndOf="@id/imageView2"
app:layout_constraintStart_toStartOf="@+id/imageView2"
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout3"
android:layout_width="60dp"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/constraintLayout4"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView3"
android:layout_width="60dp"
android:layout_height="60dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/yaopinshaicha" />
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="药品筛查"
android:textColor="@color/color"
app:layout_constraintEnd_toEndOf="@id/imageView3"
app:layout_constraintStart_toStartOf="@+id/imageView3"
app:layout_constraintTop_toBottomOf="@+id/imageView3" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout4"
android:layout_width="60dp"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/constraintLayout3"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView4"
android:layout_width="60dp"
android:layout_height="60dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/shujugengxin" />
<TextView
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="数据更改"
android:textColor="@color/color"
app:layout_constraintEnd_toEndOf="@id/imageView4"
app:layout_constraintStart_toStartOf="@+id/imageView4"
app:layout_constraintTop_toBottomOf="@+id/imageView4" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/fragment"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/constraintLayout5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,85 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
tools:context=".Login">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="你好,"
android:textColor="@color/white"
android:textSize="34sp"
app:layout_constraintBottom_toTopOf="@+id/textView2"
app:layout_constraintStart_toStartOf="@+id/textView2" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="160dp"
android:text="欢迎使用药品管理系统"
android:textColor="@color/white"
android:textSize="34sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/editTextTextPersonName"
android:layout_width="300dp"
android:layout_height="50dp"
android:layout_marginTop="64dp"
android:background="@color/white"
android:ems="15"
android:hint=" 请输入账号"
android:inputType="textPersonName"
android:textColor="#7F7F7F"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<EditText
android:id="@+id/editTextNumberPassword"
android:layout_width="300dp"
android:layout_height="50dp"
android:layout_marginTop="24dp"
android:background="@color/white"
android:ems="15"
android:hint=" 请输入密码"
android:inputType="textPassword"
android:textColor="#7F7F7F"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName" />
<Button
android:id="@+id/button"
android:layout_width="170dp"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:backgroundTint="#96CDEE"
android:text="登录"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextNumberPassword" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:text="账号密码登录"
android:textColor="@color/white"
android:textSize="24sp"
app:layout_constraintBottom_toTopOf="@+id/editTextTextPersonName"
app:layout_constraintStart_toStartOf="@+id/editTextTextPersonName" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,31 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
tools:context=".MainActivity">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="你好,"
android:textColor="@color/white"
android:textSize="34sp"
app:layout_constraintBottom_toTopOf="@+id/textView2"
app:layout_constraintStart_toStartOf="@+id/textView2" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="160dp"
android:text="欢迎使用药品管理系统"
android:textColor="@color/white"
android:textSize="34sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,165 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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="633dp"
tools:context=".Fragment.HomeFragment">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout15"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="64dp"
android:layout_marginEnd="16dp"
android:background="@drawable/shape"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="340dp"
android:layout_height="100dp"
android:background="@drawable/p1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/textView91"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="96dp"
android:layout_marginTop="24dp"
android:text="用户名"
android:textColor="@color/black"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView92"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="账号"
app:layout_constraintStart_toStartOf="@+id/textView91"
app:layout_constraintTop_toBottomOf="@+id/textView91" />
<TextView
android:id="@+id/textView93"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="72dp"
android:background="@drawable/shape2"
android:text="退出登录"
app:layout_constraintBottom_toBottomOf="@+id/textView91"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView91" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout16"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:background="@drawable/shape2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout15">
<ImageView
android:id="@+id/imageView24"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:src="@drawable/p2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/textView89"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:text="重要信息"
android:textColor="#00BCD4"
android:textSize="20sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout16" />
<TextView
android:id="@+id/textView90"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:text="查看全部"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="@+id/textView89"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView89" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout17"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:background="@drawable/shape"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView89">
<ImageView
android:id="@+id/imageView25"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:src="@drawable/p3"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout18"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="24dp"
android:layout_marginEnd="16dp"
android:background="@drawable/shape"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout17">
<ImageView
android:id="@+id/imageView26"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:src="@drawable/p4"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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="633dp"
tools:context=".Fragment.DrugListFragment" >
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="48dp"
android:background="@drawable/shape"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/ic_menu_search"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/editTextTextPersonName2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="15"
android:hint="输入药品名称或药品编号进行搜索"
android:inputType="textPersonName"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageView13"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/smarlayout2"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout7">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycleView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- <androidx.recyclerview.widget.RecyclerView-->
<!-- android:id="@+id/recycleView"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="0dp"-->
<!-- android:layout_marginTop="8dp"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/constraintLayout7" />-->
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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="633dp"
tools:context=".Fragment.ScreeningFragment" >
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="150dp"
android:layout_marginEnd="16dp"
android:background="@drawable/shape"
app:layout_constraintBottom_toTopOf="@+id/constraintLayout8"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:src="@drawable/action1_1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="150dp"
android:background="@drawable/shape"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout9">
<ImageView
android:id="@+id/imageView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:src="@drawable/action1_2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

View File

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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="633dp"
tools:context=".Fragment.UpdateFragment" >
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="64dp"
android:background="@drawable/shape"
app:layout_constraintBottom_toTopOf="@+id/constraintLayout13"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:src="@drawable/action2_1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape"
app:layout_constraintBottom_toTopOf="@+id/constraintLayout12"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout11">
<ImageView
android:id="@+id/imageView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:src="@drawable/action2_2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="64dp"
android:background="@drawable/shape"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout13">
<ImageView
android:id="@+id/imageView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:src="@drawable/action2_3"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

View File

@ -0,0 +1,136 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="136dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/shape"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView14"
android:layout_width="120dp"
android:layout_height="90dp"
android:layout_marginStart="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@color/teal_200" />
<TextView
android:id="@+id/textView45"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="药品名称:"
android:textColor="@color/black"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@+id/imageView14"
app:layout_constraintTop_toTopOf="@+id/imageView14" />
<TextView
android:id="@+id/textView46"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:textColor="@color/black"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/textView45"
app:layout_constraintStart_toEndOf="@+id/textView45"
app:layout_constraintTop_toTopOf="@+id/textView45" />
<TextView
android:id="@+id/textView47"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="药品编号:"
android:textColor="@color/purple_200"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@+id/textView49"
app:layout_constraintStart_toEndOf="@+id/imageView14"
app:layout_constraintTop_toBottomOf="@+id/textView45" />
<TextView
android:id="@+id/textView48"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:textColor="@color/purple_200"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="@+id/textView47"
app:layout_constraintStart_toEndOf="@+id/textView47"
app:layout_constraintTop_toTopOf="@+id/textView47" />
<TextView
android:id="@+id/textView49"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="所在货架:"
android:textColor="#00BCD4"
app:layout_constraintBottom_toBottomOf="@+id/imageView14"
app:layout_constraintStart_toEndOf="@+id/imageView14" />
<TextView
android:id="@+id/textView50"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:textColor="#00BCD4"
app:layout_constraintBottom_toBottomOf="@+id/textView49"
app:layout_constraintStart_toEndOf="@+id/textView49"
app:layout_constraintTop_toTopOf="@+id/textView49" />
<TextView
android:id="@+id/textView51"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="库存所需"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView52"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
app:layout_constraintEnd_toEndOf="@+id/textView51"
app:layout_constraintTop_toBottomOf="@+id/textView51" />
<TextView
android:id="@+id/textView53"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:text="TextView"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/textView54"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:text="库存数量"
app:layout_constraintBottom_toTopOf="@+id/textView53"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,168 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="166dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/action2_item"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/shape"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView15"
android:layout_width="120dp"
android:layout_height="90dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@color/teal_200" />
<TextView
android:id="@+id/textView44"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="药品名称:"
android:textColor="@color/black"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@+id/imageView15"
app:layout_constraintTop_toTopOf="@+id/imageView15" />
<TextView
android:id="@+id/textView55"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:textColor="@color/black"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/textView44"
app:layout_constraintStart_toEndOf="@+id/textView44"
app:layout_constraintTop_toTopOf="@+id/textView44" />
<TextView
android:id="@+id/textView56"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="药品编号:"
android:textColor="@color/purple_200"
app:layout_constraintBottom_toTopOf="@+id/textView57"
app:layout_constraintStart_toEndOf="@+id/imageView15"
app:layout_constraintTop_toBottomOf="@+id/textView44" />
<TextView
android:id="@+id/textView57"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="对应数量:"
android:textColor="#00BCD4"
app:layout_constraintBottom_toBottomOf="@+id/imageView15"
app:layout_constraintStart_toEndOf="@+id/imageView15" />
<TextView
android:id="@+id/textView58"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:textColor="@color/purple_200"
app:layout_constraintBottom_toBottomOf="@+id/textView56"
app:layout_constraintStart_toEndOf="@+id/textView56"
app:layout_constraintTop_toTopOf="@+id/textView56" />
<TextView
android:id="@+id/textView59"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:textColor="#00BCD4"
app:layout_constraintBottom_toBottomOf="@+id/textView57"
app:layout_constraintStart_toEndOf="@+id/textView57"
app:layout_constraintTop_toTopOf="@+id/textView57" />
<TextView
android:id="@+id/textView60"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:text="所在货架"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/imageView15" />
<TextView
android:id="@+id/textView61"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
app:layout_constraintEnd_toEndOf="@+id/textView60"
app:layout_constraintTop_toBottomOf="@+id/textView60" />
<TextView
android:id="@+id/textView62"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:text="TextView"
app:layout_constraintBottom_toBottomOf="@+id/imageView15"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/textView63"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="距离过期天数"
app:layout_constraintBottom_toTopOf="@+id/textView62"
app:layout_constraintEnd_toEndOf="@+id/textView62" />
<TextView
android:id="@+id/textView70"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="生产日期:"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/imageView15"
app:layout_constraintTop_toBottomOf="@+id/imageView15" />
<TextView
android:id="@+id/textView71"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
app:layout_constraintBottom_toBottomOf="@+id/textView70"
app:layout_constraintStart_toEndOf="@+id/textView70"
app:layout_constraintTop_toTopOf="@+id/textView70" />
<TextView
android:id="@+id/textView72"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:text="保质期至:"
app:layout_constraintBottom_toBottomOf="@+id/textView71"
app:layout_constraintStart_toEndOf="@+id/textView71"
app:layout_constraintTop_toTopOf="@+id/textView71" />
<TextView
android:id="@+id/textView73"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
app:layout_constraintBottom_toBottomOf="@+id/textView72"
app:layout_constraintStart_toEndOf="@+id/textView72"
app:layout_constraintTop_toTopOf="@+id/textView72" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,135 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="136dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout6"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/shape"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="药品名称:"
android:textColor="@color/black"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@+id/imageView6"
app:layout_constraintTop_toTopOf="@+id/imageView6" />
<TextView
android:id="@+id/textView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:textColor="@color/black"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/textView8"
app:layout_constraintStart_toEndOf="@+id/textView8"
app:layout_constraintTop_toTopOf="@+id/textView8" />
<TextView
android:id="@+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="药品编号:"
android:textColor="@color/purple_200"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@+id/textView10"
app:layout_constraintStart_toEndOf="@+id/imageView6"
app:layout_constraintTop_toBottomOf="@+id/textView8" />
<TextView
android:id="@+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:textColor="@color/purple_200"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="@+id/textView9"
app:layout_constraintStart_toEndOf="@+id/textView9"
app:layout_constraintTop_toTopOf="@+id/textView9" />
<TextView
android:id="@+id/textView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:textColor="#00BCD4"
app:layout_constraintBottom_toBottomOf="@+id/textView10"
app:layout_constraintStart_toEndOf="@+id/textView10"
app:layout_constraintTop_toTopOf="@+id/textView10" />
<TextView
android:id="@+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="药品分类:"
android:textColor="#00BCD4"
app:layout_constraintBottom_toBottomOf="@+id/imageView6"
app:layout_constraintStart_toEndOf="@+id/imageView6" />
<ImageView
android:id="@+id/imageView6"
android:layout_width="120dp"
android:layout_height="90dp"
android:layout_marginStart="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@color/teal_200" />
<TextView
android:id="@+id/textView15"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:text="TextView"
android:textColor="#F44336"
app:layout_constraintBottom_toBottomOf="@+id/imageView6"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/textView14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="库存"
app:layout_constraintBottom_toTopOf="@+id/textView15"
app:layout_constraintEnd_toEndOf="@+id/textView15" />
<TextView
android:id="@+id/textView16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:text="所在货架"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/imageView6" />
<TextView
android:id="@+id/textView17"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
app:layout_constraintEnd_toEndOf="@+id/textView16"
app:layout_constraintTop_toBottomOf="@+id/textView16" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@ -0,0 +1,7 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Base.Theme.MyApplication" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Customize your dark theme here. -->
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
</style>
</resources>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
</resources>

View File

@ -0,0 +1,5 @@
<resources>
<string name="app_name">My Application</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources>

View File

@ -0,0 +1,16 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.MyApplication" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?><!--
Sample backup rules file; uncomment and customize as necessary.
See https://developer.android.com/guide/topics/data/autobackup
for details.
Note: This file is ignored for devices older that API 31
See https://developer.android.com/about/versions/12/backup-restore
-->
<full-backup-content>
<!--
<include domain="sharedpref" path="."/>
<exclude domain="sharedpref" path="device.xml"/>
-->
</full-backup-content>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?><!--
Sample data extraction rules file; uncomment and customize as necessary.
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
for details.
-->
<data-extraction-rules>
<cloud-backup>
<!-- TODO: Use <include> and <exclude> to control what is backed up.
<include .../>
<exclude .../>
-->
</cloud-backup>
<!--
<device-transfer>
<include .../>
<exclude .../>
</device-transfer>
-->
</data-extraction-rules>

View File

@ -0,0 +1,17 @@
package com.c202101020117;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}

4
build.gradle Normal file
View File

@ -0,0 +1,4 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.android.application) apply false
}

22
gradle.properties Normal file
View File

@ -0,0 +1,22 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. For more details, visit
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
android.enableJetifier=true
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true

22
gradle/libs.versions.toml Normal file
View File

@ -0,0 +1,22 @@
[versions]
agp = "8.6.0"
junit = "4.13.2"
junitVersion = "1.1.5"
espressoCore = "3.5.1"
appcompat = "1.6.1"
material = "1.10.0"
activity = "1.8.0"
constraintlayout = "2.1.4"
[libraries]
junit = { group = "junit", name = "junit", version.ref = "junit" }
ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }

Some files were not shown because too many files have changed in this diff Show More