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

Made Profile Photo Unclickable #157

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
24fc343
add necessary redesign fonts (#114)
laxyapahuja Jan 11, 2020
98d5d0a
redesign: addition of CircleImageView dependency (#120)
rchtgpt Jan 24, 2020
3a184a0
redesign: add all necessary colors (#121)
rchtgpt Jan 24, 2020
f9e0342
redesign: added material style component (#122)
rchtgpt Jan 25, 2020
ade5d7a
fix: logout dialog box UI inconsistencies (#124)
laxyapahuja Jan 27, 2020
926273f
Add functionality to SwipeRefreshLayout
ashwinkey04 Feb 11, 2020
95aa371
Refractor item_planned_payment.xml
ashwinkey04 Feb 19, 2020
742ccd0
FIX-152
garvit984 Mar 13, 2020
19430fd
Profile photo problem solved
garvit984 Mar 14, 2020
f0fc0ef
fix: Change permission from CAMERA to WRITE EXTERNAL STORAGE
prajwal27 Mar 20, 2020
bf210da
feat: improve PR template (#96)
rchtgpt May 17, 2020
11c90f6
feat: share app link (#88)
rchtgpt May 17, 2020
5ac8c8b
Fix: improve the Issue Template (#97)
rchtgpt May 17, 2020
4f7c0a4
Add renovate.json
renovate-bot May 22, 2020
8ba399b
Fix #108: Restrict rotation in login and passcode
ashwinkey04 Jun 8, 2020
1c29fcb
Merge pull request #182 from ashwinkey04/108
abhijitramesh Jun 11, 2020
fe4caf6
Merge pull request #137 from ashwinkey04/planned_payment_typo
abhijitramesh Jun 11, 2020
a37095f
Merge pull request #133 from ashwinkey04/swiperefresh
abhijitramesh Jun 11, 2020
757a316
Merge pull request #160 from prajwal27/bug-share-button
abhijitramesh Jun 11, 2020
1766684
Merge pull request #171 from openMF/renovate/configure
abhijitramesh Jun 11, 2020
a100518
add necessary redesign fonts (#114)
laxyapahuja Jan 11, 2020
f422a39
redesign: addition of CircleImageView dependency (#120)
rchtgpt Jan 24, 2020
7e4e533
redesign: add all necessary colors (#121)
rchtgpt Jan 24, 2020
3a091b3
redesign: added material style component (#122)
rchtgpt Jan 25, 2020
9ea018b
fix: logout dialog box UI inconsistencies (#124)
laxyapahuja Jan 27, 2020
83c9413
FIX-152
garvit984 Mar 13, 2020
203e9cf
Profile photo problem solved
garvit984 Mar 14, 2020
44437ac
Merge remote-tracking branch 'origin/master'
garvit984 Jun 11, 2020
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
3 changes: 3 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$rootProject.kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$rootProject.kotlinVersion"

// Circle Image View
implementation 'de.hdodenhof:circleimageview:3.0.1'

// Support Dependencies
implementation "androidx.appcompat:appcompat:$rootProject.supportLibraryVersion"
implementation "com.google.android.material:material:$rootProject.supportLibraryVersion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,44 +28,43 @@ import org.mifos.mobile.cn.ui.views.HeaderView

import javax.inject.Inject

class CustomerDetailsFragment : MifosBaseFragment(), AppBarLayout.OnOffsetChangedListener,CustomerDetailsContract.View, View.OnClickListener{

class CustomerDetailsFragment : MifosBaseFragment(), AppBarLayout.OnOffsetChangedListener, CustomerDetailsContract.View, View.OnClickListener {


@Inject
lateinit var customerDetailsPresenter: CustomerDetailsPresenter

private lateinit var rootView : View
private lateinit var customerIdentification : String
private var isHideToolbarView: Boolean = false
private lateinit var collapsingToolbarLayout : CollapsingToolbarLayout
private lateinit var customer : Customer
private lateinit var toolbarHeaderView : HeaderView
private lateinit var floatHeaderView : HeaderView

companion object {
fun newInstance(identifier: String): CustomerDetailsFragment {
val fragment = CustomerDetailsFragment()
val args = Bundle()
args.putString(ConstantKeys.CUSTOMER_IDENTIFIER,identifier)
fragment.arguments = args
return fragment

}
}
private lateinit var rootView: View
private lateinit var customerIdentification: String
private var isHideToolbarView: Boolean = false
private lateinit var collapsingToolbarLayout: CollapsingToolbarLayout
private lateinit var customer: Customer
private lateinit var toolbarHeaderView: HeaderView
private lateinit var floatHeaderView: HeaderView

companion object {
fun newInstance(identifier: String): CustomerDetailsFragment {
val fragment = CustomerDetailsFragment()
val args = Bundle()
args.putString(ConstantKeys.CUSTOMER_IDENTIFIER, identifier)
fragment.arguments = args
return fragment

}
}


override fun onCreate(savedInstanceState: Bundle?){
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setToolbarTitle(getString(R.string.account_overview))
if(arguments != null){1
if (arguments != null) {
1
customerIdentification = arguments!!.getString(ConstantKeys.CUSTOMER_IDENTIFIER)
}
}

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
rootView = inflater.inflate(R.layout.fragment_customer_details,container,false)
rootView = inflater.inflate(R.layout.fragment_customer_details, container, false)
(activity as MifosBaseActivity).activityComponent.inject(this)
customerDetailsPresenter.attachView(this)

Expand All @@ -88,12 +87,13 @@ class CustomerDetailsFragment : MifosBaseFragment(), AppBarLayout.OnOffsetChange


}

override fun onClick(view: View) {
when(view.id){
when (view.id) {
R.id.ll_deposit_accounts -> {
openDepositAccount()
}
R.id.ll_loan_accounts-> {
R.id.ll_loan_accounts -> {
openLoanAccount()
}
R.id.ll_activities -> {
Expand All @@ -117,13 +117,12 @@ class CustomerDetailsFragment : MifosBaseFragment(), AppBarLayout.OnOffsetChange

override fun onResume() {
super.onResume()
cl_customer_details.visibility = View.GONE
collapsingToolbarLayout.title= " "
cl_customer_details.visibility = View.GONE
collapsingToolbarLayout.title = " "
customerDetailsPresenter.loadCustomerDetails(customerIdentification)
}



override fun showCustomerDetails(customer: Customer) {
this.customer = customer
cl_customer_details.visibility = View.VISIBLE
Expand All @@ -132,10 +131,10 @@ class CustomerDetailsFragment : MifosBaseFragment(), AppBarLayout.OnOffsetChange
loadCustomerPortrait()

tv_current_status.text = customer.currentState!!.name
StatusUtils.setCustomerStatusIcon(customer.currentState!!,iv_current_status,context)
StatusUtils.setCustomerStatusIcon(customer.currentState!!, iv_current_status, context)


val address : Address = customer.address!!
val address: Address = customer.address!!
val addressBuilder = StringBuilder()
addressBuilder
.append(address.street).append(", ")
Expand Down Expand Up @@ -171,19 +170,21 @@ class CustomerDetailsFragment : MifosBaseFragment(), AppBarLayout.OnOffsetChange
}
showToolbarTitleSubtitle(title, subtitle)
}

override fun showUserInterface() {
if (toolbar_customer != null) {
(activity as AppCompatActivity).setSupportActionBar(toolbar_customer)
(activity as AppCompatActivity).supportActionBar!!
.setDisplayHomeAsUpEnabled(true)
}

collapsingToolbarLayout.title= " "
collapsingToolbarLayout.title = " "
app_bar_layout.addOnOffsetChangedListener(this)
}

override fun showToolbarTitleSubtitle(title: String, subtitle: String) {
toolbarHeaderView.bindTo(title,subtitle)
floatHeaderView.bindTo(title,subtitle)
toolbarHeaderView.bindTo(title, subtitle)
floatHeaderView.bindTo(title, subtitle)

}

Expand All @@ -206,25 +207,22 @@ class CustomerDetailsFragment : MifosBaseFragment(), AppBarLayout.OnOffsetChange
}



override fun loadCustomerPortrait() {

val imageLoaderUtils = ImageLoaderUtils(this.context!!)
imageLoaderUtils.loadImage(imageLoaderUtils.buildCustomerPortraitImageUrl(customer.identifier),iv_customer_profile,R.drawable.mifos_logo_new)
imageLoaderUtils.loadImage(imageLoaderUtils.buildCustomerPortraitImageUrl(customer.identifier), iv_customer_profile, R.drawable.mifos_logo_new)

}

override fun showProgressbar() {
showProgressBar()
showProgressBar()
}

override fun hideProgressbar() {
hideProgressBar()
hideProgressBar()
}




override fun getCustomerStatus(): Customer.State {
return customer.currentState!!
}
Expand All @@ -241,6 +239,7 @@ class CustomerDetailsFragment : MifosBaseFragment(), AppBarLayout.OnOffsetChange
hideProgressDialog()
customerDetailsPresenter.detachView()
}

override fun onOffsetChanged(appBarLayout: AppBarLayout?, verticalOffset: Int) {
val maxScroll = appBarLayout!!.totalScrollRange
val percentage = Math.abs(verticalOffset).toFloat() / maxScroll.toFloat()
Expand All @@ -254,28 +253,30 @@ class CustomerDetailsFragment : MifosBaseFragment(), AppBarLayout.OnOffsetChange
}

}

private fun openDepositAccount() {
(activity as MifosBaseActivity)
.replaceFragment(CustomerAccountFragment.newInstance(AccountType.DEPOSIT),
true, R.id.container)
}

private fun openLoanAccount() {
(activity as MifosBaseActivity)
.replaceFragment(CustomerAccountFragment.newInstance(AccountType.LOAN),
true, R.id.container)
}

private fun openCustomerActivities() {
val intent = Intent(activity,CustomerActivitiesActivity::class.java)
intent.putExtra(ConstantKeys.CUSTOMER_IDENTIFIER,"customer_identifier")
val intent = Intent(activity, CustomerActivitiesActivity::class.java)
intent.putExtra(ConstantKeys.CUSTOMER_IDENTIFIER, "customer_identifier")
startActivity(intent)
}

private fun openIdentificationCards() {
val intent = Intent(activity,IdentificationsActivity::class.java)
intent.putExtra(ConstantKeys.CUSTOMER_IDENTIFIER,"customer_identifier")
val intent = Intent(activity, IdentificationsActivity::class.java)
intent.putExtra(ConstantKeys.CUSTOMER_IDENTIFIER, "customer_identifier")
startActivity(intent)
}




}
Binary file added app/src/main/res/font/airbnb_cereal_black.ttf
Binary file not shown.
Binary file added app/src/main/res/font/airbnb_cereal_book.ttf
Binary file not shown.
Binary file not shown.
Binary file added app/src/main/res/font/airbnb_cereal_light.ttf
Binary file not shown.
Binary file added app/src/main/res/font/productsans.ttf
Binary file not shown.
Binary file added app/src/main/res/font/productsans_bold.ttf
Binary file not shown.
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_dashboard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
android:layout_width="65dp"
android:visibility="visible"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:clickable="false"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we are making the profile picture unclickable?

app:srcCompat="@drawable/ic_person_black_24dp"/>

<org.mifos.mobile.cn.ui.utils.CircularImageView
Expand Down
12 changes: 11 additions & 1 deletion app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources xmlns:tools="http://schemas.android.com/tools">


<color name="dashboard_gray_background">#B2C1C8</color>
Expand All @@ -11,6 +11,9 @@
<color name="colorAccent">#FF4081</color>

<color name="white">#ffffff</color>
<color name="violet">#4C56C0</color>
<color name="offwhite">#EBECF0</color>

<!-- A light Holo shade of blue -->
<color name="blue_light">#ff33b5e5</color>
<!-- A light Holo shade of gray -->
Expand Down Expand Up @@ -39,6 +42,8 @@
<color name="gray_bright">#33CCCCCC</color>

<color name="blue">#0a46b1</color>
<color name="light_gray">#AFADB5</color>
<color name="dark_gray">#7A7A7A</color>

<color name="blue_light_alert_background">#c9d8e9</color>
<!--Black-->
Expand All @@ -59,6 +64,11 @@
<color name="base10">#eaeaea</color>
<color name="base30">#c1c1c1</color>

<!--Default BoxStokeColor of EditText-->
<color name="mtrl_textinput_default_box_stroke_color" tools:override="true">#4C56C0</color>

<!--Accounts Screen-->
<color name="foreground_text_btn">#5861C4</color>

<!--Swipe Refresh Colors-->
<array name="swipeRefreshColors">
Expand Down
14 changes: 12 additions & 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 @@ -42,9 +42,19 @@
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>

<style name="MaterialAlertDialogStyle" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="colorAccent">@color/colorPrimary</item>
<item name="colorAccent">@color/white</item>
<item name="android:textColorPrimary">@color/black</item>
<item name="android:background">@color/white</item>
<item name="buttonBarNegativeButtonStyle">@style/NegativeButtonStyle</item>
<item name="buttonBarPositiveButtonStyle">@style/PositiveButtonStyle</item>
</style>

<style name="NegativeButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:textColor">@color/colorPrimary</item>
</style>

<style name="PositiveButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:textColor">@color/colorPrimary</item>
</style>

<style name="MaterialDatePickerTheme" parent="Theme.AppCompat.Light.Dialog">
Expand Down