KorzunovaE 4 年之前
父節點
當前提交
0fa4f5f255

+ 1 - 0
app/build.gradle

@@ -32,4 +32,5 @@ dependencies {
     testImplementation 'junit:junit:4.12'
     androidTestImplementation 'androidx.test.ext:junit:1.1.1'
     androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
+    implementation 'com.appunity.retrofit2:converter-gson:2.0.2'
 }

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

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.example.proekt2">
-
+<uses-permission android:name="android.permission.INTERNET" />
     <application
         android:allowBackup="true"
         android:icon="@mipmap/ic_launcher"

+ 6 - 1
app/src/main/java/com/example/proekt2/MainActivity.kt

@@ -17,5 +17,10 @@ class MainActivity : AppCompatActivity() {
         startActivity(intent)
     }
 
-    fun buttonCoursesClick(view: View) {}
+    fun buttonCoursesClick(view: View) {
+        intent= Intent(this,kursActivity::class.java)
+        startActivity(intent)
+    }
+    fun buttonBankClick(view: View) {}
+    fun buttonkursClick(view: View) {}
 }

+ 12 - 0
app/src/main/res/layout/activity_kurs.xml

@@ -6,5 +6,17 @@
     android:layout_height="match_parent"
     tools:context=".kursActivity">
 
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="КУРС ДОЛЛАРА"
+        android:textAlignment="center"
+        android:textSize="40sp"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+
+        />
+
 
 </androidx.constraintlayout.widget.ConstraintLayout>

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

@@ -45,6 +45,8 @@
                 android:layout_height="wrap_content"
                 android:layout_marginTop="20dp"
                 android:background="@drawable/kn22"
+                android:drawableStart="@drawable/kn32"
+                android:drawableLeft="@drawable/kn32"
                 android:onClick="buttonBanksClick" />
 
             <Button