Skip to content

Commit

Permalink
Merge pull request #166 from yashk2000/userClientProfileUI
Browse files Browse the repository at this point in the history
Enhance UI of user and client profile sections
  • Loading branch information
yashk2000 committed Aug 16, 2020
2 parents 5a9da33 + 1862f7d commit 3bac844
Show file tree
Hide file tree
Showing 23 changed files with 399 additions and 251 deletions.
1 change: 1 addition & 0 deletions visionppi/app/build.gradle
Expand Up @@ -54,6 +54,7 @@ dependencies {
implementation 'androidx.navigation:navigation-ui:2.1.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.1.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.1.0'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
def lifecycle_version = "2.2.0"
def kotlin_version="1.3.72"

Expand Down
Expand Up @@ -4,10 +4,9 @@ import android.content.Intent
import android.os.Bundle
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import kotlinx.android.synthetic.main.activity_client_profile.*
import kotlinx.android.synthetic.main.toolbar.*
import org.mifos.visionppi.R
import org.mifos.visionppi.databinding.ActivityClientProfileBinding
import org.mifos.visionppi.objects.Client
import org.mifos.visionppi.ui.new_survey.NewPPISurveyActivity

Expand All @@ -17,30 +16,29 @@ import org.mifos.visionppi.ui.new_survey.NewPPISurveyActivity

class ClientProfileActivity : AppCompatActivity() , ClientProfileMVPView {

lateinit var binding: ActivityClientProfileBinding

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

binding = DataBindingUtil.setContentView(this, R.layout.activity_client_profile)
setContentView(R.layout.activity_client_profile)
val clientDetails = intent.getParcelableExtra("client") as Client
setClientDetails(clientDetails)

setSupportActionBar(appToolbar)
val actionBar = supportActionBar
actionBar?.title = "Client Profile"

binding.newSurveyBtn.setOnClickListener {
new_survey_btn.setOnClickListener {
val intent= Intent(applicationContext, NewPPISurveyActivity::class.java)
startActivity(intent)
}
}
override fun setClientDetails(client : Client) {
binding.clientIdValue.text = client.entityId.toString()
binding.clientNameValue.text = client.entityName
binding.accountNoValue.text = client.entityAccountNo
binding.mobileNoValue.text = client.entityMobileNo
binding.clientTypeValue.text = client.entityType
uname.text = client.entityName
clientIdValue.text = client.entityId.toString()
clientNameValue.text = client.entityName
accountNoValue.text = client.entityAccountNo
mobileNoValue.text = client.entityMobileNo
clientTypeValue.text = client.entityType
}

override fun showToastMessage(string: String) {
Expand Down
Expand Up @@ -37,12 +37,12 @@ class UserProfileActivity : Fragment(), UserProfileMVPView{

override fun getUserDetails() {
user = mUserProfilePresenter.fetchUserDetails(requireActivity(), requireContext())
Log.d("HAHA", user.toString())
setUserDetails()
}

override fun setUserDetails() {

uname.text = user.username
username_value.text = user.username
user_id_value.text = user.userId.toString()
office_name_value.text = user.officeName
Expand Down
11 changes: 11 additions & 0 deletions visionppi/app/src/main/res/drawable-anydpi/ic_bene.xml
@@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#333333"
android:alpha="0.6">
<path
android:fillColor="@android:color/white"
android:pathData="M16,11c1.66,0 2.99,-1.34 2.99,-3S17.66,5 16,5c-1.66,0 -3,1.34 -3,3s1.34,3 3,3zM8,11c1.66,0 2.99,-1.34 2.99,-3S9.66,5 8,5C6.34,5 5,6.34 5,8s1.34,3 3,3zM8,13c-2.33,0 -7,1.17 -7,3.5L1,19h14v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5zM16,13c-0.29,0 -0.62,0.02 -0.97,0.05 1.16,0.84 1.97,1.97 1.97,3.45L17,19h6v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5z"/>
</vector>
11 changes: 11 additions & 0 deletions visionppi/app/src/main/res/drawable-anydpi/ic_dob.xml
@@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#333333"
android:alpha="0.6">
<path
android:fillColor="@android:color/white"
android:pathData="M20,3h-1L19,1h-2v2L7,3L7,1L5,1v2L4,3c-1.1,0 -2,0.9 -2,2v16c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,5c0,-1.1 -0.9,-2 -2,-2zM20,21L4,21L4,8h16v13z"/>
</vector>
11 changes: 11 additions & 0 deletions visionppi/app/src/main/res/drawable-anydpi/ic_phone.xml
@@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#333333"
android:alpha="0.6">
<path
android:fillColor="@android:color/white"
android:pathData="M6.62,10.79c1.44,2.83 3.76,5.14 6.59,6.59l2.2,-2.2c0.27,-0.27 0.67,-0.36 1.02,-0.24 1.12,0.37 2.33,0.57 3.57,0.57 0.55,0 1,0.45 1,1V20c0,0.55 -0.45,1 -1,1 -9.39,0 -17,-7.61 -17,-17 0,-0.55 0.45,-1 1,-1h3.5c0.55,0 1,0.45 1,1 0,1.25 0.2,2.45 0.57,3.57 0.11,0.35 0.03,0.74 -0.25,1.02l-2.2,2.2z"/>
</vector>
Binary file added visionppi/app/src/main/res/drawable-hdpi/ic_bene.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added visionppi/app/src/main/res/drawable-hdpi/ic_dob.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added visionppi/app/src/main/res/drawable-mdpi/ic_bene.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added visionppi/app/src/main/res/drawable-mdpi/ic_dob.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added visionppi/app/src/main/res/drawable-xhdpi/ic_dob.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions visionppi/app/src/main/res/drawable/background.xml
@@ -0,0 +1,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="90"
android:endColor="#00000000"
android:startColor="#60000000"/>
</shape>

0 comments on commit 3bac844

Please sign in to comment.