Skip to content

fix: set secondary color to editprofile buttons #1533

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

Merged
merged 3 commits into from
Apr 5, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import androidx.lifecycle.Observer
import com.google.android.material.snackbar.Snackbar
import com.squareup.picasso.Picasso
import kotlinx.android.synthetic.main.fragment_edit_profile.view.editProfileCoordinatorLayout
import kotlinx.android.synthetic.main.fragment_edit_profile.view.buttonUpdate
import kotlinx.android.synthetic.main.fragment_edit_profile.view.updateButton
import kotlinx.android.synthetic.main.fragment_edit_profile.view.firstName
import kotlinx.android.synthetic.main.fragment_edit_profile.view.lastName
import kotlinx.android.synthetic.main.fragment_edit_profile.view.profilePhoto
Expand Down Expand Up @@ -105,7 +105,7 @@ class EditProfileFragment : Fragment() {
permissionGranted = (ContextCompat.checkSelfPermission(requireContext(),
Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED)

rootView.buttonUpdate.setOnClickListener {
rootView.updateButton.setOnClickListener {
hideSoftKeyboard(context, rootView)
editProfileViewModel.updateProfile(encodedImage, rootView.firstName.text.toString(),
rootView.lastName.text.toString())
Expand Down
8 changes: 3 additions & 5 deletions app/src/main/res/layout/fragment_edit_profile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@
app:layout_constraintRight_toRightOf="parent"
android:layout_gravity="center_horizontal"
android:padding="@dimen/padding_large"
android:contentDescription="Profile Photo"
android:contentDescription="@string/profile_photo"
app:srcCompat="@drawable/ic_account_circle_grey" />

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/profilePhotoFab"
android:layout_width="@dimen/fab_width"
android:layout_height="@dimen/fab_height"
app:fabCustomSize="@dimen/fab_height"
app:backgroundTint="@color/colorPrimary"
android:layout_margin="@dimen/layout_margin_medium"
app:layout_constraintRight_toRightOf="@id/profilePhoto"
app:layout_constraintBottom_toBottomOf="@id/profilePhoto"
Expand Down Expand Up @@ -79,12 +78,11 @@

</LinearLayout>

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/buttonUpdate"
<Button
android:id="@+id/updateButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:backgroundTint="@color/colorPrimary"
android:text="@string/update"
android:textColor="@android:color/white" />

Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
<string name="last_name_optional">Last Name (Optional)</string>
<string name="welcome_back">Welcome back!</string>
<string name="update">Update</string>
<string name="profile_photo">Profile Photo</string>

<!--eventyay-->
<string name="eventyay_logo" translatable="false">eventyay</string>
Expand Down