Skip to content

Commit

Permalink
Profile photo problem solved
Browse files Browse the repository at this point in the history
  • Loading branch information
garvit984 committed Jun 11, 2020
1 parent 83c9413 commit 203e9cf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
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,7 +160,7 @@ 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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ import android.provider.MediaStore
import android.view.Menu
import android.view.MenuItem
import android.widget.ImageView
import com.github.therajanmaurya.sweeterror.SweetUIErrorHandler
import kotlinx.android.synthetic.main.activity_customer_profile.*
import org.mifos.mobile.cn.R
import org.mifos.mobile.cn.ui.base.MifosBaseActivity
import org.mifos.mobile.cn.ui.utils.*
import java.io.ByteArrayOutputStream
import java.util.jar.Manifest

class CustomerProfileActivity: MifosBaseActivity(),CustomerProfileContract.View {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,23 @@ import org.mifos.mobile.cn.ui.base.MifosBaseActivity
import org.mifos.mobile.cn.ui.base.MifosBaseFragment
import org.mifos.mobile.cn.ui.mifos.customerAccounts.CustomerAccountFragment
import org.mifos.mobile.cn.ui.mifos.customerDetails.CustomerDetailsActivity
import org.mifos.mobile.cn.ui.mifos.customerProfile.CustomerProfileActivity
import org.mifos.mobile.cn.ui.mifos.loanApplication.loanActivity.LoanApplicationActivity
import org.mifos.mobile.cn.ui.mifos.recentTransactions.RecentTransactionsFragment
import org.mifos.mobile.cn.ui.utils.ConstantKeys


class DashboardFragment : MifosBaseFragment(), View.OnClickListener, SwipeRefreshLayout.OnRefreshListener {

private lateinit var customerIdentification: String
private lateinit var rootView: View
private lateinit var customer: Customer

companion object {

fun newInstance(): DashboardFragment {
fun newInstance(identifier: String): DashboardFragment {
val fragment = DashboardFragment()
val args = Bundle()
args.putString(ConstantKeys.CUSTOMER_IDENTIFIER, identifier)
fragment.arguments = args
return fragment
}
Expand All @@ -40,6 +42,10 @@ class DashboardFragment : MifosBaseFragment(), View.OnClickListener, SwipeRefres
rootView = inflater.inflate(R.layout.fragment_dashboard, container, false)
setHasOptionsMenu(true)
setToolbarTitle(getString(R.string.home))
if (arguments != null) {
1
customerIdentification = arguments!!.getString(ConstantKeys.CUSTOMER_IDENTIFIER)
}
return rootView
}

Expand Down
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="false"
android:clickable="true"
app:srcCompat="@drawable/ic_person_black_24dp"/>

<org.mifos.mobile.cn.ui.utils.CircularImageView
Expand Down

0 comments on commit 203e9cf

Please sign in to comment.