Swipe Button Trigger works on iOS and not Android

6 posts, 0 answers
  1. Trevor
    Trevor avatar
    22 posts
    Member since:
    Feb 2017

    Posted 02 Nov Link to this post

    I have a swipe button that is connected to a clicked trigger to change the text and button. On iOS it only changes the color and text of the specific button that was pressed. On Android, it changes all of the buttons colors and text. This is how I have the trigger setup:

    <Button.Triggers>
        <EventTrigger Event="Clicked">
            <local:TasksButtonTriggerAction />
        </EventTrigger>
    </Button.Triggers>

     

    And this is the TasksButtonTriggerAction implementation:

    public class TasksButtonTriggerAction : TriggerAction<Button>
        {
            protected override void Invoke(Button sender)
            {
                if (sender.Text.ToLower() == "start")
                {
                    sender.BackgroundColor = Color.Red;
                    sender.Text = "Complete";
                    sender.TextColor = Color.White;
                }
                else
                {
                    sender.BackgroundColor = Color.FromHex("#80BD01");
                    sender.Text = "Start";
                    sender.TextColor = Color.FromHex("#15315A");
                }
                 
            }
        }

     

  2. Trevor
    Trevor avatar
    22 posts
    Member since:
    Feb 2017

    Posted 02 Nov in reply to Trevor Link to this post

    The Trigger should only change the text and color of Button that was pressed, and not all of them. I am not sure if this is an Telerik UI or Xamarin.Forms issue
  3. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    559 posts

    Posted 07 Nov Link to this post

    Hi, Trevor,

    I am not sure of your exact scenario and how it related to the controls from the Telerik UI for Xamarin suite, however, it seems like a more general issue with styling the buttons. Anyway, I tried reproducing it but could not in a sample from my end. Please have a look at the attached sample.

    Regards,
    Stefan Nenchev
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  4. Trevor
    Trevor avatar
    22 posts
    Member since:
    Feb 2017

    Posted 07 Nov in reply to Stefan Nenchev Link to this post

    I still see the error in your sample. I tried on a Genymotion emulator and real device. If you swipe the first cell, tap it, then swipe the second cell, only the first cell should say complete, but in reality they both say complete. And if you go even further down the list, you will realize they all say complete. This does not happen on iOS. Also, I tested this functionality on a Xamarin.Forms ListView, and this did not happen. So I am lead to believe it is a potential RadListView issue and how Android renders cells. I did not do anything to the project, just opened it, added the latest Telerik UI for Xamarin Nuget package, and ran it. Here is a video of what I am seeing
  5. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    559 posts

    Posted 10 Nov Link to this post

    Hi, Trevor,

    Thank you for the clarification. Indeed, I was able to reproduce the issue. We will need some more time to investigate the behavior and get more information on what might be causing it. I will update the thread once we have such information.

    Regards,
    Stefan Nenchev
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    559 posts

    Posted 21 Nov Link to this post

    Hi, Trevor,

    Thank you for your patience. Unfortunately, we could not easily identify the reason behind the behavior so I have logged it as a bug report at our end. You can track its progress on the following link from our Ideas & Feedback portal - ListView: [Android]Changing SwipeContent of one item affects the content of all items within the RadListView. Please subscribe to the item by following it in order to receive automatic notifications. I have also added some points to your account for bringing up the issue.

    Have a great rest of the week. 

    Regards,
    Stefan Nenchev
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top