Bug 27806 - Control not adding text or drawables for custom renderer
Summary: Control not adding text or drawables for custom renderer
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-03-09 22:11 UTC by Paul Johnson
Modified: 2015-05-27 20:09 UTC (History)
5 users (show)

Tags: android customrenderer
Is this bug a regression?: ---
Last known good build:


Attachments
Archive showing the issue (183.85 KB, application/zip)
2015-03-09 22:11 UTC, Paul Johnson
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 ANSWERED

Description Paul Johnson 2015-03-09 22:11:00 UTC
Created attachment 10237 [details]
Archive showing the issue

The attached source demonstrates an issue with Xam.Forms and Android. The custom renderer is called as it should, but the Text property is not being set or the composite drawables added. If I remove the background, the text and drawables still do not show.

=== Xamarin Studio ===

Version 5.7.2 (build 7)
Installation UUID: f3d1a29c-1ba2-4a83-a193-1087efe91a85
Runtime:
	Mono 3.12.1 ((detached/b7764aa)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312010000

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

Version: 8.6.3.3 (Business Edition)
Hash: 90e32d0
Branch: 
Build date: 2015-03-06 12:27:17-0500

=== Xamarin.Android ===

Version: 4.20.0.37 (Business Edition)
Android SDK: /Users/PFJ/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		1.6    (API level 4)
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		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)
		5.0    (API level 21)
Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

=== Xamarin.Mac ===

Version: 1.12.0.8 (Business Edition)

=== Build Information ===

Release ID: 507020007
Git revision: dcf3f486177d3e625349b51a8f3be807e3fa7712
Build date: 2015-02-24 09:14:27-05
Xamarin addins: ea7c65bb7876e4a876ab365208e94acdf8f330ef

=== Operating System ===

Mac OS X 10.10.3
Darwin Pauls-iMac.local 14.3.0 Darwin Kernel Version 14.3.0
    Thu Feb 12 18:38:33 PST 2015
    root:xnu-2782.20.34~3/RELEASE_X86_64 x86_64
Comment 1 Abhishek 2015-03-11 11:36:27 UTC
I have tried this issue and able to reproduce the reported behavior at my end.

Steps To Reproduce:
1. Download the attach application.
2. Run the application on Emulator.
3. Login Page appear having two button one for login and another one without having text.

Note: The custom renderer is called, but the Text property is not being set or the composite drawables is not added. If I remove the background, the text and drawables still do not show.

Screencast: http://www.screencast.com/t/SWKUOZNt3
Android Device Log: https://gist.github.com/AkhileshKumar01/ef54bc9f63eccf4ac375
Application Output: https://gist.github.com/AkhileshKumar01/f3a484112de0d0a7971c
Build Output: https://gist.github.com/AkhileshKumar01/8f9e0aaa1515ff188b76
IDE Log:  https://gist.github.com/AkhileshKumar01/f49598377a79410b43a5

Build Info:

Xamarin.Forms: 1.4.0.6341
Xamarin.Forms: 1.4.1.6342-pre2

=== Xamarin Studio ===

Version 5.9 (build 171)
Installation UUID: 93e693b0-b53d-40f4-b29c-b61ff5cbe892
Runtime:
	Mono 4.0.0 ((detached/7f27bd7)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400000049

=== Apple Developer Tools ===

Xcode 6.2 (6776)
Build 6C131e

=== Xamarin.Android ===

Version: 5.1.0.43 (Trial Edition)
Android SDK: /Users/xamarin23/Desktop/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		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)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.iOS ===

Version: 8.10.0.9 (Trial Edition)
Hash: 283a3f2
Branch: master
Build date: 2015-03-05 01:59:36-0500

=== Xamarin.Mac ===

Version: 2.0.0.9 (Trial Edition)

=== Build Information ===

Release ID: 509000171
Git revision: a953c3342b9c8aab43bd5e67119d1a3439ddcc08
Build date: 2015-03-09 12:37:56-04
Xamarin addins: 76a6f0bdd3cecbf0960abefe1ce18661729ec693

=== Operating System ===

Mac OS X 10.10.0
Darwin 800BC.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 2 Jason Smith [MSFT] 2015-05-27 20:09:52 UTC
The renderer you are overriding is competing with your changes and this is resulting in the behavior you see. You may wish to replace the ButtonRenderer with an entirely custom renderer derived from ViewRenderer