dotnet / dotnet/maui

Some Android Emulator "devices" report incorrect Window.VisualDiagnosticsOverlay.Density

Open
#8,742 8 comments 0 reactions 0 assignees View on GitHub
area-tooling partner/ui-tools platform/android s/move-to-vs-feedback s/triaged s/verified t/bug
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 15h
Merged PRs (30d)
290

Description

### Description

Selecting elements (or "hit testing" them to be more exact) in XAML Live Preview is off on Pixel 3a XL, but okay on Pixel 5A.

### Steps to Reproduce

1. Open attached project.
2. Build.
3. Deploy on Android Emulator > Pixel 3a XL API 30.
**Actual**: reported density is 2.5
**Expected**: reported density close to 1.9
**Note 1**: selecting elements in XAML Live Preview (XLP) is clearly off; changing density under debugger from 2.5 to 1.9 makes XLP happy
**Note 2**: other "devices" (like Pixel 5 API 30) report correct density
[MauiApp19.zip](https://github.com/dotnet/maui/files/9114447/MauiApp19.zip)

![image](https://user-images.githubusercontent.com/48451158/179058367-932e4243-9cf8-4353-9e66-a8c6ef96b14a.png)

### Version with bug

6.0.400

### Last version that worked well

Unknown/Other

### Affected platforms

Android

### Affected platform versions

not sure

### Did you find any workaround?

_No response_

### Relevant log output

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by opening the attached MauiApp19.zip project, deploying it to the Pixel 3a XL API 30 emulator, and observing Window.VisualDiagnosticsOverlay.Density during XAML Live Preview hit testing. Compare the reported density with the Pixel 5A or Pixel 5 API 30, and verify that element selection aligns after the incorrect-density case is addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.