Skip to content

Commit

Permalink
redesign: transfer and amount screen
Browse files Browse the repository at this point in the history
  • Loading branch information
rchtgpt committed Jan 24, 2020
1 parent 4ec1202 commit a2d9246
Show file tree
Hide file tree
Showing 21 changed files with 264 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
<activity android:name=".ui.mifos.debtincomereport.DebtIncomeReportActivity"/>
<activity android:name=".ui.mifos.aboutus.AboutUsActivity"/>
<activity android:name=".ui.mifos.privacypolicy.PrivacyPolicyActivity"/>
<activity android:name=".ui.mifos.transfer.TransferActivity"/>
<activity android:name=".ui.mifos.amount.AmountActivity"/>
<activity
android:name="com.google.android.gms.oss.licenses.OssLicensesMenuActivity"
android:theme="@style/Theme.AppCompat.Light.DarkActionBar" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.mifos.mobile.cn.ui.mifos.amount

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import org.mifos.mobile.cn.R

class AmountActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_amount)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.mifos.mobile.cn.ui.mifos.transfer

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import org.mifos.mobile.cn.R

class TransferActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_transfer)
}
}
Binary file added app/src/main/res/drawable-hdpi/pick_contact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-hdpi/qrcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-ldpi/pick_contact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-ldpi/qrcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/pick_contact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/qrcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/pick_contact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/qrcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxhdpi/pick_contact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxhdpi/qrcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxxhdpi/qrcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/avatar.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
128 changes: 128 additions & 0 deletions app/src/main/res/layout/activity_amount.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<?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:background="@color/violet"
android:orientation="vertical"
tools:context=".ui.mifos.amount.AmountActivity">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/layout_padding_24dp"
android:layout_marginLeft="@dimen/layout_padding_24dp"
android:layout_marginTop="@dimen/layout_padding_30dp"
android:text="@string/amount"
android:textColor="@color/white"
android:textSize="@dimen/text_size_28sp"
android:textStyle="bold" />

<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="@dimen/layout_padding_75dp"
android:layout_marginLeft="@dimen/layout_padding_50dp"
android:layout_marginTop="@dimen/layout_padding_40dp"
android:layout_marginRight="@dimen/layout_padding_50dp"
android:layout_marginBottom="@dimen/layout_padding_50dp"
app:cardCornerRadius="@dimen/layout_padding_10dp"
android:elevation="@dimen/layout_padding_10dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="horizontal">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="6"
android:gravity="center">

<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/iv_customer_picture"
android:layout_width="@dimen/layout_padding_60dp"
android:layout_height="@dimen/layout_padding_54dp"
android:layout_gravity="center_horizontal"
android:contentDescription="@string/customer_image"
android:src="@drawable/avatar" />

</RelativeLayout>

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

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dummy_contact_name"
android:textSize="@dimen/text_size_22sp"
android:textStyle="bold" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dummy_mobile_number"
android:textColor="@color/light_gray"
android:textSize="@dimen/text_size_14sp" />

</LinearLayout>

</LinearLayout>

</com.google.android.material.card.MaterialCardView>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="@dimen/layout_padding_550dp"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/layout_padding_negative_30dp"
android:backgroundTint="@color/offwhite"
app:cardCornerRadius="@dimen/layout_padding_30dp">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
android:id="@+id/tv_enter_amount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_padding_35dp"
android:gravity="center_horizontal"
android:text="@string/enter_amount"
android:textColor="@color/violet"
android:textSize="@dimen/text_size_22sp" />

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv_enter_amount"
android:layout_margin="@dimen/text_size_20sp"
android:backgroundTint="@color/offwhite">

<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="@dimen/layout_padding_64dp"
android:inputType="number"
android:textAlignment="center"/>

</com.google.android.material.textfield.TextInputLayout>

</RelativeLayout>

</com.google.android.material.card.MaterialCardView>

</RelativeLayout>

</LinearLayout>
86 changes: 86 additions & 0 deletions app/src/main/res/layout/activity_transfer.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?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:background="@color/violet"
android:orientation="vertical"
tools:context=".ui.mifos.transfer.TransferActivity">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/layout_padding_24dp"
android:layout_marginStart="@dimen/layout_padding_24dp"
android:layout_marginTop="@dimen/layout_padding_30dp"
android:text="@string/transfer"
android:textColor="@color/white"
android:textSize="@dimen/text_size_28sp"
android:textStyle="bold"/>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_padding_35dp"
android:gravity="center_horizontal">

<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="@dimen/layout_padding_250dp"
android:layout_height="@dimen/layout_padding_50dp"
android:textColorHint="@color/white"
app:boxStrokeColor="@color/white">

<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/mobile_number"/>

</com.google.android.material.textfield.TextInputLayout>

<ImageView
android:layout_width="@dimen/layout_padding_40dp"
android:layout_height="@dimen/layout_padding_40dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/layout_padding_5dp"
android:layout_marginStart="@dimen/layout_padding_5dp"
android:src="@drawable/pick_contact"
android:contentDescription="@string/choose_contact_number"/>

</LinearLayout>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/or"
android:textSize="@dimen/text_size_14sp"
android:textColor="@color/white"
android:gravity="center"
android:layout_margin="@dimen/text_size_20sp"/>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="@dimen/layout_padding_550dp"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/layout_padding_negative_30dp"
app:cardCornerRadius="@dimen/layout_padding_30dp"
android:backgroundTint="@color/offwhite">

<ImageView
android:layout_width="@dimen/layout_padding_180dp"
android:layout_height="@dimen/layout_padding_180dp"
android:layout_gravity="center"
android:layout_marginBottom="@dimen/layout_padding_30dp"
android:src="@drawable/qrcode"
android:contentDescription="@string/qr_code"/>

</com.google.android.material.card.MaterialCardView>

</RelativeLayout>

</LinearLayout>
13 changes: 13 additions & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="layout_padding_negative_30dp">-30dp</dimen>
<dimen name="layout_padding_2dp">2dp</dimen>
<dimen name="layout_padding_4dp">4dp</dimen>
<dimen name="layout_padding_8dp">8dp</dimen>
Expand All @@ -10,9 +11,17 @@
<dimen name="layout_padding_16dp">16dp</dimen>
<dimen name="layout_padding_24dp">24dp</dimen>
<dimen name="layout_padding_30dp">30dp</dimen>
<dimen name="layout_padding_35dp">35dp</dimen>
<dimen name="layout_padding_40dp">40dp</dimen>
<dimen name="layout_padding_50dp">50dp</dimen>
<dimen name="layout_padding_54dp">54dp</dimen>
<dimen name="layout_padding_60dp">60dp</dimen>
<dimen name="layout_padding_64dp">64dp</dimen>
<dimen name="layout_padding_75dp">75dp</dimen>
<dimen name="layout_padding_180dp">180dp</dimen>
<dimen name="layout_padding_250dp">250dp</dimen>
<dimen name="layout_padding_550dp">550dp</dimen>

<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
Expand All @@ -28,6 +37,10 @@
<dimen name="text_size_16sp">16sp</dimen>
<dimen name="text_size_18sp">18sp</dimen>
<dimen name="text_size_20sp">20sp</dimen>
<dimen name="text_size_22sp">22sp</dimen>
<dimen name="text_size_28sp">28sp</dimen>
<dimen name="text_size_30sp">30sp</dimen>

<!-- Dimen values for text size -->
<dimen name="text_headline">24sp</dimen>
<dimen name="text_large">20sp</dimen>
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@
<string name="expiration_date">Expiration date</string>
<string name="type">Type</string>
<string name="number">Number</string>
<string name="mobile_number">Mobile Number</string>
<string name="choose_contact_number">Choose contact number</string>
<string name="search_product">Search product</string>
<string name="share_customer_profile">Share Profile</string>
<string name="dialog_message_write_permission_for_share_denied_prompt">Without write permission you will not be able to share the image. Are you sure you want to deny this</string>
Expand Down Expand Up @@ -311,5 +313,11 @@
<string name="privacy_policy_host_url" translatable="false">https://openmf.github.io/privacy_policy_mifos_mobile.html</string>
<string name="opensource_license_title">Open Source licenses</string>

<!--Transfer and Amount Activity-->
<string name="dummy_contact_name">Nathaniel Harrington</string>
<string name="dummy_mobile_number">9910011158</string>
<string name="enter_amount">Enter Amount</string>
<string name="or">OR</string>
<string name="qr_code">QR Code</string>

</resources>
3 changes: 1 addition & 2 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
Expand Down Expand Up @@ -68,5 +68,4 @@
<item name="android:padding">@dimen/layout_padding_7dp</item>
</style>


</resources>

0 comments on commit a2d9246

Please sign in to comment.