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 all 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
30 changes: 15 additions & 15 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
**Summary:**
## Summary

Summarise your issue in one sentence (what goes wrong, what did you expect to happen).
<!--Summarise your issue in one sentence (what goes wrong, what did you expect to happen).-->

**Steps to reproduce:**
## Steps to reproduce

How can we reproduce the issue?
<!--How can we reproduce the issue?-->

**Expected behaviour:**
## Expected behaviour

What did you expect the app to do?
<!--What did you expect the app to do?-->

**Observed behaviour:**
## Observed behaviour

What did you see instead? Describe your issue in detail here.
<!--What did you see instead? Describe your issue in detail here.-->

**Logcat for the issue**
## Logcat for the issue

Provide logs for the crash here
<!--Provide logs for the crash here-->

**Device and Android version:**
## Device and Android version

What make and model device (e.g., Samsung Galaxy S3) did you encounter this on? What Android
<!--What make and model device (e.g., Samsung Galaxy S3) did you encounter this on? What Android
version (e.g., Android 4.0 Ice Cream Sandwich or Android 6.0 Marshmallow) are you running? Is it
the stock
version from the manufacturer or a custom ROM?
version from the manufacturer or a custom ROM?-->

**Screenshots:**
## Screenshots

Can be created by pressing the Volume Down and Power Button at the same time on Android 4.0 and higher.
<!--Can be created by pressing the Volume Down and Power Button at the same time on Android 4.0 and higher.-->
10 changes: 8 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
## Issue Fix
Fixes #Issue_Number

Please Add Screenshots If there are any UI changes.
## Screenshots
<!--Please Add Screenshots or Screen Recordings which show the changes that you made.-->

Please make sure these boxes are checked before submitting your pull request - thanks!
## Description
<!--Please Add Summary of the changes that you have made.-->

##
<!--Please make sure these boxes are checked before submitting your pull request - thanks!-->

- [ ] Run the unit tests with `./gradlew check` to make sure you didn't break anything

Expand Down
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
6 changes: 4 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
</activity>

<activity android:name=".ui.mifos.DashboardActivity" />
<activity android:name=".ui.mifos.login.LoginActivity" />
<activity android:name=".ui.mifos.passcode.PasscodeActivity"/>
<activity android:name=".ui.mifos.login.LoginActivity"
android:screenOrientation="portrait"/>
<activity android:name=".ui.mifos.passcode.PasscodeActivity"
android:screenOrientation="portrait"/>
<activity android:name=".ui.mifos.loanApplication.loanActivity.LoanApplicationActivity"/>
<activity android:name=".ui.mifos.customerDetails.CustomerDetailsActivity"/>
<activity android:name=".ui.mifos.customerActivities.CustomerActivitiesActivity"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import android.widget.TextView
import androidx.annotation.DrawableRes
import androidx.core.content.ContextCompat
import kotlinx.android.synthetic.main.item_header_planned_payment.view.*
import kotlinx.android.synthetic.main.item_panned_payment.view.*
import kotlinx.android.synthetic.main.item_planned_payment.view.*
import org.mifos.mobile.cn.R
import org.mifos.mobile.cn.data.models.payment.CostComponent
import org.mifos.mobile.cn.data.models.payment.PlannedPayment
Expand Down Expand Up @@ -100,7 +100,7 @@ class PlannedPaymentAdapter @Inject constructor(@ApplicationContext var context:

override fun onCreateItemViewHolder(parent: ViewGroup?, itemType: Int): ItemViewHolder {
val inflater = LayoutInflater.from(parent!!.context)
val v = inflater.inflate(R.layout.item_panned_payment, parent, false)
val v = inflater.inflate(R.layout.item_planned_payment, parent, false)
return ItemViewHolder(v)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class DashboardActivity : MifosBaseActivity(), View.OnClickListener, NavigationV
setupNavigationBar()
setToolbarElevation()

replaceFragment(DashboardFragment.newInstance(), false, R.id.container)
replaceFragment(DashboardFragment.newInstance("customer_identifier"), false, R.id.container)

}

Expand Down Expand Up @@ -160,22 +160,19 @@ class DashboardActivity : MifosBaseActivity(), View.OnClickListener, NavigationV
when (item.itemId) {
R.id.item_home -> {
hideToolbarElevation()
replaceFragment(DashboardFragment.newInstance(), true, R.id.container)
replaceFragment(DashboardFragment.newInstance("customer_identifier"), true, R.id.container)
}
R.id.item_accounts -> {
replaceFragment(CustomerAccountFragment.newInstance(AccountType.DEPOSIT), true,
R.id.container)
}

R.id.item_logout -> {
showLogoutDialog()
}

R.id.item_product -> {
replaceFragment(ProductFragment.Companion.newInstance(), true,
R.id.container)
}

R.id.item_recent_transactions -> {
replaceFragment(RecentTransactionsFragment.Companion.newInstance(),true,R.id.container)
}
Expand All @@ -185,8 +182,14 @@ class DashboardActivity : MifosBaseActivity(), View.OnClickListener, NavigationV
R.id.item_settings -> {
replaceFragment(SettingsFragment.newInstance(), true, R.id.container)
}
R.id.item_share -> {
val sharingIntent = Intent(android.content.Intent.ACTION_SEND)
sharingIntent.type = "text/plain"
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, getString(R.string.app_link))
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, getString(R.string.share_message))
startActivity(Intent.createChooser(sharingIntent, getString(R.string.share_the_app_link)))
}
}

// close the drawer
drawerLayout.closeDrawer(GravityCompat.START)
setNavigationViewSelectedItem(R.id.item_home)
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)
}




}
Loading