Merge "desktop-exploded-view: Fix the hierarchy with the header" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
fe134675be
@@ -20,16 +20,6 @@
|
||||
android:layout_height="match_parent"
|
||||
android:importantForAccessibility="no">
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/task_header_view"
|
||||
android:inflatedId="@+id/task_header_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/snapshot"
|
||||
android:inflatedId="@+id/snapshot"
|
||||
@@ -41,6 +31,16 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/task_header_view"
|
||||
android:inflatedId="@+id/task_header_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/task_app_timer_toast"
|
||||
android:inflatedId="@+id/task_app_timer_toast"
|
||||
|
||||
@@ -30,7 +30,6 @@ import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.IdRes
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.constraintlayout.widget.ConstraintSet
|
||||
import androidx.core.view.isInvisible
|
||||
import androidx.core.view.isVisible
|
||||
import com.android.launcher3.Flags.enableRefactorDigitalWellbeingToast
|
||||
@@ -169,16 +168,6 @@ class TaskContentView @JvmOverloads constructor(context: Context, attrs: Attribu
|
||||
findViewById<ViewStub>(R.id.task_header_view)
|
||||
.apply { layoutResource = R.layout.task_header_view }
|
||||
.inflate() as TaskHeaderView
|
||||
|
||||
// TODO: Move to layout xml when moving away from view stubs.
|
||||
val constraintSet = ConstraintSet().apply { clone(this@TaskContentView) }
|
||||
constraintSet.connect(
|
||||
R.id.snapshot,
|
||||
ConstraintSet.TOP,
|
||||
R.id.task_header_view,
|
||||
ConstraintSet.BOTTOM,
|
||||
)
|
||||
constraintSet.applyTo(this@TaskContentView)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user