Show topology pane detached from mirror toggle
Remove the extra blue border from the topology pane and give the toggle below it its own rounded corners. Flag: com.android.settings.flags.display_topology_pane_in_display_list Test: screenshots Test: verify display blocks are still clipped to the topology holder view Bug: b/396116157 Change-Id: I3c0f826db24e5c599c6b51f71d099976fb04cbf0
This commit is contained in:
@@ -14,13 +14,19 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- TODO(b/396116157): I cannot find the correct src of ImageView to set to
|
||||||
|
match the other preference items. I tried
|
||||||
|
@drawable/android:selectable_item_background but this is private so will
|
||||||
|
not compile. It should match the other items so that theme migration will
|
||||||
|
switch to the correct final color. -->
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/display_topology_pane_holder"
|
android:id="@+id/display_topology_pane_holder"
|
||||||
android:importantForAccessibility="no"
|
android:importantForAccessibility="no"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:paddingHorizontal="@dimen/display_topology_pane_margin"
|
android:layout_marginVertical="@dimen/display_topology_pane_vertical_margin"
|
||||||
|
android:layout_marginHorizontal="@dimen/display_topology_pane_margin"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
<ImageView
|
<ImageView
|
||||||
android:importantForAccessibility="no"
|
android:importantForAccessibility="no"
|
||||||
|
@@ -552,6 +552,7 @@
|
|||||||
|
|
||||||
<!-- Connected displays -->
|
<!-- Connected displays -->
|
||||||
<dimen name="display_topology_pane_margin">24dp</dimen>
|
<dimen name="display_topology_pane_margin">24dp</dimen>
|
||||||
|
<dimen name="display_topology_pane_vertical_margin">24dp</dimen>
|
||||||
<dimen name="display_block_padding">5dp</dimen>
|
<dimen name="display_block_padding">5dp</dimen>
|
||||||
<dimen name="display_block_highlight_width">2dp</dimen>
|
<dimen name="display_block_highlight_width">2dp</dimen>
|
||||||
<dimen name="display_block_corner_radius">10dp</dimen>
|
<dimen name="display_block_corner_radius">10dp</dimen>
|
||||||
|
@@ -16,9 +16,10 @@
|
|||||||
|
|
||||||
package com.android.settings.connecteddevice.display
|
package com.android.settings.connecteddevice.display
|
||||||
|
|
||||||
import android.app.WallpaperManager
|
|
||||||
import com.android.settings.R
|
import com.android.settings.R
|
||||||
|
import com.android.settingslib.widget.GroupSectionDividerMixin
|
||||||
|
|
||||||
|
import android.app.WallpaperManager
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.graphics.PointF
|
import android.graphics.PointF
|
||||||
@@ -45,7 +46,7 @@ import kotlin.math.abs
|
|||||||
* when there is one or more extended display attached.
|
* when there is one or more extended display attached.
|
||||||
*/
|
*/
|
||||||
class DisplayTopologyPreference(context : Context)
|
class DisplayTopologyPreference(context : Context)
|
||||||
: Preference(context), ViewTreeObserver.OnGlobalLayoutListener {
|
: Preference(context), ViewTreeObserver.OnGlobalLayoutListener, GroupSectionDividerMixin {
|
||||||
@VisibleForTesting lateinit var mPaneContent : FrameLayout
|
@VisibleForTesting lateinit var mPaneContent : FrameLayout
|
||||||
@VisibleForTesting lateinit var mPaneHolder : FrameLayout
|
@VisibleForTesting lateinit var mPaneHolder : FrameLayout
|
||||||
@VisibleForTesting lateinit var mTopologyHint : TextView
|
@VisibleForTesting lateinit var mTopologyHint : TextView
|
||||||
@@ -82,6 +83,8 @@ class DisplayTopologyPreference(context : Context)
|
|||||||
|
|
||||||
isPersistent = false
|
isPersistent = false
|
||||||
|
|
||||||
|
isCopyingEnabled = false
|
||||||
|
|
||||||
injector = Injector(context)
|
injector = Injector(context)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user