flexbutton icon indicating copy to clipboard operation
flexbutton copied to clipboard

Image stays dark after pressed

Open SmatchyLaPaglia opened this issue 6 years ago • 3 comments

Describe the bug When an image is used, and the button is pressed, the image darkens to show the button is being pressed, but the image stays darkened after the press is lifted.

To Reproduce Steps to reproduce the behavior: Using Visual Studio for Mac, Community edition, 7.8.3 build 2. Can be seen using this simple Forms code:

XAML:

<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns ="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="Tests.TestFlexButtonIcon"
             xmlns:flex          ="clr-namespace:Flex.Controls;assembly=Flex">
            <flex:FlexButton                              
        x:Name="testButton"
        BackgroundColor="Green"
                             Padding="0"
                             WidthRequest            ="70"
                             HeightRequest           ="70"
                             HorizontalOptions       ="Center"
                             VerticalOptions         ="Center"
                             />
</ContentPage>

Code-behind:

using System.Reflection;
using Xamarin.Forms;

namespace Tests
{
    public partial class TestFlexButtonIcon : ContentPage
    {
        public TestFlexButtonIcon()
        {
            InitializeComponent();
            testButton.Icon =  ImageSource.FromResource("Test.flowerTest.jpg", typeof(TestFlexButtonIcon).GetTypeInfo().Assembly);
        }
    }
}

Expected behavior The image should return to its normal state after the press on the button ends.

Please complete the following information:

  • Which version of the FlexButton do you use? 0.9.1

  • Which version of Xamarin.Forms do you use? 3.6.0.264807

  • Which OS are you talking about? Mac OS development platform, running on iOS simulator (as well as on iPhone 6S physical device)

SmatchyLaPaglia avatar Mar 24 '19 15:03 SmatchyLaPaglia

Btw my current workaround is to re-define the icon property every time the button is pressed. Works ok.

SmatchyLaPaglia avatar Mar 25 '19 15:03 SmatchyLaPaglia

Yeah, the same happens when running on an Android from a Windows machine

NickeManarin avatar May 02 '19 19:05 NickeManarin

Can't really reproduce and don't 100% understand the issue. Could you provide a sample project for me to reproduce, please?

robinmanuelthiel avatar Dec 21 '20 21:12 robinmanuelthiel