D 5 月之前
父节点
当前提交
a3bdd4df46

+ 1 - 1
app/build.gradle.kts

@@ -56,7 +56,7 @@ dependencies {
     implementation(libs.retrofit2.converter.gson)
     implementation(libs.gson)
     implementation("org.testng:testng:6.9.6")
-    implementation(files("C:\\Games\\diplom\\android\\app\\libs\\jtds-1.3.1.jar"))
+    implementation(files("libs\\jtds-1.3.1.jar"))
     testImplementation(libs.junit)
     androidTestImplementation(libs.androidx.junit)
     androidTestImplementation(libs.androidx.espresso.core)

+ 3 - 1
app/src/main/AndroidManifest.xml

@@ -17,6 +17,9 @@
         tools:targetApi="31">
         <activity
             android:name=".Activities.MainActivity"
+            android:exported="false"/>
+        <activity
+            android:name=".Activities.LoadActivity"
             android:exported="true">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -24,5 +27,4 @@
             </intent-filter>
         </activity>
     </application>
-
 </manifest>

+ 24 - 0
app/src/main/java/com/example/inventory/Activities/LoadActivity.kt

@@ -0,0 +1,24 @@
+package com.example.inventory.Activities
+
+import android.content.Intent
+import android.os.Bundle
+import android.os.Handler
+import androidx.appcompat.app.AppCompatActivity
+import com.example.inventory.databinding.ActivityLoadBinding
+
+
+class LoadActivity : AppCompatActivity() {
+    lateinit var bin: ActivityLoadBinding
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        bin = ActivityLoadBinding.inflate(layoutInflater)
+        setContentView(bin.root)
+
+        val handler = Handler()
+        handler.postDelayed(Runnable {
+                startActivity(Intent(this, MainActivity::class.java))
+                finish()
+        }, 1500)
+    }
+}

+ 34 - 0
app/src/main/res/drawable/logo.xml

@@ -0,0 +1,34 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="512dp"
+    android:height="512dp"
+    android:viewportWidth="512"
+    android:viewportHeight="512">
+  <path
+      android:pathData="M92.9,9.5c-47.9,8.8 -83.6,45 -91.4,92.5 -1.3,8.2 -1.5,28.6 -1.5,152.2 0,95.5 0.4,145.2 1.1,150.5 6,44.4 38.2,81.2 81.1,92.8 14.6,4 29.1,4.6 92,4.3l57.8,-0.3 2.7,-2.7c3.7,-3.7 3.7,-8.9 0,-12.6l-2.7,-2.7 -68.8,-0.5 -68.7,-0.6 -9,-2.7c-32,-10 -55.4,-34.2 -64.4,-66.7l-2.6,-9.5 -0.3,-141c-0.4,-150.3 -0.2,-156 4.4,-170.8 8.3,-26.5 29.7,-49.5 55.4,-59.2 16.7,-6.3 5.5,-5.9 162,-6.3 100,-0.2 145.5,-0 152.5,0.8 37.2,4.1 66.6,28.7 79.1,66l2.9,8.5 0.5,64c0.4,49.2 0.8,64.5 1.8,66.2 2.7,4.9 9.4,5.8 13.9,1.9l2.8,-2.4 0.3,-54.4c0.5,-74.1 -0.6,-83.6 -11.8,-106.5 -14.5,-29.6 -39.6,-50 -72.8,-59.1l-9.7,-2.7 -149.5,-0.2c-123.5,-0.1 -150.8,0.1 -157.1,1.2z"
+      android:fillColor="#000000"
+      android:strokeColor="#00000000"/>
+  <path
+      android:pathData="M178.3,72.7c-0.7,0.2 -14.4,15.7 -30.4,34.4 -16,18.6 -29.5,33.9 -30,33.9 -0.5,-0 -9,-6.1 -18.9,-13.5 -15.2,-11.3 -18.6,-13.5 -21.6,-13.5 -4.9,-0 -8.4,3.7 -8.4,8.8 0,4.9 1.1,5.9 26.8,25.1 22.7,16.9 24.5,17.6 30.1,12.3 1.7,-1.5 17,-19.1 34.1,-39.1 28.9,-33.8 31,-36.6 31,-40.1 0,-6.1 -7,-10.7 -12.7,-8.3z"
+      android:fillColor="#000000"
+      android:strokeColor="#00000000"/>
+  <path
+      android:pathData="M240.6,120.6c-3.4,3.5 -3.5,8.3 -0.2,12.1l2.4,2.8 83.9,0.3c55.7,0.2 85,-0 87.4,-0.7 6.4,-1.9 8.3,-9.8 3.4,-14.6l-2.4,-2.5 -85.9,-0 -85.9,-0 -2.7,2.6z"
+      android:fillColor="#000000"
+      android:strokeColor="#00000000"/>
+  <path
+      android:pathData="M178.3,200.7c-0.7,0.2 -14.4,15.7 -30.4,34.4 -16,18.6 -29.5,33.9 -30,33.9 -0.5,-0 -9,-6.1 -18.9,-13.5 -15.2,-11.3 -18.6,-13.5 -21.6,-13.5 -4.9,-0 -8.4,3.7 -8.4,8.8 0,4.9 1.1,5.9 26.8,25.1 22.7,16.9 24.5,17.6 30.1,12.3 1.7,-1.5 17,-19.1 34.1,-39.1 28.9,-33.8 31,-36.6 31,-40.1 0,-6.1 -7,-10.7 -12.7,-8.3z"
+      android:fillColor="#000000"
+      android:strokeColor="#00000000"/>
+  <path
+      android:pathData="M240.6,248.6c-3.4,3.5 -3.5,8.3 -0.2,12.1l2.4,2.8 83.9,0.3c55.7,0.2 85,-0 87.4,-0.7 6.4,-1.9 8.3,-9.8 3.4,-14.6l-2.4,-2.5 -85.9,-0 -85.9,-0 -2.7,2.6z"
+      android:fillColor="#000000"
+      android:strokeColor="#00000000"/>
+  <path
+      android:pathData="M449,265.6c-3.8,1.4 -15.2,12.3 -77.5,74.5l-73,72.9 -9.4,34.8c-6.8,25.1 -10,35.4 -11.6,37.2 -6.4,7.3 -7.1,11.5 -2.6,16.1 4.2,4.1 8,3.9 13.2,-0.8 3.8,-3.5 5.9,-4.2 39.6,-13.3l35.5,-9.7 71.5,-71.4c53.4,-53.4 72.1,-72.6 74,-76.3 3.6,-7.1 4.1,-14.6 1.2,-22.1 -2,-5.3 -4.1,-7.9 -18.3,-22.1 -9.9,-9.9 -17.8,-17 -20.6,-18.4 -5.8,-3 -15.8,-3.6 -22,-1.4zM462.3,283.4c3.9,1.7 29.2,27.1 30.5,30.7 1.9,4.9 0.3,7.3 -13.9,21.5l-13.9,13.9 -19.2,-19.3 -19.3,-19.2 13.5,-13.6c12.1,-12.1 15.6,-15.1 18.3,-15.3 0.4,-0.1 2.2,0.5 4,1.3zM405.3,409.2l-46.8,46.8 -19.2,-19.2 -19.3,-19.3 46.7,-46.7 46.8,-46.8 19.2,19.2 19.3,19.3 -46.7,46.7zM340,464.1c0,0.8 -38.1,11.2 -38.7,10.6 -0.2,-0.3 1.9,-9.3 4.9,-20.1l5.3,-19.6 14.2,14.2c7.9,7.9 14.3,14.5 14.3,14.9z"
+      android:fillColor="#000000"
+      android:strokeColor="#00000000"/>
+  <path
+      android:pathData="M178.8,337.7c-1,0.2 -14.9,15.7 -30.9,34.4 -16,18.6 -29.5,33.9 -30,33.9 -0.5,-0 -9,-6.1 -18.9,-13.5 -19.1,-14.2 -21.1,-15.2 -26,-11.8 -3.5,2.3 -4,3.3 -4,7.4 0,2.7 0.8,4.2 3.3,6.6 3.9,3.7 39.3,30.5 42.4,32.1 2.4,1.3 6.2,1.5 8.8,0.5 1,-0.3 16.5,-17.9 34.6,-39 31,-36.1 32.9,-38.5 32.9,-42.2 0,-3.2 -0.6,-4.4 -3.1,-6.5 -2.9,-2.5 -5.2,-2.9 -9.1,-1.9z"
+      android:fillColor="#000000"
+      android:strokeColor="#00000000"/>
+</vector>

二进制
app/src/main/res/drawable/photo.png


+ 38 - 0
app/src/main/res/layout/activity_load.xml

@@ -0,0 +1,38 @@
+<?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:id="@+id/main"
+    android:background="#7096C0"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".Activities.LoadActivity">
+
+    <LinearLayout
+        android:padding="20dp"
+        android:background="@color/white"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:textAlignment="center"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent">
+
+        <ImageView
+            android:layout_width="match_parent"
+            android:layout_height="250dp"
+            android:src="@drawable/logo" />
+
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="Инвентарь"
+            android:textAlignment="center"
+            android:textSize="40dp"
+            android:layout_marginVertical="10dp"
+            android:textColor="#7096C0"
+            android:textStyle="bold"/>
+    </LinearLayout>
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 0 - 3
app/src/main/res/layout/activity_main.xml

@@ -54,7 +54,4 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content" />
         </LinearLayout>
-
-
-
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 17 - 8
app/src/main/res/layout/item_inventory.xml

@@ -27,7 +27,8 @@
                 android:layout_height="wrap_content"
                 android:layout_marginVertical="5dp"
                 android:text="nomer"
-                android:textSize="20dp" />
+                android:textSize="20dp"
+                android:textColor="@color/black"/>
 
             <TextView
                 android:id="@+id/tb_name"
@@ -38,7 +39,8 @@
                 android:maxLines="1"
                 android:singleLine="true"
                 android:text="name"
-                android:textSize="23dp" />
+                android:textSize="23dp"
+                android:textColor="@color/black"/>
 
             <TextView
                 android:id="@+id/tb_cost"
@@ -46,7 +48,8 @@
                 android:layout_height="wrap_content"
                 android:layout_marginVertical="5dp"
                 android:text="cost"
-                android:textSize="23dp" />
+                android:textSize="23dp"
+                android:textColor="@color/black"/>
         </LinearLayout>
 
         <TableLayout
@@ -59,22 +62,28 @@
 
             <TableRow android:layout_width="match_parent">
 
-                <Button
+                <androidx.appcompat.widget.AppCompatButton
                     android:id="@+id/btn_write"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_alignParentLeft="true"
-                    android:layout_marginEnd="5dp"
+                    android:layout_marginEnd="0dp"
                     android:layout_weight="1"
-                    android:text="Списать" />
+                    android:layout_margin="10dp"
+                    android:text="Списать"
+                    android:background="#7096C0"
+                    android:textColor="@color/white"/>
 
-                <Button
+                <androidx.appcompat.widget.AppCompatButton
                     android:id="@+id/btn_del"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_alignParentRight="true"
                     android:layout_weight="1"
-                    android:text="Ликвидировать" />
+                    android:layout_margin="10dp"
+                    android:text="Ликвидировать"
+                    android:background="#7096C0"
+                    android:textColor="@color/white"/>
             </TableRow>
         </TableLayout>
     </RelativeLayout>