Android代码12月3日提交

This commit is contained in:
Levi 2024-12-03 23:09:54 +08:00
parent b596e2d4f3
commit d6d0ca5573
17 changed files with 546 additions and 56 deletions

View File

@ -1,5 +1,6 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
}
android {
@ -14,6 +15,9 @@ android {
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
buildTypes {
@ -26,6 +30,20 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.5.1'
}
packaging {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
dependencies {
@ -43,6 +61,14 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation libs.lifecycle.runtime.ktx
implementation libs.activity.compose
implementation platform(libs.compose.bom)
implementation libs.ui
implementation libs.ui.graphics
implementation libs.ui.tooling.preview
implementation libs.material3
implementation libs.activity
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
@ -64,6 +90,10 @@ dependencies {
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' //
implementation 'io.github.scwang90:refresh-footer-classics:2.0.5'
androidTestImplementation platform(libs.compose.bom)
androidTestImplementation libs.ui.test.junit4
debugImplementation libs.ui.tooling
debugImplementation libs.ui.test.manifest//
}

View File

@ -10,6 +10,9 @@
android:supportsRtl="true"
android:theme="@style/Theme.MyApplication"
android:usesCleartextTraffic="true">
<activity
android:name=".Action.Action6"
android:exported="false" />
<activity
android:name=".Action.Action5"
android:exported="false" />
@ -45,30 +48,4 @@
</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>-->
</manifest>

View File

@ -58,7 +58,7 @@ public class Action2 extends AppCompatActivity {
recyclerView.setAdapter(myAdapter);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
back = findViewById(R.id.textView67);
back = findViewById(R.id.textView101);
back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@ -149,6 +149,7 @@ public class Action2 extends AppCompatActivity {
@Override
//每个条目加载一次该方法就会被调用一次
public void onBindViewHolder(@NonNull MyViewHoler holder, int position) {
holder.idTv.setText(drugs.rows.get(position).id+"");
holder.DnoTv.setText(drugs.rows.get(position).dno);
holder.DnameTv.setText(drugs.rows.get(position).name);
holder.SnoTv.setText(drugs.rows.get(position).sno);
@ -188,6 +189,7 @@ public class Action2 extends AppCompatActivity {
//缓存列表数据
public class MyViewHoler extends RecyclerView.ViewHolder{
TextView idTv;
TextView DnoTv;
TextView DnameTv;
TextView SnoTv;
@ -200,11 +202,12 @@ public class Action2 extends AppCompatActivity {
public MyViewHoler(@NonNull View itemView) {
super(itemView);
idTv = itemView.findViewById(R.id.textView73);
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);
EXPTv = itemView.findViewById(R.id.textView87);
DatediffTv = itemView.findViewById(R.id.textView62);
QuantityTv = itemView.findViewById(R.id.textView59);
imageView = itemView.findViewById(R.id.imageView15);

View File

@ -1,17 +1,62 @@
package com.c202101020117.Action;
import androidx.appcompat.app.AppCompatActivity;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import com.c202101020117.R;
import com.gyf.immersionbar.ImmersionBar;
public class Action3 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_action3);
ImmersionBar.with(this).init();
back = findViewById(R.id.textView33);
text1 = findViewById(R.id.editTextText30);
text2 = findViewById(R.id.editTextText32);
text3 = findViewById(R.id.editTextText33);
text4 = findViewById(R.id.editTextText31);
confirm = findViewById(R.id.textView204);
SharedPreferences sharedPreferences = getSharedPreferences("action6", 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", ""));
text4.setText(sharedPreferences.getString("Quantity", ""));
editor.clear();
editor.commit();
} else {
text1.setText("");
text2.setText("");
text3.setText("");
text4.setText("");
}
confirm.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
}
});
}
}

View File

@ -0,0 +1,217 @@
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.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
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.AppConctroller;
import com.c202101020117.Login;
import com.c202101020117.R;
import com.c202101020117.package1.Drug2ListResult;
import com.c202101020117.package1.RYApi;
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 retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class Action6 extends AppCompatActivity {
RecyclerView recyclerView;
MyAdapter myAdapter;
TextView back;
SmartRefreshLayout smartRefreshLayout;
Drug2ListResult drugs;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_action6);
ImmersionBar.with(this).init();
//添加Activity到容器中
AppConctroller.addActivity(this);
myAdapter = new MyAdapter();
recyclerView = findViewById(R.id.recyclerview6);
recyclerView.setAdapter(myAdapter);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
back = findViewById(R.id.textView103);
back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
AppConctroller.removeActivity(Action6.this);
finish();
}
});
SharedPreferences sharedPreferences = getSharedPreferences("user", Activity.MODE_PRIVATE);
String token = sharedPreferences.getString("token", null);
//获取数据
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("http://10.138.63.204:8080/")
.addConverterFactory(GsonConverterFactory.create()) //返回结果用Gson解析
.build();
RYApi api = retrofit.create(RYApi.class);
Call<Drug2ListResult> drug2ListResultCall = api.getDateQuantityList("Bearer " + token);
drug2ListResultCall.enqueue(new Callback<Drug2ListResult>() {
@Override
public void onResponse(Call<Drug2ListResult> call, Response<Drug2ListResult> response) {
drugs = response.body();
if(drugs.code == 200){
myAdapter.notifyDataSetChanged();
}
if(drugs.code == 401){
Toast.makeText(Action6.this, "请重新登录", Toast.LENGTH_LONG).show();
Intent intent = new Intent(Action6.this, Login.class);
startActivity(intent);
AppConctroller.exit();
}
}
@Override
public void onFailure(Call<Drug2ListResult> call, Throwable t) {
}
});
//列表刷新
smartRefreshLayout=findViewById(R.id.smarlayout6);
smartRefreshLayout.setRefreshHeader(new ClassicsHeader(this));
smartRefreshLayout.setRefreshFooter(new ClassicsFooter(this));
smartRefreshLayout.setOnRefreshListener(new OnRefreshListener() {
@Override
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
Call<Drug2ListResult> drug2ListResultCall = api.getDateQuantityList("Bearer " + token);
drug2ListResultCall.enqueue(new Callback<Drug2ListResult>() {
@Override
public void onResponse(Call<Drug2ListResult> call, Response<Drug2ListResult> response) {
drugs = response.body();
if(drugs.code == 200){
smartRefreshLayout.finishRefresh(500);
myAdapter.notifyDataSetChanged();
}
if(drugs.code == 401){
Toast.makeText(Action6.this, "请重新登录", Toast.LENGTH_LONG).show();
Intent intent = new Intent(Action6.this, Login.class);
startActivity(intent);
AppConctroller.exit();
}
}
@Override
public void onFailure(Call<Drug2ListResult> call, Throwable t) {
}
});
}
});
}
public class MyAdapter extends RecyclerView.Adapter<Action6.MyViewHoler>{
@NonNull
@Override
//加载布局文件
public MyViewHoler onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(Action6.this)
.inflate(R.layout.item3_layout,parent,false);
MyViewHoler myViewHoler = new MyViewHoler(view);
return myViewHoler;
}
@Override
//每个条目加载一次该方法就会被调用一次
public void onBindViewHolder(@NonNull Action6.MyViewHoler holder, int position) {
holder.idTv.setText(drugs.rows.get(position).id+"");
holder.DnoTv.setText(drugs.rows.get(position).dno);
holder.DnameTv.setText(drugs.rows.get(position).name);
holder.SnoTv.setText(drugs.rows.get(position).sno);
holder.MFDTv.setText(drugs.rows.get(position).mFD);
holder.EXPTv.setText(drugs.rows.get(position).eXP);
holder.QuantityTv.setText(drugs.rows.get(position).quantity+"");
holder.DatediffTv.setText((int)(drugs.rows.get(position).datediff)+"");
Glide.with(Action6.this).load(drugs.rows.get(position).picture).into(holder.imageView);
holder.constraintLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
SharedPreferences sharedPreferences = getSharedPreferences("action6",MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean("need",true);
editor.putInt("id",holder.idTv.getId());
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(Action6.this, Action3.class);
startActivity(intent);
}
});
}
@Override
//用来控制限制列表条数
public int getItemCount() {
if(drugs != null)
return drugs.rows.size();
else
return 0;
}
}
//缓存列表数据
public class MyViewHoler extends RecyclerView.ViewHolder{
TextView idTv;
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);
idTv = itemView.findViewById(R.id.textView73);
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.textView87);
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

@ -9,6 +9,7 @@ import android.view.View;
import android.view.ViewGroup;
import com.c202101020117.Action.Action1;
import com.c202101020117.Action.Action2;
import com.c202101020117.Action.Action6;
import com.c202101020117.R;
@ -16,6 +17,7 @@ public class ScreeningFragment extends Fragment {
ConstraintLayout action1;
ConstraintLayout action2;
ConstraintLayout action6;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
@ -25,6 +27,7 @@ public class ScreeningFragment extends Fragment {
action1 = view.findViewById(R.id.constraintLayout9);
action2 = view.findViewById(R.id.constraintLayout8);
action6 = view.findViewById(R.id.constraintLayout23);
action1.setOnClickListener(new View.OnClickListener() {
@Override
@ -42,6 +45,14 @@ public class ScreeningFragment extends Fragment {
}
});
action6.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(getActivity(), Action6.class);
startActivity(intent);
}
});
return view;
}
}

View File

@ -17,7 +17,7 @@ public class Drug2ListResult {
public Object updateBy;
public Object updateTime;
public Object remark;
public Object id;
public Integer id;
public String dno;
public String name;
public String picture;

View File

@ -33,6 +33,10 @@ public interface RYApi {
@GET("/system/adrug/specificationlist")
Call<DrugSpecificationResult> getDrugSpecificationByDno(@Header("Authorization") String token, @Query("dno") String dno);
//http://127.0.0.1:8080/system/adrug/datequantitylist
@GET("/system/adrug/datequantitylist")
Call<Drug2ListResult> getDateQuantityList(@Header("Authorization") String token);
//http://127.0.0.1:8080/system/adrug/undersupplylist
@GET("/system/adrug/undersupplylist")
Call<DrugListResult> getUndersupplyDrugList(@Header("Authorization") String token);

View File

@ -46,11 +46,6 @@
<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" />
android:layout_height="match_parent" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -8,7 +8,7 @@
tools:context=".Action.Action2">
<TextView
android:id="@+id/textView66"
android:id="@+id/textView100"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="48dp"
@ -21,7 +21,7 @@
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView67"
android:id="@+id/textView101"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
@ -29,9 +29,9 @@
android:textColor="@color/teal_200"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/textView66"
app:layout_constraintBottom_toBottomOf="@+id/textView100"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView66" />
app:layout_constraintTop_toTopOf="@+id/textView100" />
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/smarlayout"
@ -40,17 +40,14 @@
android:layout_marginTop="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView66">
app:layout_constraintTop_toBottomOf="@+id/textView100"
app:layout_constraintVertical_bias="0.0">
<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" />
android:layout_height="match_parent" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -46,5 +46,120 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<EditText
android:id="@+id/editTextText30"
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/editTextText32"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/editTextText31"
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/textView204"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextText33" />
<EditText
android:id="@+id/editTextText32"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="36dp"
android:ems="10"
android:gravity="center"
android:inputType="textPersonName"
app:layout_constraintBottom_toTopOf="@+id/editTextText33"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextText30" />
<EditText
android:id="@+id/editTextText33"
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/editTextText31"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextText32" />
<TextView
android:id="@+id/textView200"
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/editTextText30"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/editTextText30" />
<TextView
android:id="@+id/textView203"
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/editTextText33"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/editTextText33" />
<TextView
android:id="@+id/textView202"
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/editTextText32"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/editTextText32" />
<TextView
android:id="@+id/textVie201"
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/editTextText31"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/editTextText31" />
<TextView
android:id="@+id/textView204"
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/editTextText31" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,53 @@
<?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.Action6">
<TextView
android:id="@+id/textView102"
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/textView103"
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/textView102"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView102" />
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/smarlayout6"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView102"
app:layout_constraintVertical_bias="0.0" >
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerview6"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -10,19 +10,35 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout23"
android:layout_width="300dp"
android:layout_height="50dp"
app:layout_constraintBottom_toTopOf="@+id/constraintLayout9"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView60"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/action1_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/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">
app:layout_constraintTop_toBottomOf="@+id/constraintLayout23">
<ImageView
android:id="@+id/imageView8"
@ -49,7 +65,6 @@
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">

View File

@ -16,8 +16,19 @@
android:background="@drawable/shape"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0">
<TextView
android:id="@+id/textView87"
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" />
<ImageView
android:id="@+id/imageView15"
@ -162,7 +173,7 @@
android:layout_height="wrap_content"
android:text="TextView"
app:layout_constraintBottom_toBottomOf="@+id/textView72"
app:layout_constraintStart_toEndOf="@+id/textView72"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView72" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

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

View File

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

View File

@ -7,6 +7,10 @@ appcompat = "1.6.1"
material = "1.10.0"
activity = "1.8.0"
constraintlayout = "2.1.4"
kotlin = "1.9.0"
lifecycleRuntimeKtx = "2.6.1"
activityCompose = "1.8.0"
composeBom = "2024.04.01"
[libraries]
junit = { group = "junit", name = "junit", version.ref = "junit" }
@ -16,7 +20,18 @@ appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "a
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" }
lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
ui = { group = "androidx.compose.ui", name = "ui" }
ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
material3 = { group = "androidx.compose.material3", name = "material3" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }