split out FilteredStatusViewHolder from StatusBaseViewHolder (#4543)
This is way more efficient than before as less views need to be inflated and bound for a filtered status to be rendered. It also should fix the bug where sometimes a `StatusViewHolder` that is set up for showing a status gets bound to a status that is filtered, leading to a crash.
This commit is contained in:
parent
8a57bcc3f4
commit
326676a9c6
8 changed files with 107 additions and 96 deletions
|
|
@ -3,7 +3,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/status_filtered_placeholder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
|
|
@ -12,11 +12,10 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="0dp"
|
||||
android:text="Filter: MyFilter"
|
||||
android:textAlignment="center"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
tools:ignore="HardcodedText" />
|
||||
tools:text="Filter: MyFilter" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/status_filter_show_anyway"
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include layout="@layout/item_status" />
|
||||
|
||||
<include
|
||||
layout="@layout/item_status_filtered"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
</FrameLayout>
|
||||
Loading…
Add table
Add a link
Reference in a new issue