diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml index 227144f2..762181f9 100644 --- a/.idea/deploymentTargetDropDown.xml +++ b/.idea/deploymentTargetDropDown.xml @@ -7,11 +7,11 @@ - + - + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 51839409..1194804b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,8 +12,8 @@ android { applicationId "com.starry.greenstash" minSdk 24 targetSdk 32 - versionCode 6 - versionName "1.5" + versionCode 7 + versionName "1.6" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" javaCompileOptions { diff --git a/app/src/main/java/com/starry/greenstash/ui/home/HomeFragment.kt b/app/src/main/java/com/starry/greenstash/ui/home/HomeFragment.kt index 01b96cdf..90ba8a43 100644 --- a/app/src/main/java/com/starry/greenstash/ui/home/HomeFragment.kt +++ b/app/src/main/java/com/starry/greenstash/ui/home/HomeFragment.kt @@ -74,7 +74,7 @@ class HomeFragment : Fragment(), ClickListenerIF { savedInstanceState: Bundle? ): View { setHasOptionsMenu(true) - sharedViewModel = ViewModelProvider(requireActivity()).get(SharedViewModel::class.java) + sharedViewModel = ViewModelProvider(requireActivity())[SharedViewModel::class.java] _binding = FragmentHomeBinding.inflate(inflater, container, false) return binding.root @@ -317,9 +317,8 @@ class HomeFragment : Fragment(), ClickListenerIF { requireContext().getString(R.string.item_not_found), Snackbar.LENGTH_SHORT ).show() - } else { - adapter.updateItemsList(filteredList) } + adapter.updateItemsList(filteredList) } diff --git a/app/src/main/java/com/starry/greenstash/ui/settings/AboutFragment.kt b/app/src/main/java/com/starry/greenstash/ui/settings/AboutFragment.kt index 4763672e..57bb6dcc 100644 --- a/app/src/main/java/com/starry/greenstash/ui/settings/AboutFragment.kt +++ b/app/src/main/java/com/starry/greenstash/ui/settings/AboutFragment.kt @@ -37,6 +37,12 @@ import com.starry.greenstash.databinding.FragmentAboutBinding class AboutFragment : Fragment() { + // social links + private val telegramURL = "https://t.me/starryboi" + private val githubURL = "https://github.com/starry69" + private val twitterURL = "https://twitter.com/starry_shivam" + + // layout binding. private lateinit var binding: FragmentAboutBinding override fun onCreateView( @@ -51,25 +57,13 @@ class AboutFragment : Fragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - binding.telegramButton.setOnClickListener { openTG() } - binding.githubButton.setOnClickListener { openGH() } - binding.twitterButton.setOnClickListener { openTW() } - } - - private fun openTG() { - val uri: Uri = Uri.parse("https://t.me/starryboi") - val intent = Intent(Intent.ACTION_VIEW, uri) - startActivity(intent) - } - - private fun openGH() { - val uri: Uri = Uri.parse("https://github.com/starry69") - val intent = Intent(Intent.ACTION_VIEW, uri) - startActivity(intent) + binding.telegramButton.setOnClickListener { startUrlActivity(telegramURL) } + binding.githubButton.setOnClickListener { startUrlActivity(githubURL) } + binding.twitterButton.setOnClickListener { startUrlActivity(twitterURL) } } - private fun openTW() { - val uri: Uri = Uri.parse("https://twitter.com/starry_shivam") + private fun startUrlActivity(url: String) { + val uri: Uri = Uri.parse(url) val intent = Intent(Intent.ACTION_VIEW, uri) startActivity(intent) } diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index 85c272c7..4488f45f 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -44,8 +44,8 @@ android:id="@+id/twitterButton" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="2dp" - android:backgroundTint="@android:color/transparent" + android:padding="12dp" + android:background="@drawable/round_image_button" android:src="@drawable/ic_icon_twitter_30" tools:ignore="ContentDescription" /> @@ -54,8 +54,8 @@ android:id="@+id/githubButton" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="2dp" - android:backgroundTint="@android:color/transparent" + android:padding="12dp" + android:background="@drawable/round_image_button" android:src="@drawable/ic_icon_github_30" tools:ignore="ContentDescription" /> @@ -63,8 +63,8 @@ android:id="@+id/telegramButton" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="2dp" - android:backgroundTint="@android:color/transparent" + android:padding="12dp" + android:background="@drawable/round_image_button" android:src="@drawable/ic_icon_telegram_30" tools:ignore="ContentDescription" /> @@ -81,7 +81,7 @@ android:layout_height="wrap_content" android:layout_gravity="center_horizontal|center_vertical|bottom" android:layout_marginBottom="10dp" - android:text="Version 1.5" + android:text="Version 1.6" android:textStyle="bold" tools:ignore="HardcodedText" /> @@ -92,7 +92,6 @@ android:layout_gravity="center_horizontal|center_vertical|bottom" android:layout_marginBottom="29dp" android:text="Copyright (c) 2022 Stɑrry Shivɑm " - android:textStyle="italic" tools:ignore="HardcodedText" /> diff --git a/app/src/main/res/layout/fragment_input.xml b/app/src/main/res/layout/fragment_input.xml index 54c051e2..d38d4364 100644 --- a/app/src/main/res/layout/fragment_input.xml +++ b/app/src/main/res/layout/fragment_input.xml @@ -94,7 +94,7 @@ SOFTWARE. --> app:startIconDrawable="@drawable/ic_baseline_tag_faces_24"> app:startIconDrawable="@drawable/ic_money_bag"> app:startIconDrawable="@drawable/ic_baseline_date_range_24">