feat(android): add parity for BlurView API, move iOS to Ti.UI namespace#14277
feat(android): add parity for BlurView API, move iOS to Ti.UI namespace#14277hansemannn wants to merge 12 commits intotidev:mainfrom
Conversation
android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIBlurView.java
Outdated
Show resolved
Hide resolved
|
@m1ga iOS is now also moved over - we have the unique chance to do deprecate the old one in 13.0.0, so I will restore the Ti.UI.iOS.BlurView deprecate it in 13.0.0 and then we can remove it in 14.0.0 |
Co-authored-by: Michael Gangolf <m1ga@users.noreply.github.com>
| <attr name="ti_footerTitleColor" format="color" /> | ||
| <attr name="ti_footerTitleBackground" format="reference" /> | ||
| <attr name="ti_footerTitleBackgroundColor" format="color" /> | ||
| <declare-styleable name="BlurView"> |
There was a problem hiding this comment.
prefix with Ti to prevent clashes with other libs
| <attr name="ti_footerTitleBackground" format="reference" /> | ||
| <attr name="ti_footerTitleBackgroundColor" format="color" /> | ||
| <declare-styleable name="BlurView"> | ||
| <attr name="blurOverlayColor" format="color"/> |
There was a problem hiding this comment.
| <attr name="blurOverlayColor" format="color"/> | |
| <attr name="ti_blurOverlayColor" format="color" /> |
| @@ -0,0 +1,171 @@ | |||
| package eightbitlab.com.blurview; | |||
There was a problem hiding this comment.
Can you add a readme file to the package to link to the repo and explain why it's bundled like this?
| private void init(AttributeSet attrs, int defStyleAttr) | ||
| { | ||
| TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.BlurView, defStyleAttr, 0); | ||
| overlayColor = a.getColor(R.styleable.BlurView_blurOverlayColor, TRANSPARENT); |
There was a problem hiding this comment.
Should be like this then?
| overlayColor = a.getColor(R.styleable.BlurView_blurOverlayColor, TRANSPARENT); | |
| overlayColor = a.getColor(R.styleable.TiBlurView_ti_blurOverlayColor, TRANSPARENT); |
There was a problem hiding this comment.
Do we even need that in the XML? Devs should rather use the top-level APIs, making this more clean / genuine as well
|
Let's move it to a module - but not in 13.0.0 anymore, the release is big enough already. We can keep this open and I'll prepare a blur view module under tidev that has the sources of this PR bundled in one repo. Alright? |
sounds good. There we could also use the gradle module to reduce the code size if you want or this internal code setup |
As discussed in m1ga/ti.blurview#2
This pull request introduces a new cross-platform-style
BlurViewfor Android, providing a background blur effect similar to iOS'UIVisualEffectView. It adds a newTi.UI.BlurViewcomponent, exposes cross-platform blur effect constants, and updates build dependencies to support the feature. Documentation is also added for the new component and its properties.It uses
Dimezis/BlurViewfor maximized backwards compatiblity - and iOS has also moved to the same API!