Bug 42351 - Xamarin Forms Button shows differently on Android when ButtonRenderer is used
Summary: Xamarin Forms Button shows differently on Android when ButtonRenderer is used
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.1
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-07-05 04:12 UTC by Max Chu
Modified: 2016-10-12 01:59 UTC (History)
3 users (show)

Tags: ac
Is this bug a regression?: No
Last known good build:

Result shown (155.31 KB, image/png)
2016-07-05 04:12 UTC, Max Chu

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 for Bug 42351 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Max Chu 2016-07-05 04:12:40 UTC
Created attachment 16569 [details]
Result shown

The size and text of button in Android will be larger than the normal button if user defined ButtonRenderer is used.

**Steps to Reproduce:**
You can use my Code on https://github.com/maxchu92/Xamarin.Forms-Button-Renderer-Bug
1. Create a new Portable project with Xamarin.Forms v2.3.0.107
2. Apply Material Theme and FormsAppCompatActivity to Android.
3. Create a page with buttons
4. Create an empty ButtonRenderer

**Actual Results:**
The size and text of the button is incorrect even if nothing is defined in ButtonRenderer.

**Expected Results:**
Button should displayed as the same as button without using user defined ButtonRenderer

**Build Date & Platform:**
- 5th July 2016 (GMT+8)
- Android 4.4.4

**Additional Information:**
- Tested on Xamarin.Forms v2.3.0.107 & v2.1.0.6529
- Used Material AppCompat Theme
Comment 1 adrianknight89 2016-10-12 01:59:26 UTC
You probably shouldn't compare different texts. Android might be doing auto-resizing to fit contents within the bounding region. When I ran your repro with "CustomButton" or "Button" on all four buttons, everything looked the same.