From a93a562fa93e1a05b4a9f1ef6c9ae611745b80eb Mon Sep 17 00:00:00 2001
From: daniilmiagkov <59875675+daniilmiagkov@users.noreply.github.com>
Date: Thu, 21 Oct 2021 20:28:37 +0300
Subject: [PATCH 01/10] bottomsheet
---
.idea/gradle.properties | 0
.idea/misc.xml | 21 ++
app/build.gradle | 34 ++--
app/src/main/AndroidManifest.xml | 5 +-
.../com/example/geometry/ButtonActivity.java | 7 +
.../com/example/geometry/MainActivity.java | 37 ----
.../java/com/example/geometry/MainActivity.kt | 35 ++++
.../geometry/ui/camera/CameraViewModel.kt | 13 ++
.../com/example/geometry/ui/camera/camera.kt | 46 +++++
.../geometry/ui/figurs/FigursViewModel.kt | 7 +
.../com/example/geometry/ui/figurs/figurs.kt | 25 +++
.../geometry/ui/maths/MathsViewModel.kt | 7 +
.../com/example/geometry/ui/maths/maths.kt | 26 +++
.../example/geometry/ui/send/SendViewModel.kt | 7 +
.../java/com/example/geometry/ui/send/send.kt | 26 +++
app/src/main/res/drawable/camera.png | Bin 0 -> 17970 bytes
app/src/main/res/drawable/cursor.png | Bin 0 -> 790 bytes
app/src/main/res/drawable/figurs.png | Bin 0 -> 17860 bytes
.../res/drawable/ic_dashboard_black_24dp.xml | 9 -
.../main/res/drawable/ic_home_black_24dp.xml | 9 -
.../drawable/ic_notifications_black_24dp.xml | 9 -
app/src/main/res/drawable/line.png | Bin 0 -> 268 bytes
app/src/main/res/drawable/maths.png | Bin 0 -> 10278 bytes
app/src/main/res/drawable/send.png | Bin 0 -> 15798 bytes
app/src/main/res/layout/activity_main.xml | 51 +++--
app/src/main/res/layout/bottom_sheet.xml | 181 ++++++++++++++----
app/src/main/res/layout/camera_fragment.xml | 14 ++
app/src/main/res/layout/figurs_fragment.xml | 39 ++++
.../main/res/layout/fragment_dashboard.xml | 13 --
app/src/main/res/layout/fragment_home.xml | 13 --
.../res/layout/fragment_notifications.xml | 13 --
app/src/main/res/layout/maths_fragment.xml | 13 ++
app/src/main/res/layout/send_fragment.xml | 13 ++
app/src/main/res/menu/bottom_nav_menu.xml | 29 +--
.../main/res/navigation/mobile_navigation.xml | 34 ++--
app/src/main/res/values/colors.xml | 2 +
app/src/main/res/values/dimens.xml | 5 -
app/src/main/res/values/strings.xml | 9 +-
build.gradle | 4 +-
39 files changed, 546 insertions(+), 210 deletions(-)
create mode 100644 .idea/gradle.properties
create mode 100644 app/src/main/java/com/example/geometry/ButtonActivity.java
delete mode 100644 app/src/main/java/com/example/geometry/MainActivity.java
create mode 100644 app/src/main/java/com/example/geometry/MainActivity.kt
create mode 100644 app/src/main/java/com/example/geometry/ui/camera/CameraViewModel.kt
create mode 100644 app/src/main/java/com/example/geometry/ui/camera/camera.kt
create mode 100644 app/src/main/java/com/example/geometry/ui/figurs/FigursViewModel.kt
create mode 100644 app/src/main/java/com/example/geometry/ui/figurs/figurs.kt
create mode 100644 app/src/main/java/com/example/geometry/ui/maths/MathsViewModel.kt
create mode 100644 app/src/main/java/com/example/geometry/ui/maths/maths.kt
create mode 100644 app/src/main/java/com/example/geometry/ui/send/SendViewModel.kt
create mode 100644 app/src/main/java/com/example/geometry/ui/send/send.kt
create mode 100644 app/src/main/res/drawable/camera.png
create mode 100644 app/src/main/res/drawable/cursor.png
create mode 100644 app/src/main/res/drawable/figurs.png
delete mode 100644 app/src/main/res/drawable/ic_dashboard_black_24dp.xml
delete mode 100644 app/src/main/res/drawable/ic_home_black_24dp.xml
delete mode 100644 app/src/main/res/drawable/ic_notifications_black_24dp.xml
create mode 100644 app/src/main/res/drawable/line.png
create mode 100644 app/src/main/res/drawable/maths.png
create mode 100644 app/src/main/res/drawable/send.png
create mode 100644 app/src/main/res/layout/camera_fragment.xml
create mode 100644 app/src/main/res/layout/figurs_fragment.xml
delete mode 100644 app/src/main/res/layout/fragment_dashboard.xml
delete mode 100644 app/src/main/res/layout/fragment_home.xml
delete mode 100644 app/src/main/res/layout/fragment_notifications.xml
create mode 100644 app/src/main/res/layout/maths_fragment.xml
create mode 100644 app/src/main/res/layout/send_fragment.xml
delete mode 100644 app/src/main/res/values/dimens.xml
diff --git a/.idea/gradle.properties b/.idea/gradle.properties
new file mode 100644
index 0000000..e69de29
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 993c0db..0613dec 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,6 +3,26 @@
+
diff --git a/app/build.gradle b/app/build.gradle
index 92ccd38..8a14e58 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,5 +1,6 @@
plugins {
id 'com.android.application'
+ id 'kotlin-android'
}
android {
@@ -17,7 +18,7 @@ android {
buildTypes {
release {
- minifyEnabled false
+ minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
@@ -25,22 +26,31 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
- buildFeatures {
- viewBinding true
+ viewBinding{
+ enabled = true
}
}
dependencies {
- implementation 'androidx.appcompat:appcompat:1.2.0'
- implementation 'com.google.android.material:material:1.3.0'
- implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
+ implementation 'com.google.android.material:material:'
+ implementation 'androidx.appcompat:appcompat:1.3.1'
+ implementation 'com.google.android.material:material:1.4.0'
+ implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
+ implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
- implementation 'androidx.navigation:navigation-fragment:2.3.5'
- implementation 'androidx.navigation:navigation-ui:2.3.5'
- implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
- testImplementation 'junit:junit:4.+'
- androidTestImplementation 'androidx.test.ext:junit:1.1.2'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
+ testImplementation 'junit:junit:4.13.2'
+ androidTestImplementation 'androidx.test.ext:junit:1.1.3'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
+ implementation 'androidx.appcompat:appcompat:1.3.1'
+ implementation 'com.google.android.material:material:1.4.0'
+ implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
+ implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
+ implementation 'androidx.core:core-ktx:1.6.0'
+ implementation 'androidx.appcompat:appcompat:1.3.1'
+ implementation 'com.google.android.material:material:1.4.0'
+ implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
+ implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
+ implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 5a269ff..e2c4129 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -5,14 +5,13 @@
+ android:exported="true">
diff --git a/app/src/main/java/com/example/geometry/ButtonActivity.java b/app/src/main/java/com/example/geometry/ButtonActivity.java
new file mode 100644
index 0000000..e9d4da8
--- /dev/null
+++ b/app/src/main/java/com/example/geometry/ButtonActivity.java
@@ -0,0 +1,7 @@
+package com.example.geometry;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+public class ButtonActivity extends AppCompatActivity {
+
+}
diff --git a/app/src/main/java/com/example/geometry/MainActivity.java b/app/src/main/java/com/example/geometry/MainActivity.java
deleted file mode 100644
index 6ae9d43..0000000
--- a/app/src/main/java/com/example/geometry/MainActivity.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.example.geometry;
-
-import android.os.Bundle;
-
-import com.google.android.material.bottomnavigation.BottomNavigationView;
-
-import androidx.annotation.Nullable;
-import androidx.appcompat.app.AppCompatActivity;
-import androidx.navigation.NavController;
-import androidx.navigation.Navigation;
-import androidx.navigation.ui.AppBarConfiguration;
-import androidx.navigation.ui.NavigationUI;
-
-import com.example.geometry.databinding.ActivityMainBinding;
-
-public class MainActivity extends AppCompatActivity {
-
- private ActivityMainBinding binding;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- binding = ActivityMainBinding.inflate(getLayoutInflater());
- setContentView(binding.getRoot());
-
- //BottomNavigationView navView = findViewById(R.id.nav_view);
- //// Passing each menu ID as a set of Ids because each
- //// menu should be considered as top level destinations.
- //AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(
- // R.id.navigation_home, R.id.navigation_dashboard, R.id.navigation_notifications)
- // .build();
- //NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment_activity_main);
- //NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration);
- //NavigationUI.setupWithNavController(binding.navView, navController);
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/geometry/MainActivity.kt b/app/src/main/java/com/example/geometry/MainActivity.kt
new file mode 100644
index 0000000..099fb3b
--- /dev/null
+++ b/app/src/main/java/com/example/geometry/MainActivity.kt
@@ -0,0 +1,35 @@
+package com.example.geometry
+
+import android.os.Bundle
+import com.google.android.material.bottomnavigation.BottomNavigationView
+import androidx.appcompat.app.AppCompatActivity
+import androidx.navigation.findNavController
+import androidx.navigation.ui.AppBarConfiguration
+import androidx.navigation.ui.setupActionBarWithNavController
+import androidx.navigation.ui.setupWithNavController
+import com.example.geometry.databinding.ActivityMainBinding
+
+class MainActivity : AppCompatActivity() {
+
+ private lateinit var binding: ActivityMainBinding
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+
+ binding = ActivityMainBinding.inflate(layoutInflater)
+ setContentView(binding.root)
+
+ val navView: BottomNavigationView = binding.bottomNavigationView
+
+ val navController = findNavController(R.id.nav_host_fragment_activity_main)
+ // Passing each menu ID as a set of Ids because each
+ // menu should be considered as top level destinations.
+ val appBarConfiguration = AppBarConfiguration(
+ setOf(
+ R.id.navigation_figurs, R.id.navigation_maths, R.id.navigation_camera
+ )
+ )
+ setupActionBarWithNavController(navController, appBarConfiguration)
+ navView.setupWithNavController(navController)
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/geometry/ui/camera/CameraViewModel.kt b/app/src/main/java/com/example/geometry/ui/camera/CameraViewModel.kt
new file mode 100644
index 0000000..b2f17b5
--- /dev/null
+++ b/app/src/main/java/com/example/geometry/ui/camera/CameraViewModel.kt
@@ -0,0 +1,13 @@
+package com.example.geometry.ui.camera
+
+import androidx.lifecycle.LiveData
+import androidx.lifecycle.MutableLiveData
+import androidx.lifecycle.ViewModel
+
+class CameraViewModel : ViewModel() {
+ // TODO: Implement the ViewModel
+ private val _text = MutableLiveData().apply {
+ value = "This is camera Fragment"
+ }
+ val text: LiveData = _text
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/geometry/ui/camera/camera.kt b/app/src/main/java/com/example/geometry/ui/camera/camera.kt
new file mode 100644
index 0000000..071e10b
--- /dev/null
+++ b/app/src/main/java/com/example/geometry/ui/camera/camera.kt
@@ -0,0 +1,46 @@
+package com.example.geometry.ui.camera
+
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.widget.TextView
+import androidx.fragment.app.Fragment
+import androidx.lifecycle.Observer
+import androidx.lifecycle.ViewModelProvider
+import com.example.geometry.R
+import com.example.geometry.databinding.CameraFragmentBinding
+
+class camera : Fragment() {
+
+ private lateinit var cameraViewModel: CameraViewModel
+ private var _binding: CameraFragmentBinding? = null
+
+ // This property is only valid between onCreateView and
+ // onDestroyView.
+ private val binding get() = _binding!!
+
+ private lateinit var viewModel: CameraViewModel
+
+ override fun onCreateView(
+ inflater: LayoutInflater,
+ container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View? {
+ cameraViewModel =
+ ViewModelProvider(this).get(cameraViewModel::class.java)
+
+ _binding = CameraFragmentBinding.inflate(inflater, container, false)
+ val root: View = binding.root
+
+ val textView: TextView = binding.textCamera
+ cameraViewModel.text.observe(viewLifecycleOwner, Observer {
+ textView.text = it
+ })
+ return root
+ }
+ override fun onDestroyView() {
+ super.onDestroyView()
+ _binding = null
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/geometry/ui/figurs/FigursViewModel.kt b/app/src/main/java/com/example/geometry/ui/figurs/FigursViewModel.kt
new file mode 100644
index 0000000..55eb344
--- /dev/null
+++ b/app/src/main/java/com/example/geometry/ui/figurs/FigursViewModel.kt
@@ -0,0 +1,7 @@
+package com.example.geometry.ui.figurs
+
+import androidx.lifecycle.ViewModel
+
+class FigursViewModel : ViewModel() {
+ // TODO: Implement the ViewModel
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/geometry/ui/figurs/figurs.kt b/app/src/main/java/com/example/geometry/ui/figurs/figurs.kt
new file mode 100644
index 0000000..664be6d
--- /dev/null
+++ b/app/src/main/java/com/example/geometry/ui/figurs/figurs.kt
@@ -0,0 +1,25 @@
+package com.example.geometry.ui.figurs
+
+import androidx.lifecycle.ViewModelProvider
+import android.os.Bundle
+import androidx.fragment.app.Fragment
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import com.example.geometry.R
+
+class figurs : Fragment() {
+
+ companion object {
+ fun newInstance() = figurs()
+ }
+
+ private lateinit var viewModel: FigursViewModel
+
+ override fun onCreateView(
+ inflater: LayoutInflater, container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View? {
+ return inflater.inflate(R.layout.figurs_fragment, container, false)
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/geometry/ui/maths/MathsViewModel.kt b/app/src/main/java/com/example/geometry/ui/maths/MathsViewModel.kt
new file mode 100644
index 0000000..3cb7d12
--- /dev/null
+++ b/app/src/main/java/com/example/geometry/ui/maths/MathsViewModel.kt
@@ -0,0 +1,7 @@
+package com.example.geometry.ui.maths
+
+import androidx.lifecycle.ViewModel
+
+class MathsViewModel : ViewModel() {
+ // TODO: Implement the ViewModel
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/geometry/ui/maths/maths.kt b/app/src/main/java/com/example/geometry/ui/maths/maths.kt
new file mode 100644
index 0000000..25fc89f
--- /dev/null
+++ b/app/src/main/java/com/example/geometry/ui/maths/maths.kt
@@ -0,0 +1,26 @@
+package com.example.geometry.ui.maths
+
+import androidx.lifecycle.ViewModelProvider
+import android.os.Bundle
+import androidx.fragment.app.Fragment
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import com.example.geometry.R
+
+class maths : Fragment() {
+
+ companion object {
+ fun newInstance() = maths()
+ }
+
+ private lateinit var viewModel: MathsViewModel
+
+ override fun onCreateView(
+ inflater: LayoutInflater, container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View? {
+ return inflater.inflate(R.layout.maths_fragment, container, false)
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/geometry/ui/send/SendViewModel.kt b/app/src/main/java/com/example/geometry/ui/send/SendViewModel.kt
new file mode 100644
index 0000000..1e06dec
--- /dev/null
+++ b/app/src/main/java/com/example/geometry/ui/send/SendViewModel.kt
@@ -0,0 +1,7 @@
+package com.example.geometry.ui.send
+
+import androidx.lifecycle.ViewModel
+
+class SendViewModel : ViewModel() {
+ // TODO: Implement the ViewModel
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/geometry/ui/send/send.kt b/app/src/main/java/com/example/geometry/ui/send/send.kt
new file mode 100644
index 0000000..728bc85
--- /dev/null
+++ b/app/src/main/java/com/example/geometry/ui/send/send.kt
@@ -0,0 +1,26 @@
+package com.example.geometry.ui.send
+
+import androidx.lifecycle.ViewModelProvider
+import android.os.Bundle
+import androidx.fragment.app.Fragment
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import com.example.geometry.R
+
+class send : Fragment() {
+
+ companion object {
+ fun newInstance() = send()
+ }
+
+ private lateinit var viewModel: SendViewModel
+
+ override fun onCreateView(
+ inflater: LayoutInflater, container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View? {
+ return inflater.inflate(R.layout.send_fragment, container, false)
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/res/drawable/camera.png b/app/src/main/res/drawable/camera.png
new file mode 100644
index 0000000000000000000000000000000000000000..564cd84d4910a75620da14d0c7e2695f7982d4dc
GIT binary patch
literal 17970
zcmeHP3v3is6rDG_?UvF?gYmEYl=y*wia~**yW3f?8i^n9heB6WG>RoitltEU8jSH1
zG%6~z#h?TtMDdfrwp$Twzz`z_KfzBx4T_>g%hGLU=6UYYHqd>upV_lQK|E<;==z1%RNua^CcNM_t)`}C%$@h#b?=<;{M*J{hgJ
z`cbX)@(;Y!ZsGBa2Uz>Kn%21#ksg5b25$cGgqv`^INt&*2<}!>!
z4_(zH{!UXV+V6yj7a
zU3@@ES;l1)mmW+mgSd2MJ(w>wj6o%BZAk!k_WvBP;cRXB*x2`SzBU`{!=oo>)31fLc0kT!F8wY&8J5vJZfe
z%`2{px3pYGU?n`Ku&iuRKS)aat|}@kdxSWmHWV5uZ2K!bdz7O6M9X7YXXyZm#-x6b
zoE^erc|7x}>ruL^zobUsYA^Wdl4hw@9_X}80(zqX|OW}v2-9i~}e`h2>r
zX(PZp7cyhf%rsnVOOhg^D@R=;s{Ps&veXL@29D8yS05d@dSwy@OCjJ7e6X6$9@@Rnh3qREk&o
z{Uryz-e~~T!20SObfvDXtzS{^3n^s;de&pL-!+dmIs3qJw-)d0i+rjnGPg+k7IE?8Y?c|xgr$0fC#Em6^X0>eVvMzBP}sT;p4NG
z4yo%8IBCRJzZ?T_6nr$3a6Yj@(iq~~QYuMcnBxJzYFeK0s4
zU1JS+bT%OKvTWX5%m#ZiszCxq)(|FXOl&(PF|#MIdK8vz4n@j*CfuCc
zWz3S0M{yM&&2CC%LhMu08HkwO4ye@B`u#K3QkZN4cgZZ^qk3XC)##P
zD#$$#O(Nz%Uq*d!}Z
z*pEA_-Z0Kn8D4BzPlNuQisy!g?!4P>Yg??Ui$l2MKp&;zxux*}1uNiH^Hs*sm)C83
zCU_LzEz_`fL?17aF@q!5FXU@x16{)a=H_50NjTq??;=xC@&O7l)%!$IJju1wRAb
z>?Z~D0TgW-POS?D!;WBK*H~KCX!O&EA(Kfk`Ul3pN3hW_)+ygbZQ+RJO}ORdU>xnp
zP_CK%3qa=~bTdCZXd9j#%aY1U-=KK>GW7otz!(X^62wLVb$`V3_n>W)rulxltt)I^
zoR7TxCe%^pryLE)jM1J?pvZ*1FunpCmdfZkGaJ)OEeizB^yqp6Bu_~%?Mk9OFJ12l
zQ%=GT%15cTn~som^+>t_5_wX-KuXv}Kw(J9W5IuL1X!CfepI7-v9?8FkkavJ1DfIkuU5UwGe^?LjE3njL8Pz45wQrN0ifOn#HqbKG?+)6xc&5Q1m4$8DVO4B`U4K%wYI*F!1OKpy8zww
z``kkt;=(%p*2YHah7b0+*U#{UF%Ue7;5pF^HB8;lVtjZj!@7M*Y}LTQgP)`q#;kj|
zB&OnE@Ie6fC@8%-4R@LFU%H!EdpG~bl4y1Kn?s+ElhQ$v|*fD-*;@oLv
LXqvG$SoPRHVqv6Y
literal 0
HcmV?d00001
diff --git a/app/src/main/res/drawable/cursor.png b/app/src/main/res/drawable/cursor.png
new file mode 100644
index 0000000000000000000000000000000000000000..bed57617be33c459841d97ab2fb8143d33c95f92
GIT binary patch
literal 790
zcmV+x1L^#UP)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10;5Sp
zK~z|U#n?}XR#h0s@lQ3)XqK2lq7;dSD24`sLb%Gr78Qtuv#1Fa#9g}vbmPDX?j)kZ
zje@NbiaZ~kL&mh&zVEr!$f0@V%uDSCo0AXEcrjc6S#^Ua{<00Jm-g50AJ&UlHk$C?>F#k
z2EUFyrNJ-{2XH?N;CsAO5*)PwLmB)gKE{(J!O($TjAa1~V0B4w)H?i}!S6PLda5Lt
zu)TY5Ckx;_)|LcEt;E?3eosiq&XQnwLRkH+EP!9|dP#89a(tJ;AK(zWN`j-_$3IyB
z7qO`{7?uhzm=yjHNAPS(aMZi_GYjB%Y$*+f#WzqQz*J`UVt@-=u)^R`BH3gt2SIyxKh
zJbY?uvh1qyv&m$KIxeeHt%6r$xB@zXYwFwGBZ=KeBlwoV-MF1xAID(~CfB~I@%6mW
zpGUjCR=|G=bu?Yw4Qy}Ny^4R6xve$+x)Yl*)3ii&2Y*P&=2ZR3{AEc&$aFHX8&I8)
zmC)muUt!y&`77gK4ftiv4PoWkPRreG?5uGX^=5Lh=<$LPe*0v-uVHM)TvlGz0(B>Vw4T4J;ED(Wkj~$E|*^
zU0^t^IeY)efdAo31^!)FVe02h92c;$-N007_Qpcgqvq_kQyutLXy*IX7nLSG0t(Vl
UH=eIvFaQ7m07*qoM6N<$f~OpKiU0rr
literal 0
HcmV?d00001
diff --git a/app/src/main/res/drawable/figurs.png b/app/src/main/res/drawable/figurs.png
new file mode 100644
index 0000000000000000000000000000000000000000..3e4ecc45dc2653e2592bafe86a72defcd50f894d
GIT binary patch
literal 17860
zcmdU132YQq7@jvXEu~nrjfrxIpdg-Af}mp6?H)iQpb@A?pa*9ZVQWE4fJl{aiV;)-
zDA00vftV4@(UbuJnH@JvDI`YAo^bN8E*
zKu
zS?C92?=^BhWwO_MMoY3Z_)3Rk8i2frN7Mir#AifFau)2~eVF(x3%=6n%ttqW%K&V+
zJX5beD^s^jzba~k%@XT`H
zxhVc>26$BBAC>~Y{?0oy0Q?~{z{70rvxLDT3*X1-ED&Y+J+zq14DgV%08erUtlbAe
zNm`WLVWOrdu2htMW*H9?^|~Nxz01{IQq}qRqB-5n;i;;ePt2{Z_9q?qtz*Zgo~^5U
zl&k6jfTl677yd(HCq0IcG>%?WI>G1j5k0BKe1+XU(tqyU`_SuQJbIwcBYhRT8>1D@
zyTEweif^MK{3m!O7kRy}A`S$j3>sft<4sQIbpY`Klo=L9K|58(+!H*W;~FpW=b$Uk
zME?88IBN8!xE{2%f}%WETwQ&-d0HrA^R&3XuNyWjOZNL|T+_Z>zZY`;BX(m?6nniN
zMN({|-To7J`i7)0Mr+Rrp#?rWWX!J}I54GCW@fSA_b-GNmxfcU8LbX2^lUFxT}4K!
z8NJmjfTNK^0%K|jCHR?e@Ee^@Cydz(*pl8D)FS)~0o{|Ikcu7UGq@R?m^pin)=>+*k6QWnqn@I#ur6B6PAep7DlZAwke
zN{s8<3{U_w+oJmYPlZlH2Kh`$)&);iIW;4r2bX10m83r>?b=nRSLzm5#m!A+jDS&vKh70dTNT0DIVk&8-@*b`w$%a90J%^
zP*@HgIv)!LXxbm(<|=;wF;v83_-3>u?bOil9V%rB81;ak1<%rSMY$HOy{V&t6R2Rz
z!<9Pv-~s#wK@{oqBO2gA
zwJ~QK0Y8YIQc~peeG<%+L@y$BT^s^zY%6dB41b_om!xN94N6wvq`!>KfD5fN&;U%d
z$&FxK{U2jbPxW}{h&ZW(jB!5R3=J{%KY*+!3ccQ=BriK#>?sHr?gE%0Ki)D#D1W;d
zg(!?Ysa1j*@)99KMECDuMnPD|_clXLB4yB=-(ucxZ{b)3DecYMQTaqz=o6+CE{dm2
zk&{3nH0|v-qdZknmaWgt?Qe#xM9C0wYiWx~h2=@2_$}_tti&yfOH7g(S25!8oSZ#a
ze}8FGDJhUMgGmzY1KjY(>pLh-Dzv>~L^vQ+blIs8(9m8XVe(~RIIU=?tNW_bZofNB
zdQy-AmVRPY)giczG@H7-&l{GIF025#m0$lQW}4O0(nlNY1%#(_^)Hq!Tl!Hp&H=Xx^Rl7`_$
zdyIZ9@-Vg#j+A*VXiXnR3Wm#LNJAwI#tcH|>qh$qu$kw~Y%BN{-QEyYlnfXW`_Q68
zVC)K!<+M&Vj08R&Q)4acK{@#nb$CrriVJws5?zXu-wv04`=WWD0ZGp{-vzZWziVUT
zVfY7W)=5Z+8+c87vJ=G~Pr0NhH=>K{pUQCF7d%_BK=Ps|+@#5fR~&cnn&RWDt83x9
z&WAyCVjF!}qlb$z6WGxc4qyzgecfg=I?)X$A}U(Kz-!tR?b+kKQdI}Q9?+^%?HQ`&t^|
zaH9ffs2SE4@pMRt=Y>S{lsp`)B>!*h=qf6#*b0p0AttuMvA
z6nFxS`P{7KZa2$;hpQbXz?9HvIq-l@-WoGPt>wVO$9N3L^&BM8R!oiMz~^t73v4+e-MfO3KocDX
-
-
diff --git a/app/src/main/res/drawable/ic_home_black_24dp.xml b/app/src/main/res/drawable/ic_home_black_24dp.xml
deleted file mode 100644
index f8bb0b5..0000000
--- a/app/src/main/res/drawable/ic_home_black_24dp.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
diff --git a/app/src/main/res/drawable/ic_notifications_black_24dp.xml b/app/src/main/res/drawable/ic_notifications_black_24dp.xml
deleted file mode 100644
index 78b75c3..0000000
--- a/app/src/main/res/drawable/ic_notifications_black_24dp.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
diff --git a/app/src/main/res/drawable/line.png b/app/src/main/res/drawable/line.png
new file mode 100644
index 0000000000000000000000000000000000000000..fe2c04de836d49b5e0e145ee5485285f0e62ca85
GIT binary patch
literal 268
zcmeAS@N?(olHy`uVBq!ia0vp^9ze{+!3HG7Yb6wb6lZ})WHAE+-(e7DJf6QI1t=(4
z;u=vBoS#-wo>-L1P+nfHmzkGcoSayYs+V7sKKq@G6j0GjPZ!4!kIuK(HVPhc;BmQl
zw|C{CR|kC=j?NHq(mQ%IVHQJ_MYyBR#2IIH=CSSfx!G^xt&_F3+H-lw3&uAe=G&>v
ze^+O`nVms^;aTNACX40Ewk|J;El*tg)#1~;*vpGLEW9pFkiDek**tCj=14)oy$mj8
z9*1L8;%|zsRr)z?cmGYrwME|p)65t(ZW{7xrI~#!&vh0&a4O&rQ?!eXFx|X
Nc)I$ztaD0e0swTZW9I+>
literal 0
HcmV?d00001
diff --git a/app/src/main/res/drawable/maths.png b/app/src/main/res/drawable/maths.png
new file mode 100644
index 0000000000000000000000000000000000000000..dc386553fc9a01039114b8dae4c4fc6aff663227
GIT binary patch
literal 10278
zcmdT~U2IfE6rQ>F?rwM21*{1uv{^~nlu9W2UWBwhy>-C)u4dXU@!=
zduGnxoqOh`123c!n-h$&RNwyIgQ%avZ%<1U{~NN~ucC^d-v8wMMIGiW%A(jCx8s%Kmm}8pEHqHCSG|(Cb=Z3)?%VKuD
z-av~ri=45#I1X!aEf&+5WfhXGt%C+JSzB7#D-x{+w#wzzkhwJ0e^YJLOcbsg0sRkoDJm*jw{!oJIeD)3>q?VKC)%Y7zloo^*;%0$8pheRPv
zGWhCmy=(Bpu=TFN4}mfvx(bnbB8TtUDphOZQR+e?(dg6PkB&zEPv*^1X=l)SE~5}<
zphRyK3U3DuY6gxN4TT*gCN;`Unjxh%uIUEO$}{RFdTV^LrjdstC?SQHnx~)$pT}a`
zZqLnq7$jEEzkvxai+#}69f;W97jYh(+Pd{5tJMl#n`+PpM)(xrttrC)ZfK|^PAtND
zB5~>E$;k^M?%RAGYfDNb@_TN2`e(6M7U8?*DHO?_8#s%Pq$o_nq`aQ&sp>_pOgdxf
z^ZER4@d;qhq_2N$ynXZ2o4|?VMHsKmIzV3)aaOIC7TX?7TF*btX3KctB}-F1+NRb<
zJYJ@)muqHI*;`p03_2S9t)P^J98x6Z8HIInH2PCkj?0X}JYnlmRA-d*2v&l_vNV=t
zTics>ieJSZytmK%bM4xci1XlNd;73v+n2mH)wZT}7Z(=Z6LB7#>gdR`O64!FO|{MW
zGsWxI-w|;xj9r%oCAfUJob$cSdyua;T3Y^CldsqHi@BMZ)%to@nHnBIMMNmf6J053
z{(B`Ar3s!K1DX`9^_I2c>mx@hBI8cAni1O~Y*s2eK@SC8DZq8Fw0w|d?E-yV#M)R>
zYj*D-vXpEnSS`@i(VhqNK1At6$&4VI1hfb
zv-2>s?LWOX)ksU8y*)qwfrwj%<$fRc?ehmGC-1v%gx{yH90Ci1+`nJ+(IdxSA4m+O
z={Q$&K6>Q%j|bAzF+d6xZ2SX9Gz}S!XrIn&81j2}8>NcHO|#4I_w8D3n{4x~QmNbT
z_kj!aFbAxU)2V4JQGKZP`oOm0
z8>AeZr|oeZ^iHX6l5(f`qIw|5Jp^Ci`_X7cQ{9K(mu9<5O*Pr6EWDt4Ddd%K%oW>>o6(XCCr(3GY32pt
z(r6d4T#pdmfdWMtDWNDA6hc~RqS4pa6+yG;`XRyEjr~1A=yr1cW
z5Wof!j}a}PHQXg&L=zl$xLy!m8j<0Idvb!HQ{WYpJ3LO~6sJQ_aoh%v(q@%MVFkhv3`KdWaNI%3<7r>l)AK?llxxlw
z1Wnu5P(032x_6Br+|#O!l~{$KYWp5O*nU+csih_s>r*SU%~^+_>6?Q`aSsFy$2IUM
zZ9c#M#}!>&7$*2^LI@AwDx7!7HpKQ>;Wl6JKMc$F3=|dpu<^_p3?`47hT{mG6&2$K
zN=yA7QS?)fCkS7BA*v{T7|!}JhrSn7WH|(s{U8mGNpP4Ij2ZO-O*rucU>qt=B-&P=
zKi{8D-Y|r8CqGr!9uAKw5yc5!Sq^~Pnn)z69E44Pd5Qo)3jo9b{4NI>0o{>VRQpr^
z*!a0u@B)ugS#Dh$jo#ObF$_U3B-664wFTkrgeb=)TUn~L1wl>-0=NEDYnu$e$7d=#
zi|dk;N-2->H{O?52w6O6@=_hNbX{~LH0+{SmubR?+V3#dXknpGXR4Ip>#S`F@xH~o
z37I+**8+@qMBQ6@$Xj5|0XkMq}oB+Z0$yqxgXw&q9VCyu!9S|J1U?ZOp
z9J_SKdI%{?@8o5{2m#}6W=ESoTF%EC@m+bk$7~2pF6>kx60HicnJz^y#m&N%({KtU*o
z?SWpH5q=9Z!njAWU^j|-0l*b-bzO;g{Dd1ecp0$?&0o%`T|A}i7Tz14x2XD;s+z4I
E07GJ9T>t<8
literal 0
HcmV?d00001
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 5651199..490cc31 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -1,31 +1,42 @@
-
-
-
-
-
-
+ android:layout_height="match_parent"
+ tools:context=".MainActivity">
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.473"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="1.0"
+ app:menu="@menu/bottom_nav_menu">
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/bottom_sheet.xml b/app/src/main/res/layout/bottom_sheet.xml
index 9abd41c..132a061 100644
--- a/app/src/main/res/layout/bottom_sheet.xml
+++ b/app/src/main/res/layout/bottom_sheet.xml
@@ -1,46 +1,157 @@
-
-
-
-
-
-
-
-
-
-
-
-
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/camera_fragment.xml b/app/src/main/res/layout/camera_fragment.xml
new file mode 100644
index 0000000..c5f3635
--- /dev/null
+++ b/app/src/main/res/layout/camera_fragment.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/figurs_fragment.xml b/app/src/main/res/layout/figurs_fragment.xml
new file mode 100644
index 0000000..eddffc9
--- /dev/null
+++ b/app/src/main/res/layout/figurs_fragment.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_dashboard.xml b/app/src/main/res/layout/fragment_dashboard.xml
deleted file mode 100644
index 5c22d62..0000000
--- a/app/src/main/res/layout/fragment_dashboard.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml
deleted file mode 100644
index 38e7d2c..0000000
--- a/app/src/main/res/layout/fragment_home.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_notifications.xml b/app/src/main/res/layout/fragment_notifications.xml
deleted file mode 100644
index 7792eab..0000000
--- a/app/src/main/res/layout/fragment_notifications.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/maths_fragment.xml b/app/src/main/res/layout/maths_fragment.xml
new file mode 100644
index 0000000..9f8af92
--- /dev/null
+++ b/app/src/main/res/layout/maths_fragment.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/send_fragment.xml b/app/src/main/res/layout/send_fragment.xml
new file mode 100644
index 0000000..6a9db6b
--- /dev/null
+++ b/app/src/main/res/layout/send_fragment.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/bottom_nav_menu.xml b/app/src/main/res/menu/bottom_nav_menu.xml
index fb6d040..6c29499 100644
--- a/app/src/main/res/menu/bottom_nav_menu.xml
+++ b/app/src/main/res/menu/bottom_nav_menu.xml
@@ -1,19 +1,26 @@
-
\ No newline at end of file
diff --git a/app/src/main/res/menu/main.xml b/app/src/main/res/menu/main.xml
new file mode 100644
index 0000000..412d5f8
--- /dev/null
+++ b/app/src/main/res/menu/main.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/navigation/mobile_navigation.xml b/app/src/main/res/navigation/mobile_navigation.xml
index 24f1828..e52eec6 100644
--- a/app/src/main/res/navigation/mobile_navigation.xml
+++ b/app/src/main/res/navigation/mobile_navigation.xml
@@ -5,25 +5,39 @@
android:id="@+id/mobile_navigation"
app:startDestination="@+id/navigation_figurs" >
-
+ tools:layout="@layout/fragment_camera" />
+ tools:layout="@layout/fragment_maths" />
+ tools:layout="@layout/fragment_figurs" />
+ tools:layout="@layout/fragment_send" />
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..ee0dd0b
--- /dev/null
+++ b/app/src/main/res/values/dimens.xml
@@ -0,0 +1,9 @@
+
+
+
+ 16dp
+ 16dp
+ 8dp
+ 176dp
+ 16dp
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index be194f5..812ca4b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,5 +1,5 @@
- My Application
+ Geometry
Hello blank fragment
Basic
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
index a9c504c..97e746a 100644
--- a/app/src/main/res/values/themes.xml
+++ b/app/src/main/res/values/themes.xml
@@ -14,8 +14,6 @@
From 62db88e6c308e5878b8ddc17451be1d191cb23ff Mon Sep 17 00:00:00 2001
From: daniilmiagkov <59875675+daniilmiagkov@users.noreply.github.com>
Date: Mon, 1 Nov 2021 21:41:26 +0300
Subject: [PATCH 04/10] normal opetation of the bottom sheet
---
.idea/misc.xml | 20 +-
app/build.gradle | 1 -
app/src/main/AndroidManifest.xml | 3 +-
.../java/com/example/geometry/MainActivity.kt | 70 +-
.../main/java/com/example/geometry/bd.java | 20 +
.../ui/{figurs => figures}/FigursViewModel.kt | 2 +-
.../{figurs/figurs.kt => figures/figures.kt} | 8 +-
.../example/geometry/ui/gallery/gallery.kt | 6 +-
app/src/main/res/anim/alpha.xml | 10 +
.../drawable/{ocrujnost.png => circle.png} | Bin
.../res/drawable/{figurs.png => figures.png} | Bin
app/src/main/res/drawable/line.png | Bin 268 -> 762 bytes
.../res/drawable/line_above_bottom_sheet.png | Bin 0 -> 268 bytes
...hka_s_bukvoi.png => point_with_letter.png} | Bin
.../{mnogougolnic.png => polygon.png} | Bin
app/src/main/res/drawable/pryamaya.png | Bin 762 -> 0 bytes
.../drawable/{round.xml => round_main.xml} | 3 +-
app/src/main/res/drawable/round_shadow.xml | 17 +
.../res/drawable/{otrezok.png => segment.png} | Bin
app/src/main/res/drawable/selector.xml | 4 +
app/src/main/res/layout/activity_main.xml | 66 +-
app/src/main/res/layout/app_bar_main.xml | 26 -
.../main/res/layout/bottom_sheet_figures.xml | 819 ++++++++++++++++++
.../main/res/layout/bottom_sheet_figurs.xml | 297 -------
.../main/res/layout/bottom_sheet_maths.xml | 347 ++++++--
app/src/main/res/layout/content_main.xml | 30 -
...agment_figurs.xml => fragment_figures.xml} | 4 +-
...ment_gallery.xml => fragment_settings.xml} | 0
app/src/main/res/layout/nav_header_main.xml | 35 -
app/src/main/res/layout/sketches.xml | 38 -
.../main/res/menu/activity_main_drawer.xml | 18 -
app/src/main/res/menu/bottom_nav_menu.xml | 11 +-
app/src/main/res/menu/main.xml | 9 -
.../main/res/navigation/mobile_navigation.xml | 12 +-
app/src/main/res/values-night/themes.xml | 10 +-
app/src/main/res/values/colors.xml | 13 +-
app/src/main/res/values/dimens.xml | 1 +
app/src/main/res/values/strings.xml | 12 +-
app/src/main/res/values/themes.xml | 12 +-
build.gradle | 1 +
40 files changed, 1270 insertions(+), 655 deletions(-)
create mode 100644 app/src/main/java/com/example/geometry/bd.java
rename app/src/main/java/com/example/geometry/ui/{figurs => figures}/FigursViewModel.kt (74%)
rename app/src/main/java/com/example/geometry/ui/{figurs/figurs.kt => figures/figures.kt} (69%)
create mode 100644 app/src/main/res/anim/alpha.xml
rename app/src/main/res/drawable/{ocrujnost.png => circle.png} (100%)
rename app/src/main/res/drawable/{figurs.png => figures.png} (100%)
create mode 100644 app/src/main/res/drawable/line_above_bottom_sheet.png
rename app/src/main/res/drawable/{tochka_s_bukvoi.png => point_with_letter.png} (100%)
rename app/src/main/res/drawable/{mnogougolnic.png => polygon.png} (100%)
delete mode 100644 app/src/main/res/drawable/pryamaya.png
rename app/src/main/res/drawable/{round.xml => round_main.xml} (86%)
create mode 100644 app/src/main/res/drawable/round_shadow.xml
rename app/src/main/res/drawable/{otrezok.png => segment.png} (100%)
create mode 100644 app/src/main/res/drawable/selector.xml
delete mode 100644 app/src/main/res/layout/app_bar_main.xml
create mode 100644 app/src/main/res/layout/bottom_sheet_figures.xml
delete mode 100644 app/src/main/res/layout/bottom_sheet_figurs.xml
delete mode 100644 app/src/main/res/layout/content_main.xml
rename app/src/main/res/layout/{fragment_figurs.xml => fragment_figures.xml} (91%)
rename app/src/main/res/layout/{fragment_gallery.xml => fragment_settings.xml} (100%)
delete mode 100644 app/src/main/res/layout/nav_header_main.xml
delete mode 100644 app/src/main/res/layout/sketches.xml
delete mode 100644 app/src/main/res/menu/activity_main_drawer.xml
delete mode 100644 app/src/main/res/menu/main.xml
diff --git a/.idea/misc.xml b/.idea/misc.xml
index cc19b71..33df1dc 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,17 +3,33 @@
+
+
+
diff --git a/app/build.gradle b/app/build.gradle
index 5361aed..27897fc 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -36,7 +36,6 @@ android {
}
dependencies {
-
implementation 'com.google.android.material:material:'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 861a2ba..c9c14cd 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -12,8 +12,7 @@
+ android:label="@string/app_name">
diff --git a/app/src/main/java/com/example/geometry/MainActivity.kt b/app/src/main/java/com/example/geometry/MainActivity.kt
index f5d9892..b23b245 100644
--- a/app/src/main/java/com/example/geometry/MainActivity.kt
+++ b/app/src/main/java/com/example/geometry/MainActivity.kt
@@ -1,62 +1,38 @@
package com.example.geometry
-import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
-import androidx.drawerlayout.widget.DrawerLayout
-import androidx.navigation.NavController
-import androidx.navigation.findNavController
-import androidx.navigation.ui.AppBarConfiguration
-import androidx.navigation.ui.NavigationUI
-import androidx.navigation.ui.setupWithNavController
import com.google.android.material.bottomnavigation.BottomNavigationView
-import kotlinx.android.synthetic.main.activity_main.*
-import android.view.Menu
-import com.google.android.material.snackbar.Snackbar
-import com.google.android.material.navigation.NavigationView
+import androidx.appcompat.app.AppCompatActivity
import androidx.navigation.findNavController
-import androidx.navigation.ui.navigateUp
+import androidx.navigation.ui.AppBarConfiguration
import androidx.navigation.ui.setupActionBarWithNavController
import androidx.navigation.ui.setupWithNavController
import com.example.geometry.databinding.ActivityMainBinding
class MainActivity : AppCompatActivity() {
+
private lateinit var binding: ActivityMainBinding
- lateinit var bottomNav:BottomNavigationView
- lateinit var navController:NavController
- lateinit var drawerLayout: DrawerLayout
- private lateinit var appBarConfiguration: AppBarConfiguration
+
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
- setContentView(R.layout.activity_main)
- bottomNav = bottom_navigation
-
-
- navController = findNavController(R.id.hostFragment)
- setupBottomNavigation()
-
- drawerLayout = drawer_layout
- // For Navigation UP
- appBarConfiguration = AppBarConfiguration(navController.graph,drawerLayout)
- NavigationUI.setupActionBarWithNavController(this,navController,drawerLayout)
-
- //NavigationUI.setupWithNavController(navigation_view,navController)
- NavigationUI.setupWithNavController(navigation_view,navController)
-
- }
-
- override fun onSupportNavigateUp(): Boolean {
- //return navController.navigateUp()
- return NavigationUI.navigateUp(navController,appBarConfiguration)
-
- }
-
- override fun onCreateOptionsMenu(menu: Menu): Boolean {
- // Inflate the menu; this adds items to the action bar if it is present.
- menuInflater.inflate(R.menu.main, menu)
- return true
- }
- private fun setupBottomNavigation() {
- bottomNav.setupWithNavController(navController)
+ binding = ActivityMainBinding.inflate(layoutInflater)
+ setContentView(binding.root)
+
+ val navView: BottomNavigationView = binding.navView
+
+ val navController = findNavController(R.id.nav_host_fragment_activity_main)
+ // Passing each menu ID as a set of Ids because each
+ // menu should be considered as top level destinations.
+ val appBarConfiguration = AppBarConfiguration(
+ setOf(
+ R.id.navigation_figures,
+ R.id.navigation_maths,
+ R.id.navigation_send,
+ R.id.navigation_camera
+ )
+ )
+ setupActionBarWithNavController(navController, appBarConfiguration)
+ navView.setupWithNavController(navController)
}
-}
\ No newline at end of file
+}
diff --git a/app/src/main/java/com/example/geometry/bd.java b/app/src/main/java/com/example/geometry/bd.java
new file mode 100644
index 0000000..f256ce6
--- /dev/null
+++ b/app/src/main/java/com/example/geometry/bd.java
@@ -0,0 +1,20 @@
+/**package com.example.geometry;
+
+import android.view.View;
+
+import androidx.drawerlayout.widget.DrawerLayout;
+
+public class bd {
+ final DrawerLayout drawer = (DrawerLayout) getActivity().findViewById(R.id.drawer_layout);
+ btn.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ // TODO Auto-generated method stub
+ //Opens the Drawer
+ drawer.openDrawer(Your View, Usually a ListView);
+ }
+
+ return false;
+ });
+}*/
diff --git a/app/src/main/java/com/example/geometry/ui/figurs/FigursViewModel.kt b/app/src/main/java/com/example/geometry/ui/figures/FigursViewModel.kt
similarity index 74%
rename from app/src/main/java/com/example/geometry/ui/figurs/FigursViewModel.kt
rename to app/src/main/java/com/example/geometry/ui/figures/FigursViewModel.kt
index 55eb344..b0e087f 100644
--- a/app/src/main/java/com/example/geometry/ui/figurs/FigursViewModel.kt
+++ b/app/src/main/java/com/example/geometry/ui/figures/FigursViewModel.kt
@@ -1,4 +1,4 @@
-package com.example.geometry.ui.figurs
+package com.example.geometry.ui.figures
import androidx.lifecycle.ViewModel
diff --git a/app/src/main/java/com/example/geometry/ui/figurs/figurs.kt b/app/src/main/java/com/example/geometry/ui/figures/figures.kt
similarity index 69%
rename from app/src/main/java/com/example/geometry/ui/figurs/figurs.kt
rename to app/src/main/java/com/example/geometry/ui/figures/figures.kt
index 1bccdb4..06080d9 100644
--- a/app/src/main/java/com/example/geometry/ui/figurs/figurs.kt
+++ b/app/src/main/java/com/example/geometry/ui/figures/figures.kt
@@ -1,4 +1,4 @@
-package com.example.geometry.ui.figurs
+package com.example.geometry.ui.figures
import android.os.Bundle
import androidx.fragment.app.Fragment
@@ -7,10 +7,10 @@ import android.view.View
import android.view.ViewGroup
import com.example.geometry.R
-class figurs : Fragment() {
+class figures : Fragment() {
companion object {
- fun newInstance() = figurs()
+ fun newInstance() = figures()
}
private lateinit var viewModel: FigursViewModel
@@ -19,6 +19,6 @@ class figurs : Fragment() {
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
- return inflater.inflate(R.layout.fragment_figurs, container, false)
+ return inflater.inflate(R.layout.fragment_figures, container, false)
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/geometry/ui/gallery/gallery.kt b/app/src/main/java/com/example/geometry/ui/gallery/gallery.kt
index dad8ec5..49951b9 100644
--- a/app/src/main/java/com/example/geometry/ui/gallery/gallery.kt
+++ b/app/src/main/java/com/example/geometry/ui/gallery/gallery.kt
@@ -4,12 +4,8 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
-import android.widget.TextView
import androidx.fragment.app.Fragment
-import androidx.lifecycle.Observer
-import androidx.lifecycle.ViewModelProvider
import com.example.geometry.R
-import com.example.geometry.databinding.FragmentGalleryBinding
import com.example.geometry.ui.camera.CameraViewModel
class gallery: Fragment() {
@@ -26,6 +22,6 @@ import com.example.geometry.ui.camera.CameraViewModel
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
- return inflater.inflate(R.layout.fragment_gallery, container, false)
+ return inflater.inflate(R.layout.fragment_settings, container, false)
}
}
diff --git a/app/src/main/res/anim/alpha.xml b/app/src/main/res/anim/alpha.xml
new file mode 100644
index 0000000..09aac3e
--- /dev/null
+++ b/app/src/main/res/anim/alpha.xml
@@ -0,0 +1,10 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ocrujnost.png b/app/src/main/res/drawable/circle.png
similarity index 100%
rename from app/src/main/res/drawable/ocrujnost.png
rename to app/src/main/res/drawable/circle.png
diff --git a/app/src/main/res/drawable/figurs.png b/app/src/main/res/drawable/figures.png
similarity index 100%
rename from app/src/main/res/drawable/figurs.png
rename to app/src/main/res/drawable/figures.png
diff --git a/app/src/main/res/drawable/line.png b/app/src/main/res/drawable/line.png
index fe2c04de836d49b5e0e145ee5485285f0e62ca85..cda31bf91cd976da7694ebf2a8e1237844cc5dae 100644
GIT binary patch
delta 716
zcmV;-0yF)L0{R6ZiBL{Q4GJ0x0000DNk~Le0000q0000o2nGNE023kj_K_hxe*%X|
zL_t(&f!*3qs7z4+$MMg2c>eanqx>n!jKWMC(cWTIgSxArP^gYuKNATRANe{p&R@00B>;<
zI|pCu!|aPCn1uy+BPrf&?2aXvg>iVMb(rn31hdkkb(kvVHT!T8SA`WR=Phq`u!w=W
zQ_h>x>|hZCy-YdpRkMRd4D=|)oPJyyZjryi61>-XK{yyoFbm7@K~4I*f97FMVpJ5v
z46MXwHR(54h>bWcY;}$cp$pGid{Yba8uOzX!OS$QU44HgMk;knQ?&m4UJyYPH-
z_HPOf7fXfOXsFWS3syz5%g8)@GIW>$tdC~b1{bxim5xQT%Se~xe`E4c<6SJlMq2Hy
z=A@WIc;YO?gIX)u4=K;nFDwkvX%%R3%JbaD*PJfH&SvR;KUJ)bJYn81s+4GE))0I`v_$D{;-#D;egplGaRw
yzm?R7=~L30=@%dUA_p~7J$r?_e6LUpmYSb9Jp#+r1l0Qg0000-L1P+nfHmzkGcoSayYs+V7sKKq@G6j0GjPZ!4!kIuK(HVPhc;BmQl
zw|C{CR|kC=j?NHq(mQ%IVHQJ_MYyBR#2IIH=CSSfx!G^xt&_F3+H-lw3&uAe=G&>v
ze^+O`nVms^;aTNACX40Ewk|J;El*tg)#1~;*vpGLEW9pFkiDek**tCj=14)oy$mj8
z9*1L8;%|zsRr)z?cmGYrwME|p)65t(ZW{7xrI~#!&vh0&a4O&rQ?!eXFx|X
Nc)I$ztaD0e0swTZW9I+>
literal 0
HcmV?d00001
diff --git a/app/src/main/res/drawable/tochka_s_bukvoi.png b/app/src/main/res/drawable/point_with_letter.png
similarity index 100%
rename from app/src/main/res/drawable/tochka_s_bukvoi.png
rename to app/src/main/res/drawable/point_with_letter.png
diff --git a/app/src/main/res/drawable/mnogougolnic.png b/app/src/main/res/drawable/polygon.png
similarity index 100%
rename from app/src/main/res/drawable/mnogougolnic.png
rename to app/src/main/res/drawable/polygon.png
diff --git a/app/src/main/res/drawable/pryamaya.png b/app/src/main/res/drawable/pryamaya.png
deleted file mode 100644
index cda31bf91cd976da7694ebf2a8e1237844cc5dae..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 762
zcmVpF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10*6UN
zK~!jg-P%v6Oi=*G@y~d8{`SJ7{3*$fvXHDK3pQ3L6dN0_Bqa-WvQbi$=TEV+VnID5
ziVY=6DEX5GQX;Vu^6zpA!O)@ka_ncMf*ojLd1U(=!dbl?#BFgCJF
zZbsr1s)OTWT%CM$3Rk6CH;zO#%0Va2ONKd)5izCOWjwC>{mN8gN~NJ2`|$v8aT7ZS
zU+cr{izS$a1$ZMV-fZlSC76YAc&2rj?Xd*2(xY{lD&{r&a1mF96)EQ}Z+5VVfx1)9
zo6_uH5d*zUIqy}ogGCJVD8-z9TpDhXzrhl`*Lp!X7)vk<%kV)>`n%>~PGVFP!wjs%
zXEo_JScr`{Eo^m;3!w|oT6|Lr^BVJ`8s%VvzdI-#dnCi$KvztmcBu$A!}>7SFfpQ2+f;B^GR!3!OS$QU44HgMk;knQ?&m4UJyYPH-_HPOf
z7fXfOXsFWS3syz5%g8)@GIW>$tdC~b1{bxim5xQT%Se~xWAaerT`a*yTJ5doq?ki^
z;w;32S}WNPDbLd{EDX_U6=-qF^W4VQoG!!8X6b%ERjiKWn3^q;Vg6L0ABg0bn#P*x
z9;ON*9}gb;fjd|i$uTvJVQyn`!<-2i^N+nUQxU#8^
-
-
+
+
+
+
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/otrezok.png b/app/src/main/res/drawable/segment.png
similarity index 100%
rename from app/src/main/res/drawable/otrezok.png
rename to app/src/main/res/drawable/segment.png
diff --git a/app/src/main/res/drawable/selector.xml b/app/src/main/res/drawable/selector.xml
new file mode 100644
index 0000000..a8b409b
--- /dev/null
+++ b/app/src/main/res/drawable/selector.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index b516286..34e6f0a 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -1,48 +1,30 @@
-
+ android:paddingTop="?attr/actionBarSize">
-
+
-
+
+
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/app_bar_main.xml b/app/src/main/res/layout/app_bar_main.xml
deleted file mode 100644
index e013266..0000000
--- a/app/src/main/res/layout/app_bar_main.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/bottom_sheet_figures.xml b/app/src/main/res/layout/bottom_sheet_figures.xml
new file mode 100644
index 0000000..e2da2bc
--- /dev/null
+++ b/app/src/main/res/layout/bottom_sheet_figures.xml
@@ -0,0 +1,819 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/bottom_sheet_figurs.xml b/app/src/main/res/layout/bottom_sheet_figurs.xml
deleted file mode 100644
index 3a12033..0000000
--- a/app/src/main/res/layout/bottom_sheet_figurs.xml
+++ /dev/null
@@ -1,297 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/bottom_sheet_maths.xml b/app/src/main/res/layout/bottom_sheet_maths.xml
index 762b4d3..79e8575 100644
--- a/app/src/main/res/layout/bottom_sheet_maths.xml
+++ b/app/src/main/res/layout/bottom_sheet_maths.xml
@@ -1,71 +1,298 @@
-
+ app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
+ app:behavior_peekHeight="340dp">
+
-
+ android:layout_height="320dp"
+ android:orientation="vertical"
+ app:behavior_hideable="true"
+ app:behavior_peekHeight="320dp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent">
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/content_main.xml b/app/src/main/res/layout/content_main.xml
deleted file mode 100644
index 9bfebcf..0000000
--- a/app/src/main/res/layout/content_main.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_figurs.xml b/app/src/main/res/layout/fragment_figures.xml
similarity index 91%
rename from app/src/main/res/layout/fragment_figurs.xml
rename to app/src/main/res/layout/fragment_figures.xml
index 15278cd..c2eb9ed 100644
--- a/app/src/main/res/layout/fragment_figurs.xml
+++ b/app/src/main/res/layout/fragment_figures.xml
@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context=".ui.figurs.figurs">
+ tools:context=".ui.figures.figures">
@@ -23,7 +23,7 @@
+ layout="@layout/bottom_sheet_figures"/>
diff --git a/app/src/main/res/layout/fragment_gallery.xml b/app/src/main/res/layout/fragment_settings.xml
similarity index 100%
rename from app/src/main/res/layout/fragment_gallery.xml
rename to app/src/main/res/layout/fragment_settings.xml
diff --git a/app/src/main/res/layout/nav_header_main.xml b/app/src/main/res/layout/nav_header_main.xml
deleted file mode 100644
index c145545..0000000
--- a/app/src/main/res/layout/nav_header_main.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/sketches.xml b/app/src/main/res/layout/sketches.xml
deleted file mode 100644
index def43d6..0000000
--- a/app/src/main/res/layout/sketches.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/menu/activity_main_drawer.xml b/app/src/main/res/menu/activity_main_drawer.xml
deleted file mode 100644
index 122c813..0000000
--- a/app/src/main/res/menu/activity_main_drawer.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/menu/bottom_nav_menu.xml b/app/src/main/res/menu/bottom_nav_menu.xml
index c3ec8c4..b8cadd8 100644
--- a/app/src/main/res/menu/bottom_nav_menu.xml
+++ b/app/src/main/res/menu/bottom_nav_menu.xml
@@ -1,8 +1,7 @@
-
+
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/navigation/mobile_navigation.xml b/app/src/main/res/navigation/mobile_navigation.xml
index e52eec6..0464d0e 100644
--- a/app/src/main/res/navigation/mobile_navigation.xml
+++ b/app/src/main/res/navigation/mobile_navigation.xml
@@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/mobile_navigation"
- app:startDestination="@+id/navigation_figurs" >
+ app:startDestination="@+id/navigation_figures" >
+ android:id="@+id/navigation_figures"
+ android:name="com.example.geometry.ui.figures.figures"
+ android:label="figures_fragment"
+ tools:layout="@layout/fragment_figures" />
+ tools:layout="@layout/fragment_settings" />
-
+
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 8174e4d..14f5202 100644
--- a/build.gradle
+++ b/build.gradle
@@ -9,6 +9,7 @@ buildscript {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
+
}
}
From cf357158e6bd981c3e852433d520cc9da81bd655 Mon Sep 17 00:00:00 2001
From: daniilmiagkov <59875675+daniilmiagkov@users.noreply.github.com>
Date: Wed, 3 Nov 2021 21:20:01 +0300
Subject: [PATCH 05/10] sheet
---
.idea/misc.xml | 19 +-
app/build.gradle | 13 +-
.../java/com/example/geometry/MainActivity.kt | 17 +
.../main/java/com/example/geometry/bd.java | 20 -
.../example/geometry/ui/figures/figures.kt | 2 +
app/src/main/res/drawable/cursor.png | Bin 790 -> 0 bytes
app/src/main/res/drawable/cursor.xml | 10 +
app/src/main/res/drawable/selector.xml | 4 +
app/src/main/res/layout/activity_main.xml | 2 +
.../main/res/layout/bottom_sheet_figures.xml | 817 ++----------------
.../main/res/layout/bottom_sheet_maths.xml | 278 +-----
.../main/res/layout/constraint_maths_1.xml | 34 +
app/src/main/res/layout/fragment_figures.xml | 10 +-
app/src/main/res/layout/fragment_maths.xml | 8 +-
.../main/res/layout/table_row_figures_1.xml | 158 ++++
.../main/res/layout/table_row_figures_2.xml | 91 ++
.../main/res/layout/table_row_figures_3.xml | 162 ++++
app/src/main/res/values/dimens.xml | 2 +
18 files changed, 577 insertions(+), 1070 deletions(-)
delete mode 100644 app/src/main/java/com/example/geometry/bd.java
delete mode 100644 app/src/main/res/drawable/cursor.png
create mode 100644 app/src/main/res/drawable/cursor.xml
create mode 100644 app/src/main/res/layout/constraint_maths_1.xml
create mode 100644 app/src/main/res/layout/table_row_figures_1.xml
create mode 100644 app/src/main/res/layout/table_row_figures_2.xml
create mode 100644 app/src/main/res/layout/table_row_figures_3.xml
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 33df1dc..2171efd 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -4,6 +4,14 @@
+
diff --git a/.idea/render.experimental.xml b/.idea/render.experimental.xml
new file mode 100644
index 0000000..8ec256a
--- /dev/null
+++ b/.idea/render.experimental.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/geometry/BottomSheet.kt b/app/src/main/java/com/example/geometry/BottomSheet.kt
new file mode 100644
index 0000000..5228c5e
--- /dev/null
+++ b/app/src/main/java/com/example/geometry/BottomSheet.kt
@@ -0,0 +1,22 @@
+package com.example.geometry
+
+import android.os.Bundle
+import androidx.appcompat.app.AppCompatActivity
+import androidx.navigation.Navigation.findNavController
+import androidx.navigation.findNavController
+import androidx.navigation.ui.NavigationUI
+import androidx.navigation.ui.NavigationUI.setupWithNavController
+import androidx.navigation.ui.setupWithNavController
+import com.google.android.material.bottomnavigation.BottomNavigationView
+
+class BottomSheet : AppCompatActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.bottom_sheet
+ )
+ val navView = findViewById(R.id.bottom_navigation_view)
+ val navController = findNavController(R.id.navigation_host_fragment)
+
+ navView.setupWithNavController(navController)
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/geometry/MainActivity.kt b/app/src/main/java/com/example/geometry/MainActivity.kt
index 31b157a..c5c5656 100644
--- a/app/src/main/java/com/example/geometry/MainActivity.kt
+++ b/app/src/main/java/com/example/geometry/MainActivity.kt
@@ -6,8 +6,11 @@ import android.view.View
import android.widget.ImageButton
import android.widget.LinearLayout
import android.widget.TextView
+import androidx.annotation.NonNull
import com.google.android.material.bottomnavigation.BottomNavigationView
import androidx.appcompat.app.AppCompatActivity
+import androidx.constraintlayout.widget.ConstraintLayout
+import androidx.constraintlayout.widget.ConstraintSet
import androidx.core.widget.ImageViewCompat
import androidx.navigation.findNavController
import androidx.navigation.ui.AppBarConfiguration
@@ -15,6 +18,7 @@ import androidx.navigation.ui.setupActionBarWithNavController
import androidx.navigation.ui.setupWithNavController
import com.example.geometry.databinding.ActivityMainBinding
import com.google.android.material.bottomsheet.BottomSheetBehavior
+import androidx.coordinatorlayout.widget.CoordinatorLayout
class MainActivity : AppCompatActivity() {
@@ -25,14 +29,35 @@ class MainActivity : AppCompatActivity() {
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)
+
+ val llBottomSheet = findViewById(R.id.bottom_sheet)
+ val bottomSheetBehavior = BottomSheetBehavior.from(llBottomSheet)
+ bottomSheetBehavior.state = BottomSheetBehavior.STATE_EXPANDED
+ bottomSheetBehavior.isHideable = false
- val navView: BottomNavigationView = binding.navView
- val buttonCursor: ImageButton = findViewById(R.id.button_cursor)
- val textCursor: TextView = findViewById(R.id.text_cursor)
- val navController = findNavController(R.id.nav_host_fragment_activity_main)
+ val navView = findViewById(R.id.bottom_navigation_view)
+ val navController = findNavController(R.id.navigation_host_fragment)
+
+ navView.setupWithNavController(navController)
+
+
+
+
+
+
+
+
+ //val navView: BottomNavigationView = binding.navView
+
+
+ //val buttonCursor: ImageButton = findViewById(R.id.button_cursor)
+ //val textCursor: TextView = findViewById(R.id.text_cursor)
+
+
+ /**val navController = findNavController(R.id.nav_host_fragment_activity_main)
// Passing each menu ID as a set of Ids because each
- // menu should be considered as top level destinations.
+ // menu should be considered as top level destinations. /
val appBarConfiguration = AppBarConfiguration(
setOf(
R.id.navigation_figures,
@@ -40,16 +65,16 @@ class MainActivity : AppCompatActivity() {
R.id.navigation_send,
R.id.navigation_camera
)
- )
+ )*/
- setupActionBarWithNavController(navController, appBarConfiguration)
- navView.setupWithNavController(navController)
+ /**setupActionBarWithNavController(navController, appBarConfiguration)
+ navView.setupWithNavController(navController)*/
- buttonCursor.setOnClickListener {
- ImageViewCompat.setImageTintList(buttonCursor, ColorStateList.valueOf(
- resources.getColor(R.color.red)))
- textCursor.setTextColor(resources.getColor(R.color.red))
- }
+ //buttonCursor.setOnClickListener {
+ // ImageViewCompat.setImageTintList(buttonCursor, ColorStateList.valueOf(
+ // resources.getColor(R.color.red)))
+ // textCursor.setTextColor(resources.getColor(R.color.red))
+ //}
}
}
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 34e6f0a..0daa03e 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -1,30 +1,48 @@
-
+ android:id="@+id/container"
+ android:paddingTop="?attr/actionBarSize"
+ tools:context=".MainActivity"
+ android:background="@color/red"
+ android:fitsSystemWindows="true"
+ tools:openDrawer="start">
+
+
+
+
+
+
+
+
+
-
-
-
+
diff --git a/app/src/main/res/layout/app_bar_main.xml b/app/src/main/res/layout/app_bar_main.xml
new file mode 100644
index 0000000..e013266
--- /dev/null
+++ b/app/src/main/res/layout/app_bar_main.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/bottom_sheet.xml b/app/src/main/res/layout/bottom_sheet.xml
new file mode 100644
index 0000000..1c2d111
--- /dev/null
+++ b/app/src/main/res/layout/bottom_sheet.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/constraint_maths_1.xml b/app/src/main/res/layout/constraint_maths_1.xml
index aa0a55e..40ba952 100644
--- a/app/src/main/res/layout/constraint_maths_1.xml
+++ b/app/src/main/res/layout/constraint_maths_1.xml
@@ -1,7 +1,7 @@
diff --git a/app/src/main/res/layout/content_main.xml b/app/src/main/res/layout/content_main.xml
new file mode 100644
index 0000000..77d9ef6
--- /dev/null
+++ b/app/src/main/res/layout/content_main.xml
@@ -0,0 +1,6 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_figures.xml b/app/src/main/res/layout/fragment_figures.xml
index c2eb9ed..0debc76 100644
--- a/app/src/main/res/layout/fragment_figures.xml
+++ b/app/src/main/res/layout/fragment_figures.xml
@@ -6,28 +6,7 @@
android:layout_height="match_parent"
tools:context=".ui.figures.figures">
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_maths.xml b/app/src/main/res/layout/fragment_maths.xml
index 7af7681..c60a022 100644
--- a/app/src/main/res/layout/fragment_maths.xml
+++ b/app/src/main/res/layout/fragment_maths.xml
@@ -6,19 +6,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".ui.maths.maths">
-
-
-
-
-
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/nav_header_main.xml b/app/src/main/res/layout/nav_header_main.xml
new file mode 100644
index 0000000..c145545
--- /dev/null
+++ b/app/src/main/res/layout/nav_header_main.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/scetches.xml b/app/src/main/res/layout/scetches.xml
new file mode 100644
index 0000000..639d1ac
--- /dev/null
+++ b/app/src/main/res/layout/scetches.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/bottom_sheet_figures.xml b/app/src/main/res/layout/scroll_figures.xml
similarity index 83%
rename from app/src/main/res/layout/bottom_sheet_figures.xml
rename to app/src/main/res/layout/scroll_figures.xml
index 30a8e9e..7852f92 100644
--- a/app/src/main/res/layout/bottom_sheet_figures.xml
+++ b/app/src/main/res/layout/scroll_figures.xml
@@ -2,27 +2,14 @@
-
-
+ android:layout_height="@dimen/height_scroll_view"
+ android:background="@drawable/round_main">
-
-
+ android:layout_height="@dimen/height_scroll_view">
+ android:layout_marginBottom="@dimen/text_in_table_row" />
+ android:layout_marginBottom="@dimen/text_in_table_row"/>
+ android:layout_marginBottom="@dimen/text_in_table_row"/>
+ android:layout_marginBottom="@dimen/text_in_table_row" />
diff --git a/app/src/main/res/layout/table_row_figures_2.xml b/app/src/main/res/layout/table_row_figures_2.xml
index 7fc23e7..c39d753 100644
--- a/app/src/main/res/layout/table_row_figures_2.xml
+++ b/app/src/main/res/layout/table_row_figures_2.xml
@@ -13,9 +13,8 @@
android:layout_weight="1">
+ android:layout_marginBottom="@dimen/text_in_table_row"/>
@@ -53,7 +48,6 @@
+ android:layout_marginBottom="@dimen/text_in_table_row" />
diff --git a/app/src/main/res/menu/activity_main_drawer.xml b/app/src/main/res/menu/activity_main_drawer.xml
new file mode 100644
index 0000000..94af31f
--- /dev/null
+++ b/app/src/main/res/menu/activity_main_drawer.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/drawer_nav_menu.xml b/app/src/main/res/menu/drawer_nav_menu.xml
new file mode 100644
index 0000000..d1097d4
--- /dev/null
+++ b/app/src/main/res/menu/drawer_nav_menu.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/navigation/mobile_navigation.xml b/app/src/main/res/navigation/mobile_navigation.xml
index 0464d0e..5172aae 100644
--- a/app/src/main/res/navigation/mobile_navigation.xml
+++ b/app/src/main/res/navigation/mobile_navigation.xml
@@ -2,28 +2,28 @@
10sp
16dp
8dp
+ 4dp
+ 320dp
\ No newline at end of file
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
index 3560a7f..9dc4d1e 100644
--- a/app/src/main/res/values/themes.xml
+++ b/app/src/main/res/values/themes.xml
@@ -1,6 +1,6 @@
-
-
-
+
+
\ No newline at end of file
From 6d10b3405f3230f19bf65d9a0c1adeda8fb6dc92 Mon Sep 17 00:00:00 2001
From: daniilmiagkov <59875675+daniilmiagkov@users.noreply.github.com>
Date: Wed, 10 Nov 2021 22:56:52 +0300
Subject: [PATCH 08/10] button is working
---
.idea/misc.xml | 12 +-
.../main/java/com/example/geometry/Draw2D.kt | 68 ++++++++
.../java/com/example/geometry/MainActivity.kt | 152 +++++++++++-----
.../example/geometry/ui/figures/figures.kt | 2 -
app/src/main/res/drawable/camera.png | Bin 17970 -> 0 bytes
app/src/main/res/drawable/circle.png | Bin 1103 -> 0 bytes
app/src/main/res/drawable/cursor.xml | 10 --
app/src/main/res/drawable/drawer.png | Bin 487 -> 0 bytes
app/src/main/res/drawable/figures.png | Bin 17860 -> 0 bytes
app/src/main/res/drawable/ic_camera.xml | 14 ++
app/src/main/res/drawable/ic_circle.xml | 10 ++
app/src/main/res/drawable/ic_cursor.xml | 10 ++
app/src/main/res/drawable/ic_figures.xml | 10 ++
app/src/main/res/drawable/ic_line.xml | 10 ++
app/src/main/res/drawable/ic_maths.xml | 10 ++
app/src/main/res/drawable/ic_plus.xml | 10 ++
.../res/drawable/ic_point_with_letter.xml | 14 ++
app/src/main/res/drawable/ic_polygon.xml | 10 ++
app/src/main/res/drawable/ic_segment.xml | 10 ++
app/src/main/res/drawable/ic_send.xml | 10 ++
app/src/main/res/drawable/line.png | Bin 762 -> 0 bytes
app/src/main/res/drawable/maths.png | Bin 10278 -> 0 bytes
app/src/main/res/drawable/peremeshat.png | Bin 2081 -> 0 bytes
app/src/main/res/drawable/plus.png | Bin 429 -> 0 bytes
.../main/res/drawable/point_with_letter.png | Bin 817 -> 0 bytes
app/src/main/res/drawable/polygon.png | Bin 934 -> 0 bytes
app/src/main/res/drawable/round_shadow.xml | 10 +-
app/src/main/res/drawable/segment.png | Bin 539 -> 0 bytes
app/src/main/res/drawable/send.png | Bin 15798 -> 0 bytes
.../drawable/shape_gradient_top_shadow.xml | 13 ++
app/src/main/res/layout/activity_main.xml | 20 ++-
app/src/main/res/layout/bottom_sheet.xml | 13 +-
.../main/res/layout/constraint_maths_1.xml | 24 +--
.../main/res/layout/table_row_figures_1.xml | 75 ++++----
.../main/res/layout/table_row_figures_2.xml | 30 ++--
.../main/res/layout/table_row_figures_3.xml | 162 ------------------
app/src/main/res/menu/bottom_nav_menu.xml | 8 +-
app/src/main/res/menu/drawer_nav_menu.xml | 2 +-
app/src/main/res/values/colors.xml | 1 +
app/src/main/res/values/dimens.xml | 3 +
40 files changed, 428 insertions(+), 295 deletions(-)
create mode 100644 app/src/main/java/com/example/geometry/Draw2D.kt
delete mode 100644 app/src/main/res/drawable/camera.png
delete mode 100644 app/src/main/res/drawable/circle.png
delete mode 100644 app/src/main/res/drawable/cursor.xml
delete mode 100644 app/src/main/res/drawable/drawer.png
delete mode 100644 app/src/main/res/drawable/figures.png
create mode 100644 app/src/main/res/drawable/ic_camera.xml
create mode 100644 app/src/main/res/drawable/ic_circle.xml
create mode 100644 app/src/main/res/drawable/ic_cursor.xml
create mode 100644 app/src/main/res/drawable/ic_figures.xml
create mode 100644 app/src/main/res/drawable/ic_line.xml
create mode 100644 app/src/main/res/drawable/ic_maths.xml
create mode 100644 app/src/main/res/drawable/ic_plus.xml
create mode 100644 app/src/main/res/drawable/ic_point_with_letter.xml
create mode 100644 app/src/main/res/drawable/ic_polygon.xml
create mode 100644 app/src/main/res/drawable/ic_segment.xml
create mode 100644 app/src/main/res/drawable/ic_send.xml
delete mode 100644 app/src/main/res/drawable/line.png
delete mode 100644 app/src/main/res/drawable/maths.png
delete mode 100644 app/src/main/res/drawable/peremeshat.png
delete mode 100644 app/src/main/res/drawable/plus.png
delete mode 100644 app/src/main/res/drawable/point_with_letter.png
delete mode 100644 app/src/main/res/drawable/polygon.png
delete mode 100644 app/src/main/res/drawable/segment.png
delete mode 100644 app/src/main/res/drawable/send.png
create mode 100644 app/src/main/res/drawable/shape_gradient_top_shadow.xml
delete mode 100644 app/src/main/res/layout/table_row_figures_3.xml
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 5944ddf..641f7d6 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -11,23 +11,27 @@
+
+
+
+
-
+
-
+
@@ -43,8 +47,8 @@
-
-
+
+
diff --git a/app/src/main/java/com/example/geometry/Draw2D.kt b/app/src/main/java/com/example/geometry/Draw2D.kt
new file mode 100644
index 0000000..be19eec
--- /dev/null
+++ b/app/src/main/java/com/example/geometry/Draw2D.kt
@@ -0,0 +1,68 @@
+package com.example.geometry
+
+import android.content.Context
+import android.content.res.Resources
+import android.graphics.*
+import android.view.View
+import android.graphics.BitmapFactory
+
+class Draw2D(context: Context?) : View(context) {
+
+private val paint: Paint = Paint()
+private val rect: Rect = Rect()
+ val res: Resources = this.resources
+private var bitmap: Bitmap = BitmapFactory.decodeResource(res, R.drawable.ic_cursor)
+
+ override fun onDraw(canvas: Canvas?) {
+ super.onDraw(canvas)
+
+ paint.apply {
+ style = Paint.Style.FILL // стиль Заливка
+ color = Color.WHITE // закрашиваем холст белым цветом
+ }
+ canvas?.drawPaint(paint)
+
+ // Солнце
+ paint.apply {
+ isAntiAlias = true
+ color = Color.YELLOW
+ }
+ canvas?.drawCircle(width - 30F, 30F, 25F, paint)
+
+ // Лужайка
+ paint.color = Color.GREEN
+ canvas?.drawRect(0F, height - 30F, width.toFloat(), height.toFloat(), paint)
+
+ // Текст над лужайкой
+ paint.apply {
+ color = Color.BLUE
+ style = Paint.Style.FILL
+ isAntiAlias = true
+ textSize = 32F
+ }
+ canvas?.drawText("Лужайка только для котов", 30F, height - 32F, paint)
+
+ // Лучик солнца
+ val x = width - 170F
+ val y = 190F
+
+ paint.apply {
+ color = Color.GRAY
+ style = Paint.Style.FILL
+ textSize = 27F
+ }
+
+ val beam = "Лучик солнца!"
+
+ canvas?.save()
+ canvas?.rotate(-45F, x + rect.exactCenterX(), y + rect.exactCenterY())
+ canvas?.drawText(beam, x, y, paint)
+
+ canvas?.restore()
+
+ canvas?.drawBitmap(
+ bitmap, (width - bitmap.width).toFloat(), (height - bitmap.height
+ - 10).toFloat(), paint
+ )
+ }
+ }
\ No newline at end of file
diff --git a/app/src/main/java/com/example/geometry/MainActivity.kt b/app/src/main/java/com/example/geometry/MainActivity.kt
index c5c5656..3e1c552 100644
--- a/app/src/main/java/com/example/geometry/MainActivity.kt
+++ b/app/src/main/java/com/example/geometry/MainActivity.kt
@@ -1,80 +1,146 @@
package com.example.geometry
import android.content.res.ColorStateList
+import android.database.CrossProcessCursor
import android.os.Bundle
import android.view.View
import android.widget.ImageButton
-import android.widget.LinearLayout
import android.widget.TextView
-import androidx.annotation.NonNull
import com.google.android.material.bottomnavigation.BottomNavigationView
import androidx.appcompat.app.AppCompatActivity
-import androidx.constraintlayout.widget.ConstraintLayout
-import androidx.constraintlayout.widget.ConstraintSet
import androidx.core.widget.ImageViewCompat
import androidx.navigation.findNavController
-import androidx.navigation.ui.AppBarConfiguration
-import androidx.navigation.ui.setupActionBarWithNavController
import androidx.navigation.ui.setupWithNavController
import com.example.geometry.databinding.ActivityMainBinding
import com.google.android.material.bottomsheet.BottomSheetBehavior
import androidx.coordinatorlayout.widget.CoordinatorLayout
+import androidx.core.content.ContextCompat
+import androidx.core.widget.ImageViewCompat.setImageTintList
+import androidx.core.widget.TextViewCompat
-class MainActivity : AppCompatActivity() {
- private lateinit var binding: ActivityMainBinding
+class MainActivity() : AppCompatActivity(), View.OnClickListener {
+ private lateinit var binding: ActivityMainBinding
+ private lateinit var buttonCursor: ImageButton
+ private lateinit var buttonPointWithLetter: ImageButton
+ private lateinit var buttonSegment: ImageButton
+ private lateinit var buttonLine: ImageButton
+ private lateinit var textCursor: TextView
+ private lateinit var textPointWithLetter: TextView
+ private lateinit var textSegment: TextView
+ private lateinit var textLine: TextView
+ private lateinit var buttonPolygon: ImageButton
+ private lateinit var textPolygon: TextView
+ private lateinit var buttonCircle: ImageButton
+ private lateinit var textCircle: TextView
+ private lateinit var x: String
+
+
+
+ /**private fun update(x: Int){
+ ImageViewCompat.setImageTintList(
+ x, ColorStateList.valueOf(
+ resources.getColor(R.color.red)))
+ //textCursor.setTextColor(resources.getColor(R.color.red))
+ }*/
+
+ val listIndexes: MutableList = ArrayList()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)
-
+
val llBottomSheet = findViewById(R.id.bottom_sheet)
+
val bottomSheetBehavior = BottomSheetBehavior.from(llBottomSheet)
bottomSheetBehavior.state = BottomSheetBehavior.STATE_EXPANDED
bottomSheetBehavior.isHideable = false
-
val navView = findViewById(R.id.bottom_navigation_view)
val navController = findNavController(R.id.navigation_host_fragment)
-
navView.setupWithNavController(navController)
+ //cursor
+ buttonCursor = findViewById(R.id.button_cursor)
+ textCursor = findViewById(R.id.text_cursor)
+ //point with letter
+ buttonPointWithLetter = findViewById(R.id.button_point_with_letter)
+ textPointWithLetter = findViewById(R.id.text_point_with_letter)
+ //segment
+ buttonSegment = findViewById(R.id.button_segment)
+ textSegment = findViewById(R.id.text_segment)
+ //line
+ buttonLine = findViewById(R.id.button_line)
+ textLine = findViewById(R.id.text_line)
+ //polygon
+ buttonPolygon = findViewById(R.id.button_polygon)
+ textPolygon = findViewById(R.id.text_polygon)
+ //circle
+ buttonCircle = findViewById(R.id.button_circle)
+ textCircle = findViewById(R.id.text_circle)
+
+ buttonCursor.setOnClickListener(this)
+ buttonPointWithLetter.setOnClickListener(this)
+ buttonSegment.setOnClickListener(this)
+ buttonLine.setOnClickListener(this)
+ buttonPolygon.setOnClickListener(this)
+ buttonCircle.setOnClickListener(this)
+ }
-
-
-
-
- //val navView: BottomNavigationView = binding.navView
-
-
- //val buttonCursor: ImageButton = findViewById(R.id.button_cursor)
- //val textCursor: TextView = findViewById(R.id.text_cursor)
-
-
- /**val navController = findNavController(R.id.nav_host_fragment_activity_main)
- // Passing each menu ID as a set of Ids because each
- // menu should be considered as top level destinations. /
- val appBarConfiguration = AppBarConfiguration(
- setOf(
- R.id.navigation_figures,
- R.id.navigation_maths,
- R.id.navigation_send,
- R.id.navigation_camera
- )
- )*/
-
- /**setupActionBarWithNavController(navController, appBarConfiguration)
- navView.setupWithNavController(navController)*/
-
- //buttonCursor.setOnClickListener {
- // ImageViewCompat.setImageTintList(buttonCursor, ColorStateList.valueOf(
- // resources.getColor(R.color.red)))
- // textCursor.setTextColor(resources.getColor(R.color.red))
- //}
-
+ override fun onClick(v: View) {
+ val buttonIndex = listOf(buttonCursor,buttonPointWithLetter,buttonSegment,buttonLine,buttonPolygon,buttonCircle)
+ val textIndex = listOf(textCursor,textPointWithLetter,textSegment,textLine,textPolygon,textCircle)
+
+ for(x in buttonIndex){
+ ImageViewCompat.setImageTintList(
+ x, ColorStateList.valueOf(
+ resources.getColor(R.color.black)))}
+ for(x in textIndex){
+ x.setTextColor(resources.getColor(R.color.black))
+ }
+
+ when (v.id) {
+ R.id.button_cursor -> {
+ ImageViewCompat.setImageTintList(
+ buttonCursor, ColorStateList.valueOf(
+ resources.getColor(R.color.red)))
+ textCursor.setTextColor(resources.getColor(R.color.red))
+ }
+ R.id.button_point_with_letter -> {
+ ImageViewCompat.setImageTintList(
+ buttonPointWithLetter, ColorStateList.valueOf(
+ resources.getColor(R.color.red)))
+ textPointWithLetter.setTextColor(resources.getColor(R.color.red))
+ }
+ R.id.button_segment -> {
+ ImageViewCompat.setImageTintList(
+ buttonSegment, ColorStateList.valueOf(
+ resources.getColor(R.color.red)))
+ textSegment.setTextColor(resources.getColor(R.color.red))
+ }
+ R.id.button_line -> {
+ ImageViewCompat.setImageTintList(
+ buttonLine, ColorStateList.valueOf(
+ resources.getColor(R.color.red)))
+ textLine.setTextColor(resources.getColor(R.color.red))
+ }
+ R.id.button_polygon-> {
+ ImageViewCompat.setImageTintList(
+ buttonPolygon, ColorStateList.valueOf(
+ resources.getColor(R.color.red)))
+ textPolygon.setTextColor(resources.getColor(R.color.red))
+ }
+ R.id.button_circle -> {
+ ImageViewCompat.setImageTintList(
+ buttonCircle, ColorStateList.valueOf(
+ resources.getColor(R.color.red)))
+ textCircle.setTextColor(resources.getColor(R.color.red))
+ }
+ }
}
}
+
diff --git a/app/src/main/java/com/example/geometry/ui/figures/figures.kt b/app/src/main/java/com/example/geometry/ui/figures/figures.kt
index 6038920..06080d9 100644
--- a/app/src/main/java/com/example/geometry/ui/figures/figures.kt
+++ b/app/src/main/java/com/example/geometry/ui/figures/figures.kt
@@ -5,9 +5,7 @@ import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
-import android.widget.LinearLayout
import com.example.geometry.R
-import com.google.android.material.bottomsheet.BottomSheetBehavior
class figures : Fragment() {
diff --git a/app/src/main/res/drawable/camera.png b/app/src/main/res/drawable/camera.png
deleted file mode 100644
index 564cd84d4910a75620da14d0c7e2695f7982d4dc..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 17970
zcmeHP3v3is6rDG_?UvF?gYmEYl=y*wia~**yW3f?8i^n9heB6WG>RoitltEU8jSH1
zG%6~z#h?TtMDdfrwp$Twzz`z_KfzBx4T_>g%hGLU=6UYYHqd>upV_lQK|E<;==z1%RNua^CcNM_t)`}C%$@h#b?=<;{M*J{hgJ
z`cbX)@(;Y!ZsGBa2Uz>Kn%21#ksg5b25$cGgqv`^INt&*2<}!>!
z4_(zH{!UXV+V6yj7a
zU3@@ES;l1)mmW+mgSd2MJ(w>wj6o%BZAk!k_WvBP;cRXB*x2`SzBU`{!=oo>)31fLc0kT!F8wY&8J5vJZfe
z%`2{px3pYGU?n`Ku&iuRKS)aat|}@kdxSWmHWV5uZ2K!bdz7O6M9X7YXXyZm#-x6b
zoE^erc|7x}>ruL^zobUsYA^Wdl4hw@9_X}80(zqX|OW}v2-9i~}e`h2>r
zX(PZp7cyhf%rsnVOOhg^D@R=;s{Ps&veXL@29D8yS05d@dSwy@OCjJ7e6X6$9@@Rnh3qREk&o
z{Uryz-e~~T!20SObfvDXtzS{^3n^s;de&pL-!+dmIs3qJw-)d0i+rjnGPg+k7IE?8Y?c|xgr$0fC#Em6^X0>eVvMzBP}sT;p4NG
z4yo%8IBCRJzZ?T_6nr$3a6Yj@(iq~~QYuMcnBxJzYFeK0s4
zU1JS+bT%OKvTWX5%m#ZiszCxq)(|FXOl&(PF|#MIdK8vz4n@j*CfuCc
zWz3S0M{yM&&2CC%LhMu08HkwO4ye@B`u#K3QkZN4cgZZ^qk3XC)##P
zD#$$#O(Nz%Uq*d!}Z
z*pEA_-Z0Kn8D4BzPlNuQisy!g?!4P>Yg??Ui$l2MKp&;zxux*}1uNiH^Hs*sm)C83
zCU_LzEz_`fL?17aF@q!5FXU@x16{)a=H_50NjTq??;=xC@&O7l)%!$IJju1wRAb
z>?Z~D0TgW-POS?D!;WBK*H~KCX!O&EA(Kfk`Ul3pN3hW_)+ygbZQ+RJO}ORdU>xnp
zP_CK%3qa=~bTdCZXd9j#%aY1U-=KK>GW7otz!(X^62wLVb$`V3_n>W)rulxltt)I^
zoR7TxCe%^pryLE)jM1J?pvZ*1FunpCmdfZkGaJ)OEeizB^yqp6Bu_~%?Mk9OFJ12l
zQ%=GT%15cTn~som^+>t_5_wX-KuXv}Kw(J9W5IuL1X!CfepI7-v9?8FkkavJ1DfIkuU5UwGe^?LjE3njL8Pz45wQrN0ifOn#HqbKG?+)6xc&5Q1m4$8DVO4B`U4K%wYI*F!1OKpy8zww
z``kkt;=(%p*2YHah7b0+*U#{UF%Ue7;5pF^HB8;lVtjZj!@7M*Y}LTQgP)`q#;kj|
zB&OnE@Ie6fC@8%-4R@LFU%H!EdpG~bl4y1Kn?s+ElhQ$v|*fD-*;@oLv
LXqvG$SoPRHVqv6Y
diff --git a/app/src/main/res/drawable/circle.png b/app/src/main/res/drawable/circle.png
deleted file mode 100644
index 58ade2cec1af9fa52bd12fcb8c6d6af9806afa73..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 1103
zcmV-V1hD&wP)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H11KdeO
zK~!jg)!NN#T}2qj@lUQaVwJYE;ZM^OfZ?s=i1>`NGJqud2_Dlc4W{Eb7EB2x-u82Nyote{Q>>d_dySp@L`56;+9&G$LB-%XZb#}$>
zG;2k3=9;?IT&sV4Ar;;$%n&P;tAa+j0nevDCjP{%iu{6{42t9VR1!HL_PK8>kyVWE
zMBN)}f_s{9v=T|h_%apVR>Mdt;+vAiv_o3!NDcR;B2HO7{F(~iOYo%=AA7ZNSS{%w+w2OHFp)X|-{={$5{enQRqN6aR_AK5>QITz~&v6Rb(Ny&^G1=@PbN
zVY(*FT7=fM+E`m@+$r{=b2Y)vN_e1rJ%zbH6+Tb@(9JT1D9gO$k2$0pH?KS^|^KB~XFu%mokx!ECTg^$x821Qr*g5XZBRMz35
z=;|&w3HVg(b7Q4S%g4(W*|HiI``xs#^|I3F7f-$B@L;oq2gKGMDn(j8J`?rrZX-e4IuZo9dkK^{_$-D-i
z%QmJ8^W{m|MjR0ip>ok9YX;0Hcg*aP?M}yqHKY(dvPW?9!g{luQ**!U>@+X*j>3&d
z=$0Kb$vQKpvlhTQVXpb=p|c~Iyc=?%aM;o{jD!9D#7e{`bq{{a1x
VXg`NKw>AI(002ovPDHLkV1kL+8?gWY
diff --git a/app/src/main/res/drawable/cursor.xml b/app/src/main/res/drawable/cursor.xml
deleted file mode 100644
index ebe9440..0000000
--- a/app/src/main/res/drawable/cursor.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
diff --git a/app/src/main/res/drawable/drawer.png b/app/src/main/res/drawable/drawer.png
deleted file mode 100644
index 6f152afadfacedf919cbef0974979528b5bc5f38..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 487
zcmVpF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10dz@3
zK~!jg?bfkMoIw_9aB|RRaI3%`v17t-X3K42D7)3LC+!gN8qpE*WS&|1AxA7
zZuYdc_7&KP&1>DnpPoLwlGzE}8wao>vp*$VfM
zhS@3I8wb$C?9_1YN0$`i-Z!AjzwQUi?gzj!x}<<*c0aKFl4@(UbuJnH@JvDI`YAo^bN8E*
zKu
zS?C92?=^BhWwO_MMoY3Z_)3Rk8i2frN7Mir#AifFau)2~eVF(x3%=6n%ttqW%K&V+
zJX5beD^s^jzba~k%@XT`H
zxhVc>26$BBAC>~Y{?0oy0Q?~{z{70rvxLDT3*X1-ED&Y+J+zq14DgV%08erUtlbAe
zNm`WLVWOrdu2htMW*H9?^|~Nxz01{IQq}qRqB-5n;i;;ePt2{Z_9q?qtz*Zgo~^5U
zl&k6jfTl677yd(HCq0IcG>%?WI>G1j5k0BKe1+XU(tqyU`_SuQJbIwcBYhRT8>1D@
zyTEweif^MK{3m!O7kRy}A`S$j3>sft<4sQIbpY`Klo=L9K|58(+!H*W;~FpW=b$Uk
zME?88IBN8!xE{2%f}%WETwQ&-d0HrA^R&3XuNyWjOZNL|T+_Z>zZY`;BX(m?6nniN
zMN({|-To7J`i7)0Mr+Rrp#?rWWX!J}I54GCW@fSA_b-GNmxfcU8LbX2^lUFxT}4K!
z8NJmjfTNK^0%K|jCHR?e@Ee^@Cydz(*pl8D)FS)~0o{|Ikcu7UGq@R?m^pin)=>+*k6QWnqn@I#ur6B6PAep7DlZAwke
zN{s8<3{U_w+oJmYPlZlH2Kh`$)&);iIW;4r2bX10m83r>?b=nRSLzm5#m!A+jDS&vKh70dTNT0DIVk&8-@*b`w$%a90J%^
zP*@HgIv)!LXxbm(<|=;wF;v83_-3>u?bOil9V%rB81;ak1<%rSMY$HOy{V&t6R2Rz
z!<9Pv-~s#wK@{oqBO2gA
zwJ~QK0Y8YIQc~peeG<%+L@y$BT^s^zY%6dB41b_om!xN94N6wvq`!>KfD5fN&;U%d
z$&FxK{U2jbPxW}{h&ZW(jB!5R3=J{%KY*+!3ccQ=BriK#>?sHr?gE%0Ki)D#D1W;d
zg(!?Ysa1j*@)99KMECDuMnPD|_clXLB4yB=-(ucxZ{b)3DecYMQTaqz=o6+CE{dm2
zk&{3nH0|v-qdZknmaWgt?Qe#xM9C0wYiWx~h2=@2_$}_tti&yfOH7g(S25!8oSZ#a
ze}8FGDJhUMgGmzY1KjY(>pLh-Dzv>~L^vQ+blIs8(9m8XVe(~RIIU=?tNW_bZofNB
zdQy-AmVRPY)giczG@H7-&l{GIF025#m0$lQW}4O0(nlNY1%#(_^)Hq!Tl!Hp&H=Xx^Rl7`_$
zdyIZ9@-Vg#j+A*VXiXnR3Wm#LNJAwI#tcH|>qh$qu$kw~Y%BN{-QEyYlnfXW`_Q68
zVC)K!<+M&Vj08R&Q)4acK{@#nb$CrriVJws5?zXu-wv04`=WWD0ZGp{-vzZWziVUT
zVfY7W)=5Z+8+c87vJ=G~Pr0NhH=>K{pUQCF7d%_BK=Ps|+@#5fR~&cnn&RWDt83x9
z&WAyCVjF!}qlb$z6WGxc4qyzgecfg=I?)X$A}U(Kz-!tR?b+kKQdI}Q9?+^%?HQ`&t^|
zaH9ffs2SE4@pMRt=Y>S{lsp`)B>!*h=qf6#*b0p0AttuMvA
z6nFxS`P{7KZa2$;hpQbXz?9HvIq-l@-WoGPt>wVO$9N3L^&BM8R!oiMz~^t73v4+e-MfO3KocDX
+
+
+
diff --git a/app/src/main/res/drawable/ic_circle.xml b/app/src/main/res/drawable/ic_circle.xml
new file mode 100644
index 0000000..3e8a317
--- /dev/null
+++ b/app/src/main/res/drawable/ic_circle.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_cursor.xml b/app/src/main/res/drawable/ic_cursor.xml
new file mode 100644
index 0000000..4461e91
--- /dev/null
+++ b/app/src/main/res/drawable/ic_cursor.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_figures.xml b/app/src/main/res/drawable/ic_figures.xml
new file mode 100644
index 0000000..e0a870c
--- /dev/null
+++ b/app/src/main/res/drawable/ic_figures.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_line.xml b/app/src/main/res/drawable/ic_line.xml
new file mode 100644
index 0000000..1a3014f
--- /dev/null
+++ b/app/src/main/res/drawable/ic_line.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_maths.xml b/app/src/main/res/drawable/ic_maths.xml
new file mode 100644
index 0000000..1c85c73
--- /dev/null
+++ b/app/src/main/res/drawable/ic_maths.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_plus.xml b/app/src/main/res/drawable/ic_plus.xml
new file mode 100644
index 0000000..aa88be4
--- /dev/null
+++ b/app/src/main/res/drawable/ic_plus.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_point_with_letter.xml b/app/src/main/res/drawable/ic_point_with_letter.xml
new file mode 100644
index 0000000..7534671
--- /dev/null
+++ b/app/src/main/res/drawable/ic_point_with_letter.xml
@@ -0,0 +1,14 @@
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_polygon.xml b/app/src/main/res/drawable/ic_polygon.xml
new file mode 100644
index 0000000..bcc9aa8
--- /dev/null
+++ b/app/src/main/res/drawable/ic_polygon.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_segment.xml b/app/src/main/res/drawable/ic_segment.xml
new file mode 100644
index 0000000..347e271
--- /dev/null
+++ b/app/src/main/res/drawable/ic_segment.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_send.xml b/app/src/main/res/drawable/ic_send.xml
new file mode 100644
index 0000000..3bf9ad2
--- /dev/null
+++ b/app/src/main/res/drawable/ic_send.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/line.png b/app/src/main/res/drawable/line.png
deleted file mode 100644
index cda31bf91cd976da7694ebf2a8e1237844cc5dae..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 762
zcmVpF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10*6UN
zK~!jg-P%v6Oi=*G@y~d8{`SJ7{3*$fvXHDK3pQ3L6dN0_Bqa-WvQbi$=TEV+VnID5
ziVY=6DEX5GQX;Vu^6zpA!O)@ka_ncMf*ojLd1U(=!dbl?#BFgCJF
zZbsr1s)OTWT%CM$3Rk6CH;zO#%0Va2ONKd)5izCOWjwC>{mN8gN~NJ2`|$v8aT7ZS
zU+cr{izS$a1$ZMV-fZlSC76YAc&2rj?Xd*2(xY{lD&{r&a1mF96)EQ}Z+5VVfx1)9
zo6_uH5d*zUIqy}ogGCJVD8-z9TpDhXzrhl`*Lp!X7)vk<%kV)>`n%>~PGVFP!wjs%
zXEo_JScr`{Eo^m;3!w|oT6|Lr^BVJ`8s%VvzdI-#dnCi$KvztmcBu$A!}>7SFfpQ2+f;B^GR!3!OS$QU44HgMk;knQ?&m4UJyYPH-_HPOf
z7fXfOXsFWS3syz5%g8)@GIW>$tdC~b1{bxim5xQT%Se~xWAaerT`a*yTJ5doq?ki^
z;w;32S}WNPDbLd{EDX_U6=-qF^W4VQoG!!8X6b%ERjiKWn3^q;Vg6L0ABg0bn#P*x
z9;ON*9}gb;fjd|i$uTvJVQyn`!<-2i^N+nUQxU#8^F?rwM21*{1uv{^~nlu9W2UWBwhy>-C)u4dXU@!=
zduGnxoqOh`123c!n-h$&RNwyIgQ%avZ%<1U{~NN~ucC^d-v8wMMIGiW%A(jCx8s%Kmm}8pEHqHCSG|(Cb=Z3)?%VKuD
z-av~ri=45#I1X!aEf&+5WfhXGt%C+JSzB7#D-x{+w#wzzkhwJ0e^YJLOcbsg0sRkoDJm*jw{!oJIeD)3>q?VKC)%Y7zloo^*;%0$8pheRPv
zGWhCmy=(Bpu=TFN4}mfvx(bnbB8TtUDphOZQR+e?(dg6PkB&zEPv*^1X=l)SE~5}<
zphRyK3U3DuY6gxN4TT*gCN;`Unjxh%uIUEO$}{RFdTV^LrjdstC?SQHnx~)$pT}a`
zZqLnq7$jEEzkvxai+#}69f;W97jYh(+Pd{5tJMl#n`+PpM)(xrttrC)ZfK|^PAtND
zB5~>E$;k^M?%RAGYfDNb@_TN2`e(6M7U8?*DHO?_8#s%Pq$o_nq`aQ&sp>_pOgdxf
z^ZER4@d;qhq_2N$ynXZ2o4|?VMHsKmIzV3)aaOIC7TX?7TF*btX3KctB}-F1+NRb<
zJYJ@)muqHI*;`p03_2S9t)P^J98x6Z8HIInH2PCkj?0X}JYnlmRA-d*2v&l_vNV=t
zTics>ieJSZytmK%bM4xci1XlNd;73v+n2mH)wZT}7Z(=Z6LB7#>gdR`O64!FO|{MW
zGsWxI-w|;xj9r%oCAfUJob$cSdyua;T3Y^CldsqHi@BMZ)%to@nHnBIMMNmf6J053
z{(B`Ar3s!K1DX`9^_I2c>mx@hBI8cAni1O~Y*s2eK@SC8DZq8Fw0w|d?E-yV#M)R>
zYj*D-vXpEnSS`@i(VhqNK1At6$&4VI1hfb
zv-2>s?LWOX)ksU8y*)qwfrwj%<$fRc?ehmGC-1v%gx{yH90Ci1+`nJ+(IdxSA4m+O
z={Q$&K6>Q%j|bAzF+d6xZ2SX9Gz}S!XrIn&81j2}8>NcHO|#4I_w8D3n{4x~QmNbT
z_kj!aFbAxU)2V4JQGpF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H12d+s(
zK~#90?b~~>S5*}U@DE;~6jTf!R1`M~(X^<m*4LK!|ywD
z=Iq~DYwxwsKI^Q#9_I)ByK($l2OW$s4%pKZ=%9mL#ptB{XMAjk{eFb5)=#H{4w@rX
z+KpH>#D4v4m`ev83<(|gpo4u5qnoqr7A9jcUYWHw<8EAsKUMHg#HCsLOLzbaFb~he
zcKj7z7A{INbZ7Es;<;is`AsJOzM4K?z__e^H&zZoPCD;=?p5~(2jd*f#T0DAy|@u~
z)bv@3qwpv`TS1?P*JtgE(OaUw5Eo?an{j82oG!c-r{TpIFP_=hU-N#D6l*tQo5g
zKg4ZWdx3a1J8|x=43cL8e!2^N`ZUiToFg7cRn}n#K2_1DJK?z)_t*6A$2Az$K>kPY
zbWPtr_5S;Ygm1HWaLsU0Y5aLLd~-_UmyetAjEa6e8U3D`ahD}ybXU+{ozTy(8Dm;D
ze%;)58vMeX+kn6BNXNKI@jQl%c3IlL>Pi&hhW+*J|?FL(}
z!|}I_zFsI%in1l_(b%HTH`tn#E$uk0&1eq`TUo{p_-4iRUn;EVfjFZ?zerfW
z{|YO)twi6D@xUa!p+^3O>^xoJFIFK}g0h?x?-siYVMYH@qVK>$VdX{%%R7=7Eq1f-
z3Pmd8K}8HPLpScMYag@4xYtric8u$)y`-$2gw;sL|#+p@b$>QzVxfegF;aMlP-bQn37d|Qi!?!fxc{n?d60Slk
zF$yP?j+fQRX|+!~Raj5>dnUXNkBNx>MZ=KOE4IwzMUzCmB`NdW%?X#2ig6wF93B#1NPAKhR$+cAeV)YhssPb>Ya`AF4GBDtpEYd^pMfC-j
z@gmJdSkS76Q^p};7u-1n-d16P2#(Ln`mX6{6MkeOr!PLgS8?6A{Jsyi^tC~N3rdurN#Rd8H4#+cYnFhIz{AQ^8oA?
z^%;^BtF!Y-*%*5hju62Y;SSW{;0CmIVvHhBzK!6x%gniI+5xzf>sWP+qJaMV|6%MaJUFYW6|M*JO0ou9JDHs6-t(#Bp1J
zClr=!j_NpPmVud(c7L;y;!K6o<|)XQSH#AP@?<{lN=0Iw@SSc@U4iK~u(I?=1M|4k
zh4SR|+YH78Je2UP!1ELO@rp`JKi*vGpI5}nALPs}&8=LHJUyXReS7e21J`HnitJiy@mD4ETeG=M#LGpwyZjAFxnh@MI2Ez&
z6?1;A$QEqPc>X2H6t!AuiQH#iD$S2xMfo*9mY4cx-#Voor6@o58=Q!5rnH9`s2u&m-`!NYc89^cPfv-b6-W9##c`ri
zS;xCol;rDP^c2HU+GfWFrGiU4l$Nk~%f-hb=>&G-SE_HkJK{KP}<8&GL8{xuJT%~
z7M6E*a{a2B`=fPAy9Iy2=hPdgw&4Kb1HML-JRA9I-3BUcdi`Yaw(V*Ou}ioFr-(%L
z5xdyGU6?8qVV02#&c-U%cWDjJk=eXv<2fTVuYDTbs+G2b)*w~d3-|C`hK5~m!JbE&$FBR2++L54((Yf_Zsh;U({lVDY@nBqxa)@o00000
LNkvXXu0mjf72h2<
diff --git a/app/src/main/res/drawable/plus.png b/app/src/main/res/drawable/plus.png
deleted file mode 100644
index 2ded744b22a0fcc9376ef0ac90ac17b842a0b2f0..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 429
zcmeAS@N?(olHy`uVBq!ia0vp^8X(NU1|)m_?Z^dEoCO|{#S9F5he4R}c>anMprB-l
zYeY$Kep*R+Vo@qXd3m{BW?pu2a$-TMUVc&f>~}U&3=E7`o-U3d5v^}$Zq#E5lyEz5
zZndd`Qn12EYJEpyC*1UaG{dp_W`~Hw!3AKa$IL#&-?iNV9>mL?!HE;0O2)vufOJ>e)!?s
z>vMm8c1U~uc(&*LZCWmzEYH+)xDAhNWLoaV^<@&%-X#wDnissm%o7f-^YS@o%{UwO
zMTfaN`L=RF^jfd=QoU8u%?DR@30NI)Ji1|J(uI>he)#;K&QWHpG)H>biRiQoe_waW
zPuyj6!FBOQ%Sp4Ec6O~=!QXkXd%<x@mdKI;Vst0Qg3?RR910
diff --git a/app/src/main/res/drawable/point_with_letter.png b/app/src/main/res/drawable/point_with_letter.png
deleted file mode 100644
index a7b56f251124b7adffa0c47e529f010e1ec91345..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 817
zcmV-11J3-3P)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10=`K^
zK~z|U?U+kw6G0e&zotdSw-kzkkBZ_!y@&^uq6nU(U@PjeqVyu<(u;z4sd^Cv5fM@G
zD5VI3^dgFgAfi&xi_ePSLB;xr2aOf1sfS6rGk<22Niw^WgC7i}JOBRkWjmYsXCQrE
z0aKz~4dCI#X3Ax!fIKkIB|#=JH9LJV*JlH}(-d)G2Jn^Wsg7YjBOiRwjYfa=G
z&|-<{#uOe(OHR@yL{7%UwE>^BxL?46Gz29VF@@Jvh&?Z24<>FWkW2AsmG~`~!gmw3
zv#>`93^?4Q*B1q#GbuS6H?+YgfyEB@9LM~UM`eKRjrBo0@DVjFD1JWYa9<~CRV?um
zSnJg+hAj3%y`Hu)4dF)~h0p4Vlb8}~P>V&0@5NRND}dJG=g+`WR8^McCo07f2Q_2gF`@oKXUS+fbSEyVy6;NCDrr;Fr
z8s^*N7
veUI8?HWeMH1Gy(C`8@C#I1J1W=rzqhi5gO9WH33L00000NkvXXu0mjfZl7&y
diff --git a/app/src/main/res/drawable/polygon.png b/app/src/main/res/drawable/polygon.png
deleted file mode 100644
index bd0e7a9a71efa7c6087ca543a8a7856414fbdfae..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 934
zcmV;X16lluP)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H112aiP
zK~!jg-P%ovRb?E<@sHOVy;!DFn3!b=g+h^8G@u!Xpc|J1(xPRwi&jarXc5xZRkTc6
z87d_$N(l-DF$HO%E(FbJ%q$~P)EdpjGuOH2&bjA4XXd>2g|oW$T6L_&cY4L2AZlM3Vh$ZvuQW!xOUtrOQxCe!=TVr|I
z=)2LoPIYP$8NKyTh%MvmdHsMF{&&O?StVQV%R$-5%$g8*{
z+sKD?h)rVwKEQR!|MG4u#bSJlNl62j@n-dMXEG1txF9L;7{*fKmzmD+-{9VAWM=ac
zjz}8#1#bujhtV^#yKI4@ScXr8Ox!bY6T9$G#NXF$@pS$rjF;1A)>bZ5C{rA8JBP0vl!2L2VEjYsFWb|pqS!mrL?0{a%v6|_g`
zMqa~7Ndp%IV?|P$k;kVN?Qcb|37Pu7qBm25kq7XuP-^#=6?^bRQJbU?ZDhXCnT=zs
z^fq%F&Pjfajti5HvWYVCI)0WEcwNZ43$Pa74}3l$6mC`ZH6x9@C%aVsRkHg0M=-ds
zOw}o58X1$UeMVgev8Hs%>0}!DTzn@sUV+#wh8pPzIUt64__IJ!h0?*pIpXugR!T?s
zrHUm_Y^8MYWn}E6&=@tA$8g2};8zP?m2Kt+>3O8;XC^AMufWH`n7&v1eT~gipTB_b
zBn|#9G)h%X^>Y`EUBkIREs;r
zezJP@=L_1S_9@D(sm)t4MH%E7Gv``Yv}mq1$Yz`}bJDnV7Hc(n_WN{>b!s=#qxIAH
zLDmTenEiLBRp%r9^iHgPk~B2z#A>-|BZq|QqEU=GLtKK-%p8#XhPSGhJDL@O_+=}CZPyhe`07*qo
IM6N<$g2;ot00000
diff --git a/app/src/main/res/drawable/round_shadow.xml b/app/src/main/res/drawable/round_shadow.xml
index 02a3852..07efbdb 100644
--- a/app/src/main/res/drawable/round_shadow.xml
+++ b/app/src/main/res/drawable/round_shadow.xml
@@ -3,15 +3,15 @@
-
+ android:topLeftRadius="@dimen/radius_bottom_sheet"
+ android:topRightRadius="@dimen/radius_bottom_sheet" />
\ No newline at end of file
diff --git a/app/src/main/res/drawable/segment.png b/app/src/main/res/drawable/segment.png
deleted file mode 100644
index c0d4c15500122c9f2dc8805cf6c0f28e8f81eee6..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 539
zcmV+$0_6RPP)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10jNnt
zK~z|U&DgtYRY4R6;4kNxsFfxUpp_z4S_GfLhY%!%g|8qs;)NI#MI~Ysyb&Xc7rf;i
z1nWQq5fKXuIfa5Zj>RB2+a1ns&aC-ix>bBIux70xE`1!u8~nfkk1!i(0$Z?(Vaxf6
zxi}gNEvP1NUj%F#-$vkuxEFyt*a0@gr(OVVx?|n;2;94lb??Wj*dTqWZH&6sGZDBG
z9bg|YQyO-%f%x45Tf?5xuu~1hDt6Eo^(c3mZ~WjSm~1+YnJxBM4&O$D$iJeI?*O8qS~Q+OhWEvf|eR1P~|
z8nG3JrFO7_
diff --git a/app/src/main/res/drawable/send.png b/app/src/main/res/drawable/send.png
deleted file mode 100644
index eb2c60fee9fe27128067ceb133a0864f1015ac01..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 15798
zcmd^`duS6$7{F&XY1Onn3C2pIqHzBn{woC)S}Pg^6+OjMPP^1vj{_@O=>KZP`oOm0
z8>AeZr|oeZ^iHX6l5(f`qIw|5Jp^Ci`_X7cQ{9K(mu9<5O*Pr6EWDt4Ddd%K%oW>>o6(XCCr(3GY32pt
z(r6d4T#pdmfdWMtDWNDA6hc~RqS4pa6+yG;`XRyEjr~1A=yr1cW
z5Wof!j}a}PHQXg&L=zl$xLy!m8j<0Idvb!HQ{WYpJ3LO~6sJQ_aoh%v(q@%MVFkhv3`KdWaNI%3<7r>l)AK?llxxlw
z1Wnu5P(032x_6Br+|#O!l~{$KYWp5O*nU+csih_s>r*SU%~^+_>6?Q`aSsFy$2IUM
zZ9c#M#}!>&7$*2^LI@AwDx7!7HpKQ>;Wl6JKMc$F3=|dpu<^_p3?`47hT{mG6&2$K
zN=yA7QS?)fCkS7BA*v{T7|!}JhrSn7WH|(s{U8mGNpP4Ij2ZO-O*rucU>qt=B-&P=
zKi{8D-Y|r8CqGr!9uAKw5yc5!Sq^~Pnn)z69E44Pd5Qo)3jo9b{4NI>0o{>VRQpr^
z*!a0u@B)ugS#Dh$jo#ObF$_U3B-664wFTkrgeb=)TUn~L1wl>-0=NEDYnu$e$7d=#
zi|dk;N-2->H{O?52w6O6@=_hNbX{~LH0+{SmubR?+V3#dXknpGXR4Ip>#S`F@xH~o
z37I+**8+@qMBQ6@$Xj5|0XkMq}oB+Z0$yqxgXw&q9VCyu!9S|J1U?ZOp
z9J_SKdI%{?@8o5{2m#}6W=ESoTF%EC@m+bk$7~2pF6>kx60HicnJz^y#m&N%({KtU*o
z?SWpH5q=9Z!njAWU^j|-0l*b-bzO;g{Dd1ecp0$?&0o%`T|A}i7Tz14x2XD;s+z4I
E07GJ9T>t<8
diff --git a/app/src/main/res/drawable/shape_gradient_top_shadow.xml b/app/src/main/res/drawable/shape_gradient_top_shadow.xml
new file mode 100644
index 0000000..4423cff
--- /dev/null
+++ b/app/src/main/res/drawable/shape_gradient_top_shadow.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 0daa03e..6623d96 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -7,12 +7,13 @@
android:id="@+id/container"
android:paddingTop="?attr/actionBarSize"
tools:context=".MainActivity"
- android:background="@color/red"
+ android:background="@color/white"
android:fitsSystemWindows="true"
tools:openDrawer="start">
+
+ android:layout_height="match_parent"
+ android:layout_marginBottom="48dp"
+ app:layout_constraintBottom_toTopOf="@+id/bottom_navigation_view"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.0"
+ app:layout_constraintStart_toStartOf="parent">
+
+
diff --git a/app/src/main/res/layout/bottom_sheet.xml b/app/src/main/res/layout/bottom_sheet.xml
index 1c2d111..f1840d8 100644
--- a/app/src/main/res/layout/bottom_sheet.xml
+++ b/app/src/main/res/layout/bottom_sheet.xml
@@ -4,20 +4,21 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@drawable/round_main"
+
android:orientation="vertical">
+ android:layout_height="340dp"
+ android:background="@drawable/round_main">
+
+ app:tint="@color/red" />
diff --git a/app/src/main/res/layout/table_row_figures_1.xml b/app/src/main/res/layout/table_row_figures_1.xml
index c3831a6..1eba47b 100644
--- a/app/src/main/res/layout/table_row_figures_1.xml
+++ b/app/src/main/res/layout/table_row_figures_1.xml
@@ -14,20 +14,19 @@
+ app:tint="@color/black" />
+ app:tint="@color/black" />
+ app:tint="@color/black" />
+ app:layout_constraintTop_toTopOf="parent"
+ app:tint="@color/black" />
-
+
diff --git a/app/src/main/res/layout/table_row_figures_2.xml b/app/src/main/res/layout/table_row_figures_2.xml
index c39d753..1cb0ee9 100644
--- a/app/src/main/res/layout/table_row_figures_2.xml
+++ b/app/src/main/res/layout/table_row_figures_2.xml
@@ -13,18 +13,24 @@
android:layout_weight="1">
+ app:layout_constraintTop_toTopOf="parent"
+ app:tint="@color/black" />
+
+ app:tint="@color/black" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/src/main/res/menu/bottom_nav_menu.xml b/app/src/main/res/menu/bottom_nav_menu.xml
index b8cadd8..982c160 100644
--- a/app/src/main/res/menu/bottom_nav_menu.xml
+++ b/app/src/main/res/menu/bottom_nav_menu.xml
@@ -4,21 +4,21 @@
xmlns:tools="http://schemas.android.com/tools">
\ No newline at end of file
diff --git a/app/src/main/res/menu/drawer_nav_menu.xml b/app/src/main/res/menu/drawer_nav_menu.xml
index d1097d4..d1faae5 100644
--- a/app/src/main/res/menu/drawer_nav_menu.xml
+++ b/app/src/main/res/menu/drawer_nav_menu.xml
@@ -6,7 +6,7 @@
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 138a695..9174fb2 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -1,6 +1,7 @@
#C2C2C2
+ #EFEFEF
#A6A6A6
#202020
#ffa04343
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index 7d44ae8..c57b96c 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -11,4 +11,7 @@
8dp
4dp
320dp
+ 20dp
+ 14dp
+ 12dp
\ No newline at end of file
From 083cbe0d08f26ccf352d6318cca41d3c9cad761e Mon Sep 17 00:00:00 2001
From: daniilmiagkov <59875675+daniilmiagkov@users.noreply.github.com>
Date: Fri, 12 Nov 2021 23:52:07 +0300
Subject: [PATCH 09/10] cool work of buttons
---
.idea/misc.xml | 1 +
.../com/example/geometry/ButtonActivity.java | 2 +-
.../java/com/example/geometry/MainActivity.kt | 106 +-----------------
.../example/geometry/ui/figures/Figures.kt | 62 ++++++++++
...FigursViewModel.kt => FiguresViewModel.kt} | 2 +-
.../example/geometry/ui/figures/figures.kt | 24 ----
app/src/main/res/anim/alpha.xml | 4 +-
app/src/main/res/drawable/selector.xml | 30 ++++-
app/src/main/res/layout/fragment_figures.xml | 2 +-
.../main/res/navigation/mobile_navigation.xml | 2 +-
10 files changed, 96 insertions(+), 139 deletions(-)
create mode 100644 app/src/main/java/com/example/geometry/ui/figures/Figures.kt
rename app/src/main/java/com/example/geometry/ui/figures/{FigursViewModel.kt => FiguresViewModel.kt} (74%)
delete mode 100644 app/src/main/java/com/example/geometry/ui/figures/figures.kt
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 641f7d6..9874779 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -46,6 +46,7 @@
+
diff --git a/app/src/main/java/com/example/geometry/ButtonActivity.java b/app/src/main/java/com/example/geometry/ButtonActivity.java
index e9d4da8..b991449 100644
--- a/app/src/main/java/com/example/geometry/ButtonActivity.java
+++ b/app/src/main/java/com/example/geometry/ButtonActivity.java
@@ -3,5 +3,5 @@
import androidx.appcompat.app.AppCompatActivity;
public class ButtonActivity extends AppCompatActivity {
-
+
}
diff --git a/app/src/main/java/com/example/geometry/MainActivity.kt b/app/src/main/java/com/example/geometry/MainActivity.kt
index 3e1c552..1aa12c3 100644
--- a/app/src/main/java/com/example/geometry/MainActivity.kt
+++ b/app/src/main/java/com/example/geometry/MainActivity.kt
@@ -19,33 +19,10 @@ import androidx.core.widget.ImageViewCompat.setImageTintList
import androidx.core.widget.TextViewCompat
-class MainActivity() : AppCompatActivity(), View.OnClickListener {
+class MainActivity: AppCompatActivity() {
private lateinit var binding: ActivityMainBinding
- private lateinit var buttonCursor: ImageButton
- private lateinit var buttonPointWithLetter: ImageButton
- private lateinit var buttonSegment: ImageButton
- private lateinit var buttonLine: ImageButton
- private lateinit var textCursor: TextView
- private lateinit var textPointWithLetter: TextView
- private lateinit var textSegment: TextView
- private lateinit var textLine: TextView
- private lateinit var buttonPolygon: ImageButton
- private lateinit var textPolygon: TextView
- private lateinit var buttonCircle: ImageButton
- private lateinit var textCircle: TextView
- private lateinit var x: String
-
-
- /**private fun update(x: Int){
- ImageViewCompat.setImageTintList(
- x, ColorStateList.valueOf(
- resources.getColor(R.color.red)))
- //textCursor.setTextColor(resources.getColor(R.color.red))
- }*/
-
- val listIndexes: MutableList = ArrayList()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@@ -58,89 +35,10 @@ class MainActivity() : AppCompatActivity(), View.OnClickListener {
bottomSheetBehavior.state = BottomSheetBehavior.STATE_EXPANDED
bottomSheetBehavior.isHideable = false
+
val navView = findViewById(R.id.bottom_navigation_view)
val navController = findNavController(R.id.navigation_host_fragment)
navView.setupWithNavController(navController)
-
- //cursor
- buttonCursor = findViewById(R.id.button_cursor)
- textCursor = findViewById(R.id.text_cursor)
- //point with letter
- buttonPointWithLetter = findViewById(R.id.button_point_with_letter)
- textPointWithLetter = findViewById(R.id.text_point_with_letter)
- //segment
- buttonSegment = findViewById(R.id.button_segment)
- textSegment = findViewById(R.id.text_segment)
- //line
- buttonLine = findViewById(R.id.button_line)
- textLine = findViewById(R.id.text_line)
- //polygon
- buttonPolygon = findViewById(R.id.button_polygon)
- textPolygon = findViewById(R.id.text_polygon)
- //circle
- buttonCircle = findViewById(R.id.button_circle)
- textCircle = findViewById(R.id.text_circle)
-
- buttonCursor.setOnClickListener(this)
- buttonPointWithLetter.setOnClickListener(this)
- buttonSegment.setOnClickListener(this)
- buttonLine.setOnClickListener(this)
- buttonPolygon.setOnClickListener(this)
- buttonCircle.setOnClickListener(this)
-
-
- }
-
- override fun onClick(v: View) {
- val buttonIndex = listOf(buttonCursor,buttonPointWithLetter,buttonSegment,buttonLine,buttonPolygon,buttonCircle)
- val textIndex = listOf(textCursor,textPointWithLetter,textSegment,textLine,textPolygon,textCircle)
-
- for(x in buttonIndex){
- ImageViewCompat.setImageTintList(
- x, ColorStateList.valueOf(
- resources.getColor(R.color.black)))}
- for(x in textIndex){
- x.setTextColor(resources.getColor(R.color.black))
- }
-
- when (v.id) {
- R.id.button_cursor -> {
- ImageViewCompat.setImageTintList(
- buttonCursor, ColorStateList.valueOf(
- resources.getColor(R.color.red)))
- textCursor.setTextColor(resources.getColor(R.color.red))
- }
- R.id.button_point_with_letter -> {
- ImageViewCompat.setImageTintList(
- buttonPointWithLetter, ColorStateList.valueOf(
- resources.getColor(R.color.red)))
- textPointWithLetter.setTextColor(resources.getColor(R.color.red))
- }
- R.id.button_segment -> {
- ImageViewCompat.setImageTintList(
- buttonSegment, ColorStateList.valueOf(
- resources.getColor(R.color.red)))
- textSegment.setTextColor(resources.getColor(R.color.red))
- }
- R.id.button_line -> {
- ImageViewCompat.setImageTintList(
- buttonLine, ColorStateList.valueOf(
- resources.getColor(R.color.red)))
- textLine.setTextColor(resources.getColor(R.color.red))
- }
- R.id.button_polygon-> {
- ImageViewCompat.setImageTintList(
- buttonPolygon, ColorStateList.valueOf(
- resources.getColor(R.color.red)))
- textPolygon.setTextColor(resources.getColor(R.color.red))
- }
- R.id.button_circle -> {
- ImageViewCompat.setImageTintList(
- buttonCircle, ColorStateList.valueOf(
- resources.getColor(R.color.red)))
- textCircle.setTextColor(resources.getColor(R.color.red))
- }
- }
}
}
diff --git a/app/src/main/java/com/example/geometry/ui/figures/Figures.kt b/app/src/main/java/com/example/geometry/ui/figures/Figures.kt
new file mode 100644
index 0000000..74d21c6
--- /dev/null
+++ b/app/src/main/java/com/example/geometry/ui/figures/Figures.kt
@@ -0,0 +1,62 @@
+package com.example.geometry.ui.figures
+
+
+import android.content.res.ColorStateList
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.view.animation.AnimationUtils
+import android.widget.ImageButton
+import android.widget.TextView
+import androidx.core.widget.ImageViewCompat
+import androidx.fragment.app.Fragment
+import com.example.geometry.R
+
+
+class Figures : Fragment(), View.OnClickListener {
+
+ companion object {
+ fun newInstance() = Figures()
+ }
+
+ private val buttonHashMap: HashMap = linkedMapOf()
+
+ private lateinit var viewModel: FiguresViewModel
+
+ override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
+ super.onViewCreated(view, savedInstanceState)
+
+ buttonHashMap[view.findViewById(R.id.button_cursor)]=view.findViewById(R.id.text_cursor)
+ buttonHashMap[view.findViewById(R.id.button_point_with_letter)]=view.findViewById(R.id.text_point_with_letter)
+ buttonHashMap[view.findViewById(R.id.button_segment)]=view.findViewById(R.id.text_segment)
+ buttonHashMap[view.findViewById(R.id.button_line)]=view.findViewById(R.id.text_line)
+ buttonHashMap[view.findViewById(R.id.button_polygon)]=view.findViewById(R.id.text_polygon)
+ buttonHashMap[view.findViewById(R.id.button_circle)]=view.findViewById(R.id.text_circle)
+
+ buttonHashMap.forEach { (key) -> key.setOnClickListener(this) }
+ }
+ override fun onClick(v: View) {
+
+ buttonHashMap.forEach { (key, value) ->
+ ImageViewCompat.setImageTintList(
+ key, ColorStateList.valueOf(resources.getColor(R.color.black)))
+ value.setTextColor(resources.getColor(R.color.black))}
+
+ val animAlpha = AnimationUtils.loadAnimation(this.context, R.anim.alpha)
+ v.startAnimation(animAlpha)
+ buttonHashMap[v]?.startAnimation(animAlpha)
+ ImageViewCompat.setImageTintList(
+ v as ImageButton , ColorStateList.valueOf(
+ resources.getColor(R.color.red)))
+ buttonHashMap[v]?.setTextColor(resources.getColor(R.color.red))
+
+
+ }
+ override fun onCreateView(
+ inflater: LayoutInflater, container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View? {
+ return inflater.inflate(R.layout.fragment_figures, container, false)
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/geometry/ui/figures/FigursViewModel.kt b/app/src/main/java/com/example/geometry/ui/figures/FiguresViewModel.kt
similarity index 74%
rename from app/src/main/java/com/example/geometry/ui/figures/FigursViewModel.kt
rename to app/src/main/java/com/example/geometry/ui/figures/FiguresViewModel.kt
index b0e087f..a00d906 100644
--- a/app/src/main/java/com/example/geometry/ui/figures/FigursViewModel.kt
+++ b/app/src/main/java/com/example/geometry/ui/figures/FiguresViewModel.kt
@@ -2,6 +2,6 @@ package com.example.geometry.ui.figures
import androidx.lifecycle.ViewModel
-class FigursViewModel : ViewModel() {
+class FiguresViewModel : ViewModel() {
// TODO: Implement the ViewModel
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/geometry/ui/figures/figures.kt b/app/src/main/java/com/example/geometry/ui/figures/figures.kt
deleted file mode 100644
index 06080d9..0000000
--- a/app/src/main/java/com/example/geometry/ui/figures/figures.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.example.geometry.ui.figures
-
-import android.os.Bundle
-import androidx.fragment.app.Fragment
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import com.example.geometry.R
-
-class figures : Fragment() {
-
- companion object {
- fun newInstance() = figures()
- }
-
- private lateinit var viewModel: FigursViewModel
-
- override fun onCreateView(
- inflater: LayoutInflater, container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View? {
- return inflater.inflate(R.layout.fragment_figures, container, false)
- }
-}
\ No newline at end of file
diff --git a/app/src/main/res/anim/alpha.xml b/app/src/main/res/anim/alpha.xml
index 09aac3e..ab9d75f 100644
--- a/app/src/main/res/anim/alpha.xml
+++ b/app/src/main/res/anim/alpha.xml
@@ -3,8 +3,8 @@
android:interpolator="@android:anim/linear_interpolator">
\ No newline at end of file
diff --git a/app/src/main/res/drawable/selector.xml b/app/src/main/res/drawable/selector.xml
index b9a73cc..9025fe3 100644
--- a/app/src/main/res/drawable/selector.xml
+++ b/app/src/main/res/drawable/selector.xml
@@ -1,8 +1,28 @@
-
-
+ -
+
+
+
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_figures.xml b/app/src/main/res/layout/fragment_figures.xml
index 0debc76..64860e5 100644
--- a/app/src/main/res/layout/fragment_figures.xml
+++ b/app/src/main/res/layout/fragment_figures.xml
@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context=".ui.figures.figures">
+ tools:context=".ui.figures.Figures">
diff --git a/app/src/main/res/navigation/mobile_navigation.xml b/app/src/main/res/navigation/mobile_navigation.xml
index 5172aae..a8b4700 100644
--- a/app/src/main/res/navigation/mobile_navigation.xml
+++ b/app/src/main/res/navigation/mobile_navigation.xml
@@ -17,7 +17,7 @@
tools:layout="@layout/fragment_maths" />
Date: Sat, 13 Nov 2021 11:54:18 +0300
Subject: [PATCH 10/10] dp replace px
---
.idea/misc.xml | 6 ++---
.../example/geometry/ui/figures/Figures.kt | 20 ++++++++++------
app/src/main/res/anim/alpha.xml | 4 ++--
.../main/res/layout/table_row_figures_1.xml | 24 +++++++++----------
.../main/res/layout/table_row_figures_2.xml | 12 +++++-----
app/src/main/res/values/dimens.xml | 5 ++--
6 files changed, 39 insertions(+), 32 deletions(-)
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 9874779..1cb7932 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -35,7 +35,7 @@
-
+
@@ -48,8 +48,8 @@
-
-
+
+
diff --git a/app/src/main/java/com/example/geometry/ui/figures/Figures.kt b/app/src/main/java/com/example/geometry/ui/figures/Figures.kt
index 74d21c6..74d6b5c 100644
--- a/app/src/main/java/com/example/geometry/ui/figures/Figures.kt
+++ b/app/src/main/java/com/example/geometry/ui/figures/Figures.kt
@@ -1,9 +1,11 @@
package com.example.geometry.ui.figures
+import android.annotation.SuppressLint
import android.content.res.ColorStateList
import android.os.Bundle
import android.view.LayoutInflater
+import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
import android.view.animation.AnimationUtils
@@ -12,19 +14,22 @@ import android.widget.TextView
import androidx.core.widget.ImageViewCompat
import androidx.fragment.app.Fragment
import com.example.geometry.R
+import java.util.ArrayList
-class Figures : Fragment(), View.OnClickListener {
+class Figures : Fragment(), View.OnTouchListener {
companion object {
fun newInstance() = Figures()
}
private val buttonHashMap: HashMap = linkedMapOf()
-
+ private val buttonList = listOf("button_cursor","button_point_with_letter","button_segment","button_line","button_polygon","button_circle")
+ private val textList = listOf("text_cursor","text_point_with_letter","text_segment","text_line","text_polygon","text_circle")
private lateinit var viewModel: FiguresViewModel
- override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
+ @SuppressLint("ClickableViewAccessibility")
+ override fun onViewCreated(view: View , savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
buttonHashMap[view.findViewById(R.id.button_cursor)]=view.findViewById(R.id.text_cursor)
@@ -34,9 +39,10 @@ class Figures : Fragment(), View.OnClickListener {
buttonHashMap[view.findViewById(R.id.button_polygon)]=view.findViewById(R.id.text_polygon)
buttonHashMap[view.findViewById(R.id.button_circle)]=view.findViewById(R.id.text_circle)
- buttonHashMap.forEach { (key) -> key.setOnClickListener(this) }
+ buttonHashMap.forEach { (key) -> key.setOnTouchListener(this) }
}
- override fun onClick(v: View) {
+ @SuppressLint("ClickableViewAccessibility")
+ override fun onTouch(v: View , p1: MotionEvent?): Boolean {
buttonHashMap.forEach { (key, value) ->
ImageViewCompat.setImageTintList(
@@ -50,8 +56,7 @@ class Figures : Fragment(), View.OnClickListener {
v as ImageButton , ColorStateList.valueOf(
resources.getColor(R.color.red)))
buttonHashMap[v]?.setTextColor(resources.getColor(R.color.red))
-
-
+ return false
}
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
@@ -59,4 +64,5 @@ class Figures : Fragment(), View.OnClickListener {
): View? {
return inflater.inflate(R.layout.fragment_figures, container, false)
}
+
}
\ No newline at end of file
diff --git a/app/src/main/res/anim/alpha.xml b/app/src/main/res/anim/alpha.xml
index ab9d75f..a42fbac 100644
--- a/app/src/main/res/anim/alpha.xml
+++ b/app/src/main/res/anim/alpha.xml
@@ -3,8 +3,8 @@
android:interpolator="@android:anim/linear_interpolator">
\ No newline at end of file
diff --git a/app/src/main/res/layout/table_row_figures_1.xml b/app/src/main/res/layout/table_row_figures_1.xml
index 1eba47b..033c12d 100644
--- a/app/src/main/res/layout/table_row_figures_1.xml
+++ b/app/src/main/res/layout/table_row_figures_1.xml
@@ -9,13 +9,13 @@
android:layout_gravity="center">
4dp
320dp
20dp
- 14dp
- 12dp
+ 32dp
+ 30dp
+ 80dp
\ No newline at end of file