Skip to content

Commit

Permalink
- Add call support
Browse files Browse the repository at this point in the history
- Bug fix
  • Loading branch information
samanshah committed Jul 9, 2024
1 parent 2a09733 commit ce8397a
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 8 deletions.
2 changes: 1 addition & 1 deletion PishkhanHelper/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ afterEvaluate {
artifactId = 'pishkhanhelper'

// Version Library Name (Example : "1.0.0")
version = '0.3.4'
version = '0.3.5'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ abstract class HelperDrawerActivity : LocaleHelperActivity<HelperDrawerActivityB

open val onPrivacyPolicyMenuItemClicked: SimpleCallBack? = null
open val onTermsAndConditionsMenuItemClicked: SimpleCallBack? = null
open val onCallSupportMenuItemClicked: SimpleCallBack? = null

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Expand Down Expand Up @@ -277,6 +278,13 @@ abstract class HelperDrawerActivity : LocaleHelperActivity<HelperDrawerActivityB
}
}

callSupportRl.changeVisibility(show = onCallSupportMenuItemClicked.isNotNull())
callSupportRl.setOnClickListener {
onMenuItemClicked {
onCallSupportMenuItemClicked?.invoke()
}
}

appLanguageRl.changeVisibility(show = appInfo.flavor == "playstore")
appLanguageRl.setOnClickListener {
onMenuItemClicked {
Expand Down Expand Up @@ -379,6 +387,8 @@ abstract class HelperDrawerActivity : LocaleHelperActivity<HelperDrawerActivityB
pop()
} else {
if (showRatingBottomSheet) {
hideKeyboard()
waiterBottomSheet?.dismiss()
showRatingBottomSheet(applicationId = appInfo.applicationId, marketName = appInfo.flavor)
pop()
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package ir.ayantech.pishkhanhelper.fragment

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import ir.ayantech.pishkhanhelper.PishkhanHelper
import ir.ayantech.pishkhanhelper.adapter.TermsAndConditionsAdapter
Expand All @@ -14,9 +12,8 @@ import ir.ayantech.whygoogle.helper.verticalSetup

open class TermsAndConditionsFragment : WhyGoogleFragment<FragmentTermsAndConditionsBinding>() {

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)

override fun onCreate() {
super.onCreate()
PishkhanHelper.getConfigBusinessInfo(
onGetResult = { result ->
binding.termsAndConditionsRv.apply {
Expand Down
11 changes: 11 additions & 0 deletions PishkhanHelper/src/main/res/drawable/helper_ic_call_support.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M21.97,18.33C21.97,18.69 21.89,19.06 21.72,19.42C21.55,19.78 21.33,20.12 21.04,20.44C20.55,20.98 20.01,21.37 19.4,21.62C18.8,21.87 18.15,22 17.45,22C16.43,22 15.34,21.76 14.19,21.27C13.04,20.78 11.89,20.12 10.75,19.29C9.6,18.45 8.51,17.52 7.47,16.49C6.44,15.45 5.51,14.36 4.68,13.22C3.86,12.08 3.2,10.94 2.72,9.81C2.24,8.67 2,7.58 2,6.54C2,5.86 2.12,5.21 2.36,4.61C2.6,4 2.98,3.44 3.51,2.94C4.15,2.31 4.85,2 5.59,2C5.87,2 6.15,2.06 6.4,2.18C6.66,2.3 6.89,2.48 7.07,2.74L9.39,6.01C9.57,6.26 9.7,6.49 9.79,6.71C9.88,6.92 9.93,7.13 9.93,7.32C9.93,7.56 9.86,7.8 9.72,8.03C9.59,8.26 9.4,8.5 9.16,8.74L8.4,9.53C8.29,9.64 8.24,9.77 8.24,9.93C8.24,10.01 8.25,10.08 8.27,10.16C8.3,10.24 8.33,10.3 8.35,10.36C8.53,10.69 8.84,11.12 9.28,11.64C9.73,12.16 10.21,12.69 10.73,13.22C11.27,13.75 11.79,14.24 12.32,14.69C12.84,15.13 13.27,15.43 13.61,15.61C13.66,15.63 13.72,15.66 13.79,15.69C13.87,15.72 13.95,15.73 14.04,15.73C14.21,15.73 14.34,15.67 14.45,15.56L15.21,14.81C15.46,14.56 15.7,14.37 15.93,14.25C16.16,14.11 16.39,14.04 16.64,14.04C16.83,14.04 17.03,14.08 17.25,14.17C17.47,14.26 17.7,14.39 17.95,14.56L21.26,16.91C21.52,17.09 21.7,17.3 21.81,17.55C21.91,17.8 21.97,18.05 21.97,18.33Z"
android:strokeWidth="1.5"
android:fillColor="#00000000"
android:strokeColor="#424242"/>
</vector>
40 changes: 38 additions & 2 deletions PishkhanHelper/src/main/res/layout/helper_drawer_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/_8sdp"
android:layout_marginTop="@dimen/_8sdp"
android:layout_toEndOf="@id/termsAndConditionsTv"
android:layout_toEndOf="@id/termsAndConditionsIv"
android:drawablePadding="@dimen/_8sdp"
android:gravity="center_vertical"
android:text="@string/terms_and_conditions"
Expand All @@ -279,11 +279,47 @@
app:srcCompat="@drawable/helper_ic_terms_and_conditions" />
</RelativeLayout>

<RelativeLayout
android:id="@+id/callSupportRl"
android:layout_width="match_parent"
android:layout_height="@dimen/margin_48"
android:layout_below="@id/privacyPolicyRl"
android:layout_centerHorizontal="true"
android:layout_marginStart="@dimen/margin_16"
android:layout_marginTop="@dimen/margin_8"
android:layout_marginEnd="@dimen/margin_16"
android:visibility="gone"
tools:visibility="visible">

<TextView
android:id="@+id/callSupportTv"
android:layout_width="match_parent"
android:layout_height="@dimen/margin_48"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/_8sdp"
android:layout_marginTop="@dimen/_8sdp"
android:layout_toEndOf="@id/callSupportIv"
android:drawablePadding="@dimen/_8sdp"
android:gravity="center_vertical"
android:text="@string/terms_and_conditions"
android:textColor="@color/helper_text_black" />

<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/callSupportIv"
android:layout_width="@dimen/margin_32"
android:layout_height="@dimen/margin_32"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:background="@drawable/helper_background_radius_8"
android:padding="@dimen/margin_8"
app:srcCompat="@drawable/helper_ic_call_support" />
</RelativeLayout>

<RelativeLayout
android:id="@+id/appLanguageRl"
android:layout_width="match_parent"
android:layout_height="@dimen/margin_48"
android:layout_below="@id/termsAndConditionsRl"
android:layout_below="@id/callSupportRl"
android:layout_centerHorizontal="true"
android:layout_marginStart="@dimen/margin_16"
android:layout_marginTop="@dimen/margin_8"
Expand Down
1 change: 1 addition & 0 deletions PishkhanHelper/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<string name="share_app">اشتراک‌گذاری</string>
<string name="privacy_policy">حریم خصوصی</string>
<string name="terms_and_conditions">قوانین و مقررات</string>
<string name="callSupport">تماس با پشتیبانی</string>
<string name="choose_app_language">انتخاب زبان</string>
<string name="please_wait_for_response">در حال دریافت اطلاعات از سرور لطفا منتظر بمانید...</string>
<string name="retry">تلاش مجدد</string>
Expand Down

0 comments on commit ce8397a

Please sign in to comment.