Skip to content

Commit

Permalink
Code Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
karim-eg committed Aug 25, 2024
1 parent 04c614a commit 39116f5
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 23 deletions.
25 changes: 25 additions & 0 deletions app/src/main/java/co/encept/muqataa/Consts.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (c) 2024. Kotect Company, https://kotect.com
* Main Programmer: Karim Abdallah
* contact: [email protected]
*/

package co.encept.muqataa

object Consts {
const val KOTECT_NAME = "Kotect"
const val KOTECT_EMAIL = "[email protected]"
const val KARIM_EMAIL = "[email protected]"

const val PRIVACY_POLICY = "https://github.com/karim-eg/muqataa/blob/main/privacy-policy.md"
const val KOTECT_GOOGLE_PLAY = "https://play.google.com/store/apps/dev?id=6033125290854254520"

const val KOTECT_LINK = "https://kotect.com"
const val KOTECT_GITHUB = "https://github.com/kotect-ltd"
const val KOTECT_FACEBOOK = "https://www.facebook.com/kotect.ltd"
const val KOTECT_LINKEDIN = "https://www.linkedin.com/company/kotect"

const val KARIM_GITHUB = "https://github.com/karim-eg"
const val KARIM_FACEBOOK = "https://www.facebook.com/karim.abdallah.dev"
const val KARIM_LINKEDIN = "https://www.linkedin.com/in/karim-abdallah-dev"
}
32 changes: 17 additions & 15 deletions app/src/main/java/co/encept/muqataa/ui/AboutFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.browser.customtabs.CustomTabsIntent
import co.encept.muqataa.Consts
import co.encept.muqataa.R
import co.encept.muqataa.databinding.FragmentAboutBinding
import com.google.android.gms.ads.AdRequest

Expand All @@ -29,56 +31,56 @@ class AboutFragment : Fragment() {


imgKotWeb.setOnClickListener {
openBrowser("https://kotect.com", requireContext())
openBrowser(Consts.KOTECT_LINK, requireContext())
}

imgKotGithub.setOnClickListener {
openBrowser("https://github.com/kotect-ltd", requireContext())
openBrowser(Consts.KOTECT_GITHUB, requireContext())
}

imgKotFb.setOnClickListener {
openBrowser("https://www.facebook.com/kotect.ltd", requireContext())
openBrowser(Consts.KOTECT_FACEBOOK, requireContext())
}

imgKotLinkedin.setOnClickListener {
openBrowser("https://www.linkedin.com/company/kotect", requireContext())
openBrowser(Consts.KOTECT_LINKEDIN, requireContext())
}


imgKotEmail.setOnClickListener {
val intent = Intent(Intent.ACTION_SENDTO)
intent.data = Uri.parse("mailto:[email protected]")
intent.putExtra(Intent.EXTRA_SUBJECT, "Contact Kotect Company")
startActivity(Intent.createChooser(intent, "Send Email"))
intent.data = Uri.parse("mailto:${Consts.KOTECT_EMAIL}")
intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.contact_kotect_company))
startActivity(Intent.createChooser(intent, getString(R.string.send_email)))
}


imgGithub.setOnClickListener {
openBrowser("https://github.com/karim-eg", requireContext())
openBrowser(Consts.KARIM_GITHUB, requireContext())
}

imgFb.setOnClickListener {
openBrowser("https://www.facebook.com/karim.abdallah.dev", requireContext())
openBrowser(Consts.KARIM_FACEBOOK, requireContext())
}

imgLinkedin.setOnClickListener {
openBrowser("https://www.linkedin.com/in/karim-abdallah-dev", requireContext())
openBrowser(Consts.KARIM_LINKEDIN, requireContext())
}

imgEmail.setOnClickListener {
val intent = Intent(Intent.ACTION_SENDTO)
intent.data = Uri.parse("mailto:[email protected]")
intent.putExtra(Intent.EXTRA_SUBJECT, "Contact Muqataa Developer")
startActivity(Intent.createChooser(intent, "Send Email"))
intent.data = Uri.parse("mailto:${Consts.KARIM_EMAIL}")
intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.contact_muqataa_developer))
startActivity(Intent.createChooser(intent, getString(R.string.send_email)))
}


btnPrivacy.setOnClickListener {
openBrowser("https://github.com/karim-eg/muqataa/blob/main/privacy-policy.md", requireContext())
openBrowser(Consts.PRIVACY_POLICY, requireContext())
}

btnMoreApps.setOnClickListener {
openBrowser("https://play.google.com/store/apps/dev?id=6033125290854254520", requireContext())
openBrowser(Consts.KOTECT_GOOGLE_PLAY, requireContext())
}
}

Expand Down
16 changes: 10 additions & 6 deletions app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,27 @@
<string name="barcode_enter_info">اكتب رقم الباركود المكتوب على المنتج أسفل صورة الباركود.</string>

<string name="product_okay">لا مشكلة في استخدام هذا المنتج</string>
<string name="product_banned">مقاطعة!!, هذا المنتج مُدرج في القائمة السوداء يجب علينا مقاطعته</string>
<string name="product_banned">مقاطعة!!</string>
<string name="product_country">دولة غير معروفة</string>
<string name="product_unknown">لم يتم التعرف على المنتج!</string>

<string name="main_developer">المُطور الرئيسي</string>
<string name="karim_abdallah">كريم عبدالله</string>
<string name="developer_info">مبرمج تطبيقات أندرويد لدى شركة Encept\nومؤسس شركة Encept.</string>
<string name="karim_abdallah">كريم عبد الله</string>
<string name="developer_info">مبرمج تطبيقات أندرويد ومؤسس شركة كوتكت</string>

<string name="kotect_company">شركة كوتيكت</string>
<string name="kotect_info">Established in 2021, Kotect is an Egyptian software company specializing in IT services. They assist businesses with their technological needs, likely offering solutions like software development, web design, or IT consulting.</string>
<string name="kotect_company">شركة كوتكت</string>
<string name="kotect_info">تم تأسيس شركة كوتكت في عام 2021، وهي شركة برمجيات متخصصة في خدمات تكنولوجيا المعلومات. وتقدم حلولًا مثل تطوير البرمجيات وتصميم تطبيقات الأندرويد أو الاستشارات في مجال تكنولوجيا المعلومات.</string>


<string name="close">إغلاق</string>
<string name="coming_soon">سيكون جاهز قريبًا</string>

<string name="developed_by_txt">تم التطوير بواسطة</string>

<string name="send_email">إرسال البريد</string>
<string name="contact_kotect_company">تواصل مع كوتكت</string>
<string name="contact_muqataa_developer">تواصل مع المُطَور</string>


<!-- Countries -->
<string name="country_algeria">الجزائر</string>
Expand Down Expand Up @@ -154,4 +158,4 @@
<string name="country_pakistan">باكستان</string>
<string name="country_indonesia">إندونيسيا</string>
<string name="country_malaysia">ماليزيا</string>
</resources>
</resources>
9 changes: 7 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<string name="barcode_enter_info">Enter the barcode number that written on the product below the barcode.</string>

<string name="product_okay">It\'s Okay To Use This Product</string>
<string name="product_banned">Muqataa!!, This Product Is Listed at Blacklist You Have To Boycott It</string>
<string name="product_banned">Boycott!!</string>
<string name="product_country">Unknown Country</string>
<string name="product_unknown">Unknown Product</string>

Expand All @@ -33,13 +33,18 @@
<string name="developer_info">Android Developer Using Kotlin Native, Jetpack Compose &amp; Java, where I use my skills in PHP, SQL, Kotlin and Java to design, develop, and maintain the backend and frontend of my applications.</string>

<string name="kotect_company">Kotect Company</string>
<string name="kotect_info">Established in 2021, Kotect is an Egyptian software company specializing in IT services. They assist businesses with their technological needs, likely offering solutions like software development, web design, or IT consulting.</string>
<string name="kotect_info">Established in 2021, Kotect is an Egyptian software company specializing in IT services. They assist businesses with their technological needs, likely offering solutions like software development, Android Development, or IT consulting.</string>

<string name="close">Close</string>
<string name="coming_soon">Coming Soon</string>

<string name="developed_by_txt">Developed By</string>

<string name="send_email">Send Email</string>
<string name="contact_kotect_company">Contact Kotect Company</string>
<string name="contact_muqataa_developer">Contact Muqataa Developer</string>


<!-- Countries -->
<string name="country_algeria">Algeria</string>
<string name="country_argentina">Argentina</string>
Expand Down

0 comments on commit 39116f5

Please sign in to comment.