Bug 23337 - [Android] Entry Placeholder & Text shifts up in Modal on Focus
Summary: [Android] Entry Placeholder & Text shifts up in Modal on Focus
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.3
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-09-24 09:54 UTC by Chris Riesgo
Modified: 2016-03-16 12:42 UTC (History)
5 users (show)

Tags: android modal visual entry ac
Is this bug a regression?: ---
Last known good build:


Attachments
Repro Project (66 bytes, text/plain)
2014-09-24 09:55 UTC, Chris Riesgo
Details
Entry control before gaining focus (81.68 KB, image/png)
2014-09-24 10:02 UTC, Chris Riesgo
Details
Entry control after gaining focus (81.73 KB, image/png)
2014-09-24 10:02 UTC, Chris Riesgo
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Chris Riesgo 2014-09-24 09:54:25 UTC
Given:
- ANDROID ONLY
- Xamarin.Forms Shared Libraries project
- Android Xamarin.Forms package 1.2.3.6255-pre3
- Android project using X.F Shared Libraries
- Testing on Genymotion Nexus 5 API 19 (but elsewhere also)

App Structure:
- MainActivity content is set to a new NavigationPage(page)
- NavigationPage.SetHasNavigationBar(page, false) is set
- OnResume of MainActivity, a modal page is pushed to the Navigation Stack
- An Entry control on the modal page is displayed
- Upon tapping into the Entry control, the Placeholder text shifts upward
- Once you begin entering text, the text shifts back to its expected location
- In other tests, causing an Alert dialog to appear causes the text to shift back upward

The main issue seems to be that the Entry control's Placeholder text shifts, but only when on a page that is displayed modally. This is an Android-specific issue.

If you comment out the following line in App.cs, the "issue" goes away, but then some functionality is lost:
NavigationPage.SetHasNavigationBar(page, false);
Comment 1 Chris Riesgo 2014-09-24 09:55:25 UTC
Created attachment 8169 [details]
Repro Project
Comment 2 Chris Riesgo 2014-09-24 10:02:11 UTC
Created attachment 8170 [details]
Entry control before gaining focus
Comment 3 Chris Riesgo 2014-09-24 10:02:34 UTC
Created attachment 8171 [details]
Entry control after gaining focus
Comment 4 Jason Smith [MSFT] 2014-09-24 14:07:25 UTC
This is new to 1.2.3-pre3 for you?
Comment 5 Chris Riesgo 2014-09-24 14:38:37 UTC
I believe this is new to 1.2.3-pre3. We were running pre2, I upgraded, then saw this behavior. I couldn't find pre2 in NuGet -- I was going to try rolling back to double check.
Comment 6 Udham Singh 2014-09-25 07:26:58 UTC
I have checked this issue with the help of instructions provided in bug description and observed the same behaviour mentioned in bug description. To reproduce this issue I have followed the steps mentioned below:

1. Download the 'Repro Project' provided in comment 1.
2. Open project 'XF_EntryTextShift' in XS and run this.
3. Click into the Entry control and Placeholder text shifts upward for a very small moment(< 1 sec).
4. Open file 'App.cs' and comment line "NavigationPage.SetHasNavigationBar(page, false);".
5. Run the application and issue goes away (Entry control placeholder text shifts upward).

Screencast : http://screencast.com/t/8jYMCbRyBv51

Environment Info :

=== Xamarin Studio ===

Version 5.4 (build 240)
Installation UUID: ce927b2a-2c07-44c5-b186-09cfdafba6dc
Runtime:
	Mono 3.8.0 ((no/45d0ba1)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 308000009

=== Xamarin.Android ===

Version: 4.16.0 (Business Edition)
Android SDK: /Users/xamarin76/Desktop/android-sdk-macosx
	Supported Android versions:
		1.6    (API level 4)
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.0    (API level 11)
		3.1    (API level 12)
		3.2    (API level 13)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		4.5    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Apple Developer Tools ===

Xcode 6.0.1 (6528)
Build 6A317

=== Build Information ===

Release ID: 504000240
Git revision: 01786bc67c7024ec33d327ed27e4416d7a846f4e
Build date: 2014-09-17 10:58:48-04
Xamarin addins: 7cd7dfcd6b7b7b53281508954ec080f1cd153ad3

=== Operating System ===

Mac OS X 10.9.4
Darwin Xamarin76s-Mac-mini.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Comment 7 Jason Smith [MSFT] 2016-03-16 12:42:43 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we no longer believe it affects the current version of Xamarin.Forms. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.
 
For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d

Warm regards,
Xamarin Forms Team