-
Notifications
You must be signed in to change notification settings - Fork 559
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Android] Add RichTextBlocks support (#2546)
* Add working version without select actions * [Shared] Add select action to text runs * Add support for select action in TextRun * Check select action working correctly * Fix comments * Remove unused swig files
- Loading branch information
1 parent
0b76208
commit c3ecb2f
Showing
15 changed files
with
1,639 additions
and
267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,110 changes: 937 additions & 173 deletions
1,110
source/android/adaptivecards/src/main/cpp/objectmodel_wrap.cpp
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
148 changes: 148 additions & 0 deletions
148
source/android/adaptivecards/src/main/java/io/adaptivecards/objectmodel/InlineVector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
/* ---------------------------------------------------------------------------- | ||
* This file was automatically generated by SWIG (http://www.swig.org). | ||
* Version 4.0.0 | ||
* | ||
* Do not make changes to this file unless you know what you are doing--modify | ||
* the SWIG interface file instead. | ||
* ----------------------------------------------------------------------------- */ | ||
|
||
package io.adaptivecards.objectmodel; | ||
|
||
public class InlineVector extends java.util.AbstractList<Inline> implements java.util.RandomAccess { | ||
private transient long swigCPtr; | ||
protected transient boolean swigCMemOwn; | ||
|
||
protected InlineVector(long cPtr, boolean cMemoryOwn) { | ||
swigCMemOwn = cMemoryOwn; | ||
swigCPtr = cPtr; | ||
} | ||
|
||
protected static long getCPtr(InlineVector obj) { | ||
return (obj == null) ? 0 : obj.swigCPtr; | ||
} | ||
|
||
protected void finalize() { | ||
delete(); | ||
} | ||
|
||
public synchronized void delete() { | ||
if (swigCPtr != 0) { | ||
if (swigCMemOwn) { | ||
swigCMemOwn = false; | ||
AdaptiveCardObjectModelJNI.delete_InlineVector(swigCPtr); | ||
} | ||
swigCPtr = 0; | ||
} | ||
} | ||
|
||
public InlineVector(Inline[] initialElements) { | ||
this(); | ||
for (Inline element : initialElements) { | ||
add(element); | ||
} | ||
} | ||
|
||
public InlineVector(Iterable<Inline> initialElements) { | ||
this(); | ||
for (Inline element : initialElements) { | ||
add(element); | ||
} | ||
} | ||
|
||
public Inline get(int index) { | ||
return doGet(index); | ||
} | ||
|
||
public Inline set(int index, Inline e) { | ||
return doSet(index, e); | ||
} | ||
|
||
public boolean add(Inline e) { | ||
modCount++; | ||
doAdd(e); | ||
return true; | ||
} | ||
|
||
public void add(int index, Inline e) { | ||
modCount++; | ||
doAdd(index, e); | ||
} | ||
|
||
public Inline remove(int index) { | ||
modCount++; | ||
return doRemove(index); | ||
} | ||
|
||
protected void removeRange(int fromIndex, int toIndex) { | ||
modCount++; | ||
doRemoveRange(fromIndex, toIndex); | ||
} | ||
|
||
public int size() { | ||
return doSize(); | ||
} | ||
|
||
public InlineVector() { | ||
this(AdaptiveCardObjectModelJNI.new_InlineVector__SWIG_0(), true); | ||
} | ||
|
||
public InlineVector(InlineVector other) { | ||
this(AdaptiveCardObjectModelJNI.new_InlineVector__SWIG_1(InlineVector.getCPtr(other), other), true); | ||
} | ||
|
||
public long capacity() { | ||
return AdaptiveCardObjectModelJNI.InlineVector_capacity(swigCPtr, this); | ||
} | ||
|
||
public void reserve(long n) { | ||
AdaptiveCardObjectModelJNI.InlineVector_reserve(swigCPtr, this, n); | ||
} | ||
|
||
public boolean isEmpty() { | ||
return AdaptiveCardObjectModelJNI.InlineVector_isEmpty(swigCPtr, this); | ||
} | ||
|
||
public void clear() { | ||
AdaptiveCardObjectModelJNI.InlineVector_clear(swigCPtr, this); | ||
} | ||
|
||
public InlineVector(int count) { | ||
this(AdaptiveCardObjectModelJNI.new_InlineVector__SWIG_2(count), true); | ||
} | ||
|
||
public InlineVector(int count, Inline value) { | ||
this(AdaptiveCardObjectModelJNI.new_InlineVector__SWIG_3(count, Inline.getCPtr(value), value), true); | ||
} | ||
|
||
private int doSize() { | ||
return AdaptiveCardObjectModelJNI.InlineVector_doSize(swigCPtr, this); | ||
} | ||
|
||
private void doAdd(Inline value) { | ||
AdaptiveCardObjectModelJNI.InlineVector_doAdd__SWIG_0(swigCPtr, this, Inline.getCPtr(value), value); | ||
} | ||
|
||
private void doAdd(int index, Inline value) { | ||
AdaptiveCardObjectModelJNI.InlineVector_doAdd__SWIG_1(swigCPtr, this, index, Inline.getCPtr(value), value); | ||
} | ||
|
||
private Inline doRemove(int index) { | ||
long cPtr = AdaptiveCardObjectModelJNI.InlineVector_doRemove(swigCPtr, this, index); | ||
return (cPtr == 0) ? null : new Inline(cPtr, true); | ||
} | ||
|
||
private Inline doGet(int index) { | ||
long cPtr = AdaptiveCardObjectModelJNI.InlineVector_doGet(swigCPtr, this, index); | ||
return (cPtr == 0) ? null : new Inline(cPtr, true); | ||
} | ||
|
||
private Inline doSet(int index, Inline value) { | ||
long cPtr = AdaptiveCardObjectModelJNI.InlineVector_doSet(swigCPtr, this, index, Inline.getCPtr(value), value); | ||
return (cPtr == 0) ? null : new Inline(cPtr, true); | ||
} | ||
|
||
private void doRemoveRange(int fromIndex, int toIndex) { | ||
AdaptiveCardObjectModelJNI.InlineVector_doRemoveRange(swigCPtr, this, fromIndex, toIndex); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
148 changes: 148 additions & 0 deletions
148
source/android/adaptivecards/src/main/java/io/adaptivecards/objectmodel/ParagraphVector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
/* ---------------------------------------------------------------------------- | ||
* This file was automatically generated by SWIG (http://www.swig.org). | ||
* Version 4.0.0 | ||
* | ||
* Do not make changes to this file unless you know what you are doing--modify | ||
* the SWIG interface file instead. | ||
* ----------------------------------------------------------------------------- */ | ||
|
||
package io.adaptivecards.objectmodel; | ||
|
||
public class ParagraphVector extends java.util.AbstractList<Paragraph> implements java.util.RandomAccess { | ||
private transient long swigCPtr; | ||
protected transient boolean swigCMemOwn; | ||
|
||
protected ParagraphVector(long cPtr, boolean cMemoryOwn) { | ||
swigCMemOwn = cMemoryOwn; | ||
swigCPtr = cPtr; | ||
} | ||
|
||
protected static long getCPtr(ParagraphVector obj) { | ||
return (obj == null) ? 0 : obj.swigCPtr; | ||
} | ||
|
||
protected void finalize() { | ||
delete(); | ||
} | ||
|
||
public synchronized void delete() { | ||
if (swigCPtr != 0) { | ||
if (swigCMemOwn) { | ||
swigCMemOwn = false; | ||
AdaptiveCardObjectModelJNI.delete_ParagraphVector(swigCPtr); | ||
} | ||
swigCPtr = 0; | ||
} | ||
} | ||
|
||
public ParagraphVector(Paragraph[] initialElements) { | ||
this(); | ||
for (Paragraph element : initialElements) { | ||
add(element); | ||
} | ||
} | ||
|
||
public ParagraphVector(Iterable<Paragraph> initialElements) { | ||
this(); | ||
for (Paragraph element : initialElements) { | ||
add(element); | ||
} | ||
} | ||
|
||
public Paragraph get(int index) { | ||
return doGet(index); | ||
} | ||
|
||
public Paragraph set(int index, Paragraph e) { | ||
return doSet(index, e); | ||
} | ||
|
||
public boolean add(Paragraph e) { | ||
modCount++; | ||
doAdd(e); | ||
return true; | ||
} | ||
|
||
public void add(int index, Paragraph e) { | ||
modCount++; | ||
doAdd(index, e); | ||
} | ||
|
||
public Paragraph remove(int index) { | ||
modCount++; | ||
return doRemove(index); | ||
} | ||
|
||
protected void removeRange(int fromIndex, int toIndex) { | ||
modCount++; | ||
doRemoveRange(fromIndex, toIndex); | ||
} | ||
|
||
public int size() { | ||
return doSize(); | ||
} | ||
|
||
public ParagraphVector() { | ||
this(AdaptiveCardObjectModelJNI.new_ParagraphVector__SWIG_0(), true); | ||
} | ||
|
||
public ParagraphVector(ParagraphVector other) { | ||
this(AdaptiveCardObjectModelJNI.new_ParagraphVector__SWIG_1(ParagraphVector.getCPtr(other), other), true); | ||
} | ||
|
||
public long capacity() { | ||
return AdaptiveCardObjectModelJNI.ParagraphVector_capacity(swigCPtr, this); | ||
} | ||
|
||
public void reserve(long n) { | ||
AdaptiveCardObjectModelJNI.ParagraphVector_reserve(swigCPtr, this, n); | ||
} | ||
|
||
public boolean isEmpty() { | ||
return AdaptiveCardObjectModelJNI.ParagraphVector_isEmpty(swigCPtr, this); | ||
} | ||
|
||
public void clear() { | ||
AdaptiveCardObjectModelJNI.ParagraphVector_clear(swigCPtr, this); | ||
} | ||
|
||
public ParagraphVector(int count) { | ||
this(AdaptiveCardObjectModelJNI.new_ParagraphVector__SWIG_2(count), true); | ||
} | ||
|
||
public ParagraphVector(int count, Paragraph value) { | ||
this(AdaptiveCardObjectModelJNI.new_ParagraphVector__SWIG_3(count, Paragraph.getCPtr(value), value), true); | ||
} | ||
|
||
private int doSize() { | ||
return AdaptiveCardObjectModelJNI.ParagraphVector_doSize(swigCPtr, this); | ||
} | ||
|
||
private void doAdd(Paragraph value) { | ||
AdaptiveCardObjectModelJNI.ParagraphVector_doAdd__SWIG_0(swigCPtr, this, Paragraph.getCPtr(value), value); | ||
} | ||
|
||
private void doAdd(int index, Paragraph value) { | ||
AdaptiveCardObjectModelJNI.ParagraphVector_doAdd__SWIG_1(swigCPtr, this, index, Paragraph.getCPtr(value), value); | ||
} | ||
|
||
private Paragraph doRemove(int index) { | ||
long cPtr = AdaptiveCardObjectModelJNI.ParagraphVector_doRemove(swigCPtr, this, index); | ||
return (cPtr == 0) ? null : new Paragraph(cPtr, true); | ||
} | ||
|
||
private Paragraph doGet(int index) { | ||
long cPtr = AdaptiveCardObjectModelJNI.ParagraphVector_doGet(swigCPtr, this, index); | ||
return (cPtr == 0) ? null : new Paragraph(cPtr, true); | ||
} | ||
|
||
private Paragraph doSet(int index, Paragraph value) { | ||
long cPtr = AdaptiveCardObjectModelJNI.ParagraphVector_doSet(swigCPtr, this, index, Paragraph.getCPtr(value), value); | ||
return (cPtr == 0) ? null : new Paragraph(cPtr, true); | ||
} | ||
|
||
private void doRemoveRange(int fromIndex, int toIndex) { | ||
AdaptiveCardObjectModelJNI.ParagraphVector_doRemoveRange(swigCPtr, this, fromIndex, toIndex); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.