Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Added Support for Chevron in UIButton#4222

Merged
jwoo-msft merged 7 commits into
mainfrom
jwoo/ios-actionbutton-update
Jun 30, 2020
Merged

Added Support for Chevron in UIButton#4222
jwoo-msft merged 7 commits into
mainfrom
jwoo/ios-actionbutton-update

Conversation

@jwoo-msft

@jwoo-msft jwoo-msft commented Jun 25, 2020

Copy link
Copy Markdown
Member

Related Issue

Fixed #4167 for iOS

Description

  • Added support for chevron for Action.ShowCard or customizations for buttons' different states.
  • ACRButtonExpandable.xib is added.
  • ACRButtonExpandable.xib is used for Action.ShowCard. All other actions types use ACRButton.xib.
  • As one solution of many, one can add a chevron up image to default sate, and add a chevron down image to selected state.
  • spacing between the chevron and title can be adjusted by the image's left inset in the xib.
  • since iOS doesn't support text wrap in buttons, please set line break mode to "Clip", to make the horizontal scroll to work properly in case of the width overflow.
  • disclaimer: ACRButtonExpandable.xib in this PR does not contain changes for actual chevron images described in the description. Please refer to PR4221 for complete solution.

How Verified

How you verified the fix, including one or all of the following:

  1. Existing relevant unit/regression tests were run and verified.
    image
Microsoft Reviewers: Open in CodeFlow

@shalinijoshi19

Copy link
Copy Markdown

@jwoo-msft what's our story for Android? What about the other platforms? @golddove / @RebeccaAnne

<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious - how does the xib approach work again? Do they optionally get to pull this in to their source/project or something like that?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This XIB will be part of iOS SDK. Devs will need to modify this XIB to have "chevrons" for showcard buttons. I've provided such changes in the XIB as part of PR #4221 for reference.

@shalinijoshi19 shalinijoshi19 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@jwoo-msft

Copy link
Copy Markdown
Member Author

@jwoo-msft what's our story for Android? What about the other platforms? @golddove / @RebeccaAnne

@shalinijoshi19 UWP should be able to do this through XML. We need to investigate on Android if native styling approaches are feasible.

@jwoo-msft jwoo-msft merged commit 87bd1b4 into main Jun 30, 2020
@jwoo-msft jwoo-msft deleted the jwoo/ios-actionbutton-update branch June 30, 2020 03:49
jwoo-msft added a commit that referenced this pull request Jul 7, 2020
* Added xib for showcard actions

* corrected XIB usage

* fixed merge issue

* updated separator logic
@shalinijoshi19 shalinijoshi19 added this to the 20.06 milestone Jul 10, 2020
rankush pushed a commit to rankush/AdaptiveCards that referenced this pull request May 8, 2024
* Added xib for showcard actions

* corrected XIB usage

* fixed merge issue

* updated separator logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Mobile][Usability] [No Cheveron on Action.ShowCards]

6 participants