-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Diffs= dde676085 Fix libjpg on Mac Sonoma (#7329) e0a786c90 Runtime API for Nested Inputs (#7316) Co-authored-by: Gordon Hayes <[email protected]> Co-authored-by: Philip Chung <[email protected]>
- Loading branch information
1 parent
b9ea052
commit a89a447
Showing
13 changed files
with
210 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
b96bea79bda334c8ce25f91727d47aa0394304b2 | ||
dde676085908d492af545660cbbb19ee0d10d91d |
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 |
---|---|---|
@@ -1 +1 @@ | ||
13410e662550cd7ffd9c568d3880c3325f953314 | ||
f1ec43c82b136c33edfd71ec9759249d9fb5b182 |
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
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
37 changes: 37 additions & 0 deletions
37
app/src/main/java/app/rive/runtime/example/NestedInputActivity.kt
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,37 @@ | ||
package app.rive.runtime.example | ||
|
||
import android.os.Bundle | ||
import android.view.View | ||
import android.widget.RadioButton | ||
import androidx.appcompat.app.AppCompatActivity | ||
import app.rive.runtime.kotlin.RiveAnimationView | ||
|
||
class NestedInputActivity : AppCompatActivity() { | ||
|
||
private val animationView by lazy(LazyThreadSafetyMode.NONE) { | ||
findViewById<RiveAnimationView>(R.id.nested_input) | ||
} | ||
|
||
fun onSetInput(view: View) { | ||
if (view is RadioButton && view.isChecked) { | ||
// Check which radio button was clicked | ||
when (view.getId()) { | ||
|
||
R.id.outer_circle_on -> | ||
animationView.setBooleanStateAtPath("CircleOuterState", true, "CircleOuter") | ||
R.id.outer_circle_off -> | ||
animationView.setBooleanStateAtPath("CircleOuterState", false, "CircleOuter") | ||
R.id.inner_circle_on -> | ||
animationView.setBooleanStateAtPath("CircleInnerState", true, "CircleOuter/CircleInner") | ||
R.id.inner_circle_off -> | ||
animationView.setBooleanStateAtPath("CircleInnerState", false, "CircleOuter/CircleInner") | ||
|
||
} | ||
} | ||
} | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.nested_input) | ||
} | ||
} |
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
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,60 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".MainActivity"> | ||
|
||
<LinearLayout | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:orientation="vertical" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent"> | ||
|
||
<app.rive.runtime.kotlin.RiveAnimationView | ||
android:id="@+id/nested_input" | ||
android:layout_width="match_parent" | ||
android:layout_height="400dp" | ||
app:riveResource="@raw/runtime_nested_inputs" | ||
app:riveStateMachine="MainStateMachine" /> | ||
|
||
<RadioGroup xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
|
||
android:orientation="vertical"> | ||
|
||
<RadioButton | ||
android:id="@+id/outer_circle_on" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:onClick="onSetInput" | ||
android:text="Outer Circle on" /> | ||
|
||
<RadioButton | ||
android:id="@+id/outer_circle_off" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:onClick="onSetInput" | ||
android:text="Outer Circle off" /> | ||
|
||
<RadioButton | ||
android:id="@+id/inner_circle_on" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:onClick="onSetInput" | ||
android:text="Inner Circle on" /> | ||
|
||
<RadioButton | ||
android:id="@+id/inner_circle_off" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:onClick="onSetInput" | ||
android:text="Inner Circle off" /> | ||
|
||
</RadioGroup> | ||
</LinearLayout> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> |
Binary file not shown.
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
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
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
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
Submodule rive-cpp
updated
from 3f9e94 to 41a693