-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #25 If already at the top of the list of pings, when a new ping is added, it keeps being at the top of the list, to ensure the new ping is visible. But it won't show it if you were not at the top (this is usually the expected behaviour).
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
app/src/main/java/tech/relaycorp/ping/ui/common/DummyItemView.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package tech.relaycorp.ping.ui.common | ||
|
||
import android.content.Context | ||
import android.util.AttributeSet | ||
import android.view.View | ||
import com.airbnb.epoxy.ModelView | ||
|
||
@ModelView(autoLayout = ModelView.Size.MATCH_WIDTH_WRAP_HEIGHT, fullSpan = true) | ||
class DummyItemView | ||
@JvmOverloads | ||
constructor( | ||
context: Context, | ||
attrs: AttributeSet? = null, | ||
defStyleAttr: Int = 0 | ||
) : View(context, attrs, defStyleAttr) { | ||
|
||
// 1 invisible px square | ||
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { | ||
super.onMeasure( | ||
MeasureSpec.makeMeasureSpec(1, MeasureSpec.EXACTLY), | ||
MeasureSpec.makeMeasureSpec(1, MeasureSpec.EXACTLY) | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters