Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Roboto Font to the app #172

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@

<activity android:name=".ui.online.customers.customeractivities.CustomerActivitiesActivity" />

<meta-data
android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />

</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
Customer customer = customers.get(position);

holder.tvCustomerName.setText(context.getString(R.string.customer_name,
customer.getGivenName(), customer.getSurname() ));

Expand All @@ -62,6 +63,7 @@ public void onBindViewHolder(ViewHolder holder, int position) {
context.getString(R.string.not_assigned)));
}


ImageLoaderUtils imageLoaderUtils = new ImageLoaderUtils(context);
imageLoaderUtils.loadImage(imageLoaderUtils.buildCustomerPortraitImageUrl(
customer.getIdentifier()), holder.ivCustomerImage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ public void onBindHeaderViewHolder(SectioningAdapter.HeaderViewHolder viewHolder
}
hvh.tvRemainingPrincipal.setText(context.getString(R.string.remaining_principal)
+ context.getString(R.string.colon) + section.remainingPrincipal);

hvh.updateSectionCollapseToggle(isSectionCollapsed(sectionIndex));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
ButterKnife.bind(this, rootView);
initializeFineractUIErrorHandler(getActivity(), rootView);
customerDetailsPresenter.attachView(this);

showUserInterface();

return rootView;
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/font/roboto.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
app:fontProviderAuthority="com.google.android.gms.fonts"
app:fontProviderPackage="com.google.android.gms"
app:fontProviderQuery="Roboto"
app:fontProviderCerts="@array/com_google_android_gms_fonts_certs">
</font-family>
5 changes: 5 additions & 0 deletions app/src/main/res/layout/activity_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

<TextView
android:gravity="center"
android:fontFamily="@font/roboto"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:text="@string/enter_you_credentials"/>
Expand All @@ -56,6 +57,7 @@
android:drawableStart="@drawable/ic_tenant_black_24dp"
android:drawablePadding="@dimen/layout_padding_8dp"
android:hint="@string/tenant"
android:fontFamily="@font/roboto"
android:id="@+id/et_tenant"
android:inputType="text"
android:layout_height="wrap_content"
Expand All @@ -73,6 +75,7 @@
android:drawableStart="@drawable/ic_person_black_24dp"
android:drawablePadding="@dimen/layout_padding_8dp"
android:hint="@string/username"
android:fontFamily="@font/roboto"
android:id="@+id/et_username"
android:inputType="text"
android:layout_height="wrap_content"
Expand All @@ -92,6 +95,7 @@
android:drawablePadding="@dimen/layout_padding_8dp"
android:hint="@string/password"
android:id="@+id/et_password"
android:fontFamily="@font/roboto"
android:inputType="textPassword"
android:layout_height="wrap_content"
android:layout_width="match_parent"/>
Expand All @@ -104,6 +108,7 @@
android:id="@+id/btn_login"
android:layout_gravity="center"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto"
android:layout_marginTop="@dimen/layout_padding_15dp"
android:layout_width="match_parent"
android:text="@string/login"
Expand Down
11 changes: 8 additions & 3 deletions app/src/main/res/layout/bottom_sheet_add_debt_income.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@

<TextView
android:id="@+id/tv_header"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fontFamily="@font/roboto"
android:paddingBottom="@dimen/layout_padding_30dp"
android:paddingLeft="@dimen/layout_padding_24dp"
android:paddingRight="@dimen/layout_padding_24dp"
android:paddingStart="@dimen/layout_padding_24dp"
android:paddingBottom="@dimen/layout_padding_30dp"
android:paddingTop="@dimen/layout_padding_24dp"
android:text="@string/add_debt"
android:textColor="@color/colorPrimaryDark"
android:textStyle="bold"/>
android:textStyle="bold" />

<android.support.design.widget.TextInputLayout
android:layout_height="match_parent"
Expand All @@ -36,6 +37,7 @@

<EditText
android:hint="@string/amount"
android:fontFamily="@font/roboto"
android:id="@+id/et_amount"
android:inputType="numberDecimal"
android:layout_height="match_parent"
Expand All @@ -53,6 +55,7 @@
android:hint="@string/description"
android:id="@+id/et_description"
android:scrollbars="vertical"
android:fontFamily="@font/roboto"
android:scrollHorizontally="false"
android:inputType="textMultiLine"
android:layout_height="match_parent"
Expand All @@ -78,6 +81,7 @@
android:layout_gravity="center"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/layout_padding_16dp"
android:fontFamily="@font/roboto"
android:layout_marginRight="@dimen/layout_padding_16dp"
android:layout_width="wrap_content"
android:text="@string/cancel"
Expand All @@ -86,6 +90,7 @@
<Button
android:id="@+id/btn_add_debt_income"
android:layout_gravity="center"
android:fontFamily="@font/roboto"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/add_debt"
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/layout/bottom_sheet_add_document.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
android:paddingBottom="@dimen/layout_padding_30dp"
android:paddingLeft="@dimen/layout_padding_24dp"
android:paddingRight="@dimen/layout_padding_24dp"
android:fontFamily="@font/roboto"
android:paddingStart="@dimen/layout_padding_24dp"
android:paddingTop="@dimen/layout_padding_16dp"
android:text="@string/add_document"
Expand All @@ -48,6 +49,7 @@
android:text="@string/browse"
android:layout_weight="1"
android:layout_marginTop="@dimen/layout_padding_16dp"
android:fontFamily="@font/roboto"
android:drawableStart="@drawable/ic_folder_black_24dp"
android:drawableLeft="@drawable/ic_folder_black_24dp"
android:textAllCaps="false" />
Expand All @@ -63,6 +65,7 @@
<EditText
android:hint="@string/description"
android:id="@+id/et_amount"
android:fontFamily="@font/roboto"
android:scrollbars="vertical"
android:scrollHorizontally="false"
android:inputType="textMultiLine"
Expand All @@ -84,6 +87,7 @@
<TextView
style="@style/Base.TextAppearance.AppCompat.Small"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto"
android:layout_width="wrap_content"
android:text="@string/name"
android:textSize="@dimen/text_size_12sp"/>
Expand All @@ -92,6 +96,7 @@
android:id="@+id/tv_document_name"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:fontFamily="@font/roboto"
android:textSize="@dimen/text_medium"
android:paddingTop="@dimen/layout_padding_4dp"
tools:text="This is the description"/>
Expand All @@ -117,6 +122,7 @@
android:layout_gravity="center"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/layout_padding_16dp"
android:fontFamily="@font/roboto"
android:layout_marginRight="@dimen/layout_padding_16dp"
android:layout_width="wrap_content"
android:text="@string/cancel"
Expand All @@ -127,6 +133,7 @@
android:layout_gravity="center"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:fontFamily="@font/roboto"
android:text="@string/add_document"
android:textAllCaps="false"
/>
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/res/layout/bottom_sheet_edit_customer_profile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
android:layout_width="match_parent"
android:padding="@dimen/layout_padding_16dp"
android:text="@string/customer_image"
android:fontFamily="@font/roboto"
android:textColor="@color/gray_dark"
android:textStyle="bold"/>

Expand Down Expand Up @@ -82,6 +83,7 @@
android:layout_gravity="center"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:fontFamily="@font/roboto"
android:paddingTop="@dimen/layout_padding_8dp"
android:text="@string/camera"
android:textSize="@dimen/text_medium"/>
Expand Down Expand Up @@ -114,6 +116,7 @@
android:layout_gravity="center"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:fontFamily="@font/roboto"
android:paddingTop="@dimen/layout_padding_8dp"
android:text="@string/gallery"
android:textSize="@dimen/text_medium"/>
Expand Down Expand Up @@ -144,6 +147,7 @@
<TextView
android:id="@+id/tv_delete"
android:layout_gravity="center"
android:fontFamily="@font/roboto"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingTop="@dimen/layout_padding_8dp"
Expand Down Expand Up @@ -172,6 +176,7 @@
android:layout_height="match_parent"
android:layout_width="match_parent"
android:textColor="@color/colorPrimaryDark"
android:fontFamily="@font/roboto"
android:paddingBottom="@dimen/layout_padding_16dp"
android:textStyle="bold"
tools:text="Camera"/>
Expand All @@ -190,13 +195,15 @@
android:id="@+id/tv_select_file"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fontFamily="@font/roboto"
android:gravity="center"
android:textStyle="bold"
android:layout_marginTop="@dimen/layout_padding_4dp"
android:textColor="@color/colorPrimary"
android:text="@string/edit_selected_file"/>

<TextView
android:fontFamily="@font/roboto"
android:id="@+id/tv_image_name"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -213,6 +220,7 @@
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:drawablePadding="@dimen/layout_padding_8dp"
android:fontFamily="@font/roboto"
android:gravity="start|center"
android:layout_gravity="center"
android:theme="@style/AppTheme.Normal.Button"
Expand All @@ -225,6 +233,7 @@
android:layout_height="match_parent"
android:gravity="center"
style="@style/Base.TextAppearance.AppCompat.Small"
android:fontFamily="@font/roboto"
android:textColor="@color/red_light"
android:text="@string/portrait_size_can_not_exceed"
android:layout_marginTop="@dimen/layout_padding_8dp"
Expand All @@ -244,6 +253,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/layout_padding_16dp"
android:layout_marginRight="@dimen/layout_padding_16dp"
android:fontFamily="@font/roboto"
android:layout_weight=".5"
android:layout_width="wrap_content"
android:text="@string/cancel"
Expand All @@ -253,6 +263,7 @@
<Button
android:id="@+id/btn_upload_photo"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto"
android:layout_weight=".5"
android:layout_width="wrap_content"
android:text="@string/upload"
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/layout/bottom_sheet_task_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

<TextView
android:layout_height="match_parent"
android:fontFamily="@font/roboto"
android:layout_width="match_parent"
android:padding="@dimen/layout_padding_24dp"
android:text="@string/tasks"
Expand Down Expand Up @@ -70,6 +71,7 @@
android:id="@+id/tv_task1"
android:layout_gravity="center"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto"
android:layout_width="wrap_content"
android:paddingTop="@dimen/layout_padding_8dp"
android:textSize="@dimen/text_medium"
Expand Down Expand Up @@ -102,6 +104,7 @@
android:id="@+id/tv_task2"
android:layout_gravity="center"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto"
android:layout_width="wrap_content"
android:paddingTop="@dimen/layout_padding_8dp"
android:textSize="@dimen/text_medium"
Expand Down Expand Up @@ -140,13 +143,15 @@
android:layout_width="wrap_content"
android:text="@string/tasks"
android:textColor="@color/colorPrimaryDark"
android:fontFamily="@font/roboto"
android:textSize="@dimen/text_large"
android:textStyle="bold"/>

<TextView
android:id="@+id/tv_sub_header"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:fontFamily="@font/roboto"
android:paddingTop="@dimen/layout_padding_8dp"
android:text="@string/please_verify_following_task"
android:textSize="@dimen/text_size_12sp"/>
Expand All @@ -164,6 +169,7 @@
<EditText
android:hint="@string/enter_your_comment_here"
android:id="@+id/et_comment"
android:fontFamily="@font/roboto"
android:inputType="textMultiLine"
android:layout_height="match_parent"
android:layout_width="match_parent"
Expand All @@ -188,6 +194,7 @@
<Button
android:id="@+id/btn_cancel"
android:layout_gravity="center"
android:fontFamily="@font/roboto"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/layout_padding_16dp"
android:layout_marginRight="@dimen/layout_padding_16dp"
Expand All @@ -200,6 +207,7 @@
android:layout_gravity="center"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:fontFamily="@font/roboto"
android:text="@string/tasks"
android:textAllCaps="false"
/>
Expand Down
Loading