Skip to content

Commit cc817b8

Browse files
committed
Address review comments
1 parent c6929ce commit cc817b8

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

Reply/app/src/main/java/com/materialstudies/reply/data/Account.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package com.materialstudies.reply.data
1818

1919
import androidx.annotation.DrawableRes
20-
import androidx.annotation.Nullable
2120
import androidx.recyclerview.widget.DiffUtil
2221
import com.materialstudies.reply.R
2322

Reply/app/src/main/java/com/materialstudies/reply/ui/compose/ComposeFragment.kt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class ComposeFragment : Fragment() {
139139
* Expand the recipient [chip] into a popup with a list of contact addresses to choose from.
140140
*/
141141
private fun expandChip(chip: View) {
142-
val transform = MaterialContainerTransform().apply{
142+
val transform = MaterialContainerTransform().apply {
143143
startView = chip
144144
endView = binding.recipientCardView
145145
scrimColor = Color.TRANSPARENT
@@ -157,6 +157,7 @@ class ComposeFragment : Fragment() {
157157
// scrim) is clicked, or when the back button is pressed.
158158
binding.run {
159159
recipientCardView.setOnClickListener { collapseChip(chip) }
160+
recipientCardScrim.visibility = View.VISIBLE
160161
recipientCardScrim.setOnClickListener { collapseChip(chip) }
161162
}
162163
closeRecipientCardOnBackPressed.expandedChip = chip
@@ -173,7 +174,7 @@ class ComposeFragment : Fragment() {
173174
* Collapse the recipient card back into its [chip] form.
174175
*/
175176
private fun collapseChip(chip: View) {
176-
val transform = MaterialContainerTransform().apply{
177+
val transform = MaterialContainerTransform().apply {
177178
startView = binding.recipientCardView
178179
endView = chip
179180
scrimColor = Color.TRANSPARENT
@@ -183,12 +184,8 @@ class ComposeFragment : Fragment() {
183184
addTarget(chip)
184185
}
185186

186-
// Clear the scrim listener and on back pressed callbacks
187-
binding.recipientCardScrim.run {
188-
setOnClickListener { }
189-
isClickable = false
190-
isFocusable = false
191-
}
187+
// Remove the scrim view and on back pressed callbacks
188+
binding.recipientCardScrim.visibility = View.GONE
192189
closeRecipientCardOnBackPressed.expandedChip = null
193190
closeRecipientCardOnBackPressed.isEnabled = false
194191

Reply/app/src/main/res/values/styles.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@
3535
<item name="chipStartPadding">0dp</item>
3636
<item name="android:checkable">false</item>
3737
</style>
38+
3839
</resources>

0 commit comments

Comments
 (0)