Update: 2026-05-16 02:14:53
This commit is contained in:
@@ -19,7 +19,7 @@ class SubscriptionActivity : AppCompatActivity() {
|
||||
|
||||
private lateinit var tvStatus: TextView
|
||||
private lateinit var btnPro: Button
|
||||
private lateinit var btnAnnual: Button
|
||||
private lateinit var btnBasic: Button
|
||||
|
||||
// Payment Overlay UI
|
||||
private lateinit var layoutOverlay: LinearLayout
|
||||
@@ -35,8 +35,8 @@ class SubscriptionActivity : AppCompatActivity() {
|
||||
setContentView(R.layout.activity_subscription)
|
||||
|
||||
tvStatus = findViewById(R.id.tv_current_status)
|
||||
btnBasic = findViewById(R.id.btn_subscribe_basic)
|
||||
btnPro = findViewById(R.id.btn_subscribe_pro)
|
||||
btnAnnual = findViewById(R.id.btn_subscribe_annual)
|
||||
|
||||
layoutOverlay = findViewById(R.id.layout_payment_overlay)
|
||||
tvRefCode = findViewById(R.id.tv_ref_code)
|
||||
@@ -45,8 +45,8 @@ class SubscriptionActivity : AppCompatActivity() {
|
||||
|
||||
updateStatusUI()
|
||||
|
||||
btnPro.setOnClickListener { startPaymentFlow("pro", 10.0) }
|
||||
btnAnnual.setOnClickListener { startPaymentFlow("annual", 80.0) }
|
||||
btnBasic.setOnClickListener { startPaymentFlow("basic", 10.0) }
|
||||
btnPro.setOnClickListener { startPaymentFlow("pro", 17.0) }
|
||||
|
||||
btnCancel.setOnClickListener {
|
||||
stopPaymentFlow()
|
||||
@@ -59,9 +59,9 @@ class SubscriptionActivity : AppCompatActivity() {
|
||||
val today = SubscriptionManager.ridesToday
|
||||
|
||||
val planText = when(plan) {
|
||||
"pro" -> "احترافي (لا محدود)"
|
||||
"annual" -> "سنوي (لا محدود)"
|
||||
else -> "مجاني (1 طلب / يوم)"
|
||||
"basic" -> "أساسي (3 تطبيقات)"
|
||||
"pro" -> "احترافي (5 تطبيقات)"
|
||||
else -> "مجاني (تطبيق واحد)"
|
||||
}
|
||||
|
||||
tvStatus.text = "الخطة الحالية: $planText\nاستهلاك اليوم: $today / $limit"
|
||||
|
||||
@@ -46,12 +46,11 @@
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- Pro Plan -->
|
||||
<!-- Free Plan -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_card"
|
||||
android:elevation="4dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
@@ -59,7 +58,7 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="الخطة الاحترافية"
|
||||
android:text="الخطة المجانية"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold" />
|
||||
@@ -67,7 +66,41 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="10.00 JOD / شهر"
|
||||
android:text="0.00 JOD / مدى الحياة"
|
||||
android:textColor="#00D4AA"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="• رحلة واحدة يومياً\n• تطبيق واحد فقط"
|
||||
android:textColor="#AAAAAA"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Basic Annual Plan -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_card"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="الخطة الأساسية (سنوي)"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="10.00 JOD / سنة"
|
||||
android:textColor="#00D4AA"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
@@ -81,7 +114,57 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="✅ طلبات غير محدودة (Unlimited)\n✅ أولوية قصوى في القبول\n✅ دعم جميع التطبيقات\n✅ فلاتر السعر والمسافة المتقدمة"
|
||||
android:text="✅ طلبات غير محدودة\n✅ أولوية في القبول\n✅ تدعم 3 تطبيقات فقط"
|
||||
android:textColor="#CCCCCC"
|
||||
android:textSize="13sp"
|
||||
android:lineSpacingExtra="4dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_subscribe_basic"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/bg_button"
|
||||
android:text="تفعيل سنوي عبر CliQ"
|
||||
android:textColor="#FFFFFF" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Pro Annual Plan -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_card"
|
||||
android:elevation="4dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="الخطة الاحترافية (سنوي)"
|
||||
android:textColor="#FFD700"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="17.00 JOD / سنة"
|
||||
android:textColor="#00D4AA"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginVertical="12dp"
|
||||
android:background="#33FFFFFF" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="✅ طلبات غير محدودة\n✅ أقصى سرعة وقوة في القبول\n✅ تدعم جميع الـ 5 تطبيقات"
|
||||
android:textColor="#CCCCCC"
|
||||
android:textSize="13sp"
|
||||
android:lineSpacingExtra="4dp" />
|
||||
@@ -92,54 +175,11 @@
|
||||
android:layout_height="54dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/bg_button_primary"
|
||||
android:text="تفعيل عبر CliQ"
|
||||
android:text="تفعيل سنوي عبر CliQ"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Annual Plan -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_card"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="الخطة السنوية (الأكثر توفيراً)"
|
||||
android:textColor="#FFD700"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="80.00 JOD / سنة"
|
||||
android:textColor="#00D4AA"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="وفر 40 دينار سنوياً مع تفعيل دائم\nشامل جميع التحديثات القادمة"
|
||||
android:textColor="#AAAAAA"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_subscribe_annual"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/bg_button"
|
||||
android:text="تفعيل سنوي عبر CliQ"
|
||||
android:textColor="#FFFFFF" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user