Skip to content

Commit

Permalink
Checkout Page
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanWidjanarko committed Dec 7, 2021
1 parent 225e53b commit 7d10233
Show file tree
Hide file tree
Showing 10 changed files with 491 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Trolleapp">
<activity
android:name=".ui.pay.CheckoutActivity"
android:exported="true" />
<activity
android:name=".ui.side_menu.AboutActivity"
android:theme="@style/Theme.AppCompat.DayNight.NoActionBar" />
Expand All @@ -18,12 +21,9 @@
<activity
android:name=".ui.profile.ProfileActivity"
android:theme="@style/Theme.AppCompat.DayNight.NoActionBar" />
<activity
android:name=".ui.home.HomeFailedActivity" />
<activity
android:name=".ui.home.HomeSuccessActivity" />
<activity
android:name=".ui.home.HomeActivity" />
<activity android:name=".ui.home.HomeFailedActivity" />
<activity android:name=".ui.home.HomeSuccessActivity" />
<activity android:name=".ui.home.HomeActivity" />
<activity
android:name=".ui.signup.SignUpActivity"
android:theme="@style/Theme.AppCompat.DayNight.NoActionBar" />
Expand Down
12 changes: 12 additions & 0 deletions app/src/main/java/com/trolle/trolleapp/ui/pay/CheckoutActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.trolle.trolleapp.ui.pay

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.trolle.trolleapp.R

class CheckoutActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_checkout)
}
}
Binary file added app/src/main/res/drawable/arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
252 changes: 252 additions & 0 deletions app/src/main/res/layout/activity_checkout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_margin="15dp"
android:background="@color/bgc"
tools:context=".ui.pay.CheckoutActivity">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="25dp"
android:orientation="horizontal">

<ImageView
android:id="@+id/image_view_icon"
android:layout_width="25dp"
android:layout_height="25dp"
android:rotation="90"
android:layout_marginEnd="25dp"
android:src="@drawable/arrow"
android:contentDescription="@string/back_arrow" />

<TextView
android:id="@+id/text_view_checkout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/checkout"
android:textSize="20sp"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="vertical">

<TextView
android:id="@+id/text_view_payment_method"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/payment_method"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<RadioGroup
android:id="@+id/radio_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="75dp">

<RadioButton
android:id="@+id/radio_button_ovo"
android:layout_width="300dp"
android:layout_height="match_parent"
android:text="@string/ovo"
android:textSize="16sp"
android:textColor="@color/white"
android:textAlignment="center"
android:layoutDirection="rtl"/>

<RadioButton
android:id="@+id/radio_button_linkaja"
android:layout_width="300dp"
android:layout_height="match_parent"
android:text="@string/linkaja"
android:textSize="16sp"
android:textColor="@color/white"
android:textAlignment="center"
android:layoutDirection="rtl"/>

<RadioButton
android:id="@+id/radio_button_shopeepay"
android:layout_width="300dp"
android:layout_height="match_parent"
android:text="@string/shopeepay"
android:textSize="16sp"
android:textColor="@color/white"
android:textAlignment="center"
android:layoutDirection="rtl"/>

<RadioButton
android:id="@+id/radio_button_dana"
android:layout_width="300dp"
android:layout_height="match_parent"
android:text="@string/dana"
android:textSize="16sp"
android:textColor="@color/white"
android:textAlignment="center"
android:layoutDirection="rtl"/>

</RadioGroup>

<TextView
android:id="@+id/text_view_payment_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/payment_summary"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:layout_marginBottom="100dp"
android:orientation="horizontal">

<TextView
android:id="@+id/text_view_sub_total"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="@string/sub_total"
android:textSize="18sp"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/text_view_sub_total_price"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="2"
android:text="@string/sub_total_price_dummy"
android:textColor="@color/white"
android:textSize="18sp"
android:textAlignment="textEnd"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</LinearLayout>

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:orientation="horizontal">

<TextView
android:id="@+id/text_view_admin_fee"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="@string/admin_fee"
android:textSize="18sp"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/text_view_admin_fee_price"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="2"
android:text="@string/admin_fee_price_dummy"
android:textColor="@color/white"
android:textSize="18sp"
android:textAlignment="textEnd"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_margin="15dp">

<TextView
android:id="@+id/text_view_grand_total"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/grand_total"
android:textSize="18sp"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/text_view_grand_total_price"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/grand_total_price_dummy"
android:textColor="@color/white"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</LinearLayout>

<Button
android:id="@+id/button_pay"
android:layout_width="150dp"
android:layout_height="50dp"
android:text="@string/sign_in"
android:textColor="@color/bgc"
android:layout_margin="15dp"
android:background="@drawable/rounded_button"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>

</LinearLayout>

</LinearLayout>

</LinearLayout>
Loading

0 comments on commit 7d10233

Please sign in to comment.