From 5e777247be7b69257b446a97d9cd3b23f2e4c644 Mon Sep 17 00:00:00 2001 From: Gary Mathews Date: Fri, 12 Mar 2021 11:39:15 -0800 Subject: [PATCH] fix(android): touchFeedback support for ListView and TableView (#12440) Fixes TIMOB-28329, TIMOB-27504 --- .../layout/titanium_ui_listview_holder.xml | 1 - .../layout/titanium_ui_tableview_holder.xml | 3 +- .../modules/titanium/ui/TableViewProxy.java | 25 ++--- .../titanium/ui/TableViewRowProxy.java | 16 +++ .../titanium/ui/widget/TiUIListView.java | 24 +++++ .../titanium/ui/widget/TiUITableView.java | 24 +++++ .../ui/widget/listview/ItemTouchHandler.java | 34 ++++++- .../ui/widget/listview/ListItemProxy.java | 9 ++ .../ui/widget/listview/ListViewHolder.java | 99 +++++++------------ .../ui/widget/listview/ListViewProxy.java | 7 +- .../widget/listview/TiRecyclerViewHolder.java | 78 ++++++++++++--- .../ui/widget/tableview/TableViewHolder.java | 99 +++++++------------ .../appcelerator/titanium/view/TiUIView.java | 6 ++ apidoc/Titanium/UI/ListView.yml | 10 ++ apidoc/Titanium/UI/TableView.yml | 10 ++ 15 files changed, 284 insertions(+), 161 deletions(-) diff --git a/android/modules/ui/res/layout/titanium_ui_listview_holder.xml b/android/modules/ui/res/layout/titanium_ui_listview_holder.xml index 93545e44b05..7ec5b689e0e 100644 --- a/android/modules/ui/res/layout/titanium_ui_listview_holder.xml +++ b/android/modules/ui/res/layout/titanium_ui_listview_holder.xml @@ -42,7 +42,6 @@ android:id="@+id/titanium_ui_listview_holder_content" android:layout_width="match_parent" android:layout_height="wrap_content" - android:foreground="?attr/selectableItemBackgroundBorderless" android:addStatesFromChildren="true"/> + android:addStatesFromChildren="true"> movePair = null; @@ -127,10 +132,33 @@ private Drawable getBackground(TiUIView parentView, boolean ignoreTransparent) while (parentNativeView != null && parentBackground == null) { parentBackground = parentNativeView.getBackground(); + if (parentBackground instanceof RippleDrawable) { + final RippleDrawable rippleDrawable = (RippleDrawable) parentBackground; + + if (rippleDrawable.getNumberOfLayers() > 0) { + final Drawable drawable = rippleDrawable.getDrawable(0); + + // Ignore masks (ShapeDrawable). + parentBackground = drawable.getClass().equals(ShapeDrawable.class) ? null : drawable; + + } else if (ignoreTransparent) { + + // No layers, ignore transparent drawable. + parentBackground = null; + } + } if (parentBackground instanceof ColorDrawable) { final ColorDrawable colorDrawable = (ColorDrawable) parentBackground; - if (ignoreTransparent && colorDrawable.getColor() == Color.TRANSPARENT) { + if (ignoreTransparent && Color.alpha(colorDrawable.getColor()) <= 0) { + + // Ignore transparent backgrounds. + parentBackground = null; + } + } else if (parentBackground instanceof PaintDrawable) { + final PaintDrawable paintDrawable = (PaintDrawable) parentBackground; + + if (ignoreTransparent && Color.alpha(paintDrawable.getPaint().getColor()) <= 0) { // Ignore transparent backgrounds. parentBackground = null; @@ -290,7 +318,9 @@ public void onChildDraw(@NonNull Canvas c, // Determine if current background is transparent. final boolean hasTransparentBackground = currentBackground == null || (currentBackground instanceof ColorDrawable - && ((ColorDrawable) currentBackground).getColor() == Color.TRANSPARENT); + && Color.alpha(((ColorDrawable) currentBackground).getColor()) <= 0) + || (currentBackground instanceof PaintDrawable + && Color.alpha(((PaintDrawable) currentBackground).getPaint().getColor()) <= 0); if (hasTransparentBackground) { final TiUIView parentView = recyclerViewProxy.getOrCreateView(); diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListItemProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListItemProxy.java index 727556843a6..ce47308ee93 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListItemProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListItemProxy.java @@ -25,6 +25,8 @@ import android.app.Activity; import android.view.View; +import androidx.annotation.NonNull; + import ti.modules.titanium.ui.UIModule; import ti.modules.titanium.ui.widget.TiView; @@ -677,5 +679,12 @@ public ItemView(TiViewProxy proxy) getLayoutParams().autoFillsWidth = true; } + + @Override + protected boolean canApplyTouchFeedback(@NonNull KrollDict props) + { + // Prevent TiUIView from overriding `touchFeedback` effect. + return false; + } } } diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewHolder.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewHolder.java index d7d84b2bb42..c4eb608a6a0 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewHolder.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewHolder.java @@ -8,25 +8,23 @@ import org.appcelerator.kroll.KrollDict; import org.appcelerator.titanium.R; -import org.appcelerator.titanium.TiApplication; import org.appcelerator.titanium.TiC; import org.appcelerator.titanium.TiDimension; import org.appcelerator.titanium.proxy.TiViewProxy; import org.appcelerator.titanium.util.TiConvert; import org.appcelerator.titanium.util.TiRHelper; import org.appcelerator.titanium.util.TiUIHelper; +import org.appcelerator.titanium.view.TiBackgroundDrawable; import org.appcelerator.titanium.view.TiCompositeLayout; import org.appcelerator.titanium.view.TiUIView; import android.app.Activity; import android.content.Context; -import android.content.res.ColorStateList; import android.content.res.Resources; -import android.content.res.TypedArray; import android.graphics.Color; +import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; -import android.graphics.drawable.RippleDrawable; -import android.graphics.drawable.StateListDrawable; +import android.graphics.drawable.PaintDrawable; import android.os.Build; import android.util.TypedValue; import android.view.View; @@ -156,20 +154,44 @@ public void bind(final ListItemProxy proxy, final boolean selected) // Obtain background drawable. Drawable backgroundDrawable = view.getBackground(); - if (backgroundDrawable == null) { + if (backgroundDrawable == null + && properties.containsKeyAndNotNull(TiC.PROPERTY_BACKGROUND_COLOR)) { backgroundDrawable = nativeView.getBackground(); } + if (backgroundDrawable instanceof TiBackgroundDrawable) { + final TiBackgroundDrawable drawable = (TiBackgroundDrawable) backgroundDrawable; + + backgroundDrawable = drawable.getBackground(); + } + + // Parse background color to determine transparency. + int backgroundColor = -1; + if (backgroundDrawable instanceof PaintDrawable) { + final PaintDrawable drawable = (PaintDrawable) backgroundDrawable; + + backgroundColor = drawable.getPaint().getColor(); + } else if (backgroundDrawable instanceof ColorDrawable) { + final ColorDrawable drawable = (ColorDrawable) backgroundDrawable; + + backgroundColor = drawable.getColor(); + } + if (Color.alpha(backgroundColor) <= 0) { + + // Do not use drawable for transparent backgrounds. + backgroundDrawable = null; + } if (parentView != null) { parentView.removeView(borderView); } - // Set ripple background. - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { + final boolean touchFeedback = listViewProperties.optBoolean(TiC.PROPERTY_TOUCH_FEEDBACK, false); + final String touchFeedbackColor = + listViewProperties.optString(TiC.PROPERTY_TOUCH_FEEDBACK_COLOR, null); - // To enable the ripple effect, we set the foreground to `selectableItemBackgroundBorderless`. - // However, this is not supported below Android 7.0 so we set the background instead. - nativeView.setBackground(generateRippleDrawable(backgroundDrawable)); + // Set ripple background. + if (touchFeedback) { + backgroundDrawable = generateRippleDrawable(backgroundDrawable, touchFeedbackColor); } // Support selected backgrounds. @@ -219,61 +241,6 @@ public void bind(final ListItemProxy proxy, final boolean selected) proxy.setHolder(this); } - /** - * Generate ripple effect drawable from specified drawable. - * TODO: Move into a utility class? - * - * @param drawable Drawable to apply ripple effect. - * @return Drawable - */ - protected Drawable generateRippleDrawable(Drawable drawable) - { - if (!(drawable instanceof RippleDrawable)) { - final int[][] rippleStates = new int[][] { new int[] { android.R.attr.state_pressed } }; - final TypedValue typedValue = new TypedValue(); - final Activity activity = TiApplication.getAppRootOrCurrentActivity(); - final TypedArray colorControlHighlight = activity.obtainStyledAttributes( - typedValue.data, new int[] { android.R.attr.colorControlHighlight }); - final int colorControlHighlightInt = colorControlHighlight.getColor(0, 0); - final int[] rippleColors = new int[] { colorControlHighlightInt }; - final ColorStateList colorStateList = new ColorStateList(rippleStates, rippleColors); - - // Create the RippleDrawable. - drawable = new RippleDrawable(colorStateList, drawable, null); - } - return drawable; - } - - /** - * Generate selected background from proxy properties. - * TODO: Move into a utility class? - * - * @param properties Dictionary containing selected background properties. - * @return Drawable - */ - protected Drawable generateSelectedDrawable(KrollDict properties, Drawable drawable) - { - if (properties.containsKeyAndNotNull(TiC.PROPERTY_SELECTED_BACKGROUND_COLOR) - || properties.containsKeyAndNotNull(TiC.PROPERTY_SELECTED_BACKGROUND_IMAGE)) { - - final StateListDrawable stateDrawable = new StateListDrawable(); - final Drawable selectedBackgroundDrawable = TiUIHelper.buildBackgroundDrawable( - properties.getString(TiC.PROPERTY_SELECTED_BACKGROUND_COLOR), - properties.getString(TiC.PROPERTY_SELECTED_BACKGROUND_IMAGE), - TiConvert.toBoolean(properties.get(TiC.PROPERTY_BACKGROUND_REPEAT), false), - null - ); - - stateDrawable.addState( - new int[] { android.R.attr.state_activated }, selectedBackgroundDrawable); - stateDrawable.addState(new int[] {}, drawable); - - return stateDrawable; - } - - return drawable; - } - /** * Reset row into nominal state. */ diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewProxy.java index 55b16eefe11..8ff105ba6c1 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewProxy.java @@ -47,7 +47,9 @@ TiC.PROPERTY_SEPARATOR_HEIGHT, TiC.PROPERTY_SEPARATOR_STYLE, TiC.PROPERTY_SHOW_VERTICAL_SCROLL_INDICATOR, - TiC.PROPERTY_TEMPLATES + TiC.PROPERTY_TEMPLATES, + TiC.PROPERTY_TOUCH_FEEDBACK, + TiC.PROPERTY_TOUCH_FEEDBACK_COLOR } ) public class ListViewProxy extends RecyclerViewProxy @@ -65,6 +67,7 @@ public ListViewProxy() defaultValues.put(TiC.PROPERTY_CASE_INSENSITIVE_SEARCH, true); defaultValues.put(TiC.PROPERTY_DEFAULT_ITEM_TEMPLATE, UIModule.LIST_ITEM_TEMPLATE_DEFAULT); defaultValues.put(TiC.PROPERTY_FAST_SCROLL, false); + defaultValues.put(TiC.PROPERTY_TOUCH_FEEDBACK, true); } /** @@ -378,7 +381,7 @@ private void processProperty(String name, Object value) if (name.equals(TiC.PROPERTY_EDITING)) { - // Update list to display drag-handles. + // Update list. update(); } } diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiRecyclerViewHolder.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiRecyclerViewHolder.java index ea59235cf6d..d29223211f4 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiRecyclerViewHolder.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiRecyclerViewHolder.java @@ -6,19 +6,30 @@ */ package ti.modules.titanium.ui.widget.listview; +import android.app.Activity; import android.content.Context; +import android.content.res.ColorStateList; import android.content.res.Resources; +import android.content.res.TypedArray; import android.graphics.Color; import android.graphics.drawable.Drawable; +import android.graphics.drawable.RippleDrawable; +import android.graphics.drawable.ShapeDrawable; +import android.graphics.drawable.StateListDrawable; import android.util.TypedValue; import android.view.ViewGroup; import androidx.recyclerview.widget.RecyclerView; +import org.appcelerator.kroll.KrollDict; import org.appcelerator.kroll.common.Log; import org.appcelerator.titanium.R; +import org.appcelerator.titanium.TiApplication; +import org.appcelerator.titanium.TiC; import org.appcelerator.titanium.proxy.TiViewProxy; +import org.appcelerator.titanium.util.TiConvert; import org.appcelerator.titanium.util.TiFileHelper; +import org.appcelerator.titanium.util.TiUIHelper; import java.lang.ref.WeakReference; @@ -36,8 +47,6 @@ public abstract class TiRecyclerViewHolder extends RecyclerView.ViewHolder protected static Resources resources; protected static TiFileHelper fileHelper; - protected static int selectableItemBackgroundId = 0; - protected WeakReference proxy; public TiRecyclerViewHolder(final Context context, final ViewGroup viewGroup) @@ -90,17 +99,6 @@ public TiRecyclerViewHolder(final Context context, final ViewGroup viewGroup) Log.w(TAG, "Drawable 'drawable.titanium_icon_drag' not found."); } } - - if (selectableItemBackgroundId == 0) { - try { - final TypedValue selectableItemBackgroundValue = new TypedValue(); - context.getTheme().resolveAttribute(android.R.attr.selectableItemBackgroundBorderless, - selectableItemBackgroundValue, true); - selectableItemBackgroundId = selectableItemBackgroundValue.resourceId; - } catch (Exception e) { - Log.w(TAG, "Drawable for default background not found."); - } - } } else { Log.w(TAG, "Could not obtain context resources instance."); } @@ -111,6 +109,60 @@ public TiRecyclerViewHolder(final Context context, final ViewGroup viewGroup) } } + /** + * Generate ripple effect drawable from specified drawable. + * + * @param drawable Drawable to apply ripple effect. + * @return Drawable + */ + protected Drawable generateRippleDrawable(Drawable drawable, String color) + { + final int[][] rippleStates = new int[][] { new int[] { } }; + final TypedValue typedValue = new TypedValue(); + final Activity activity = TiApplication.getAppCurrentActivity(); + final TypedArray colorControlHighlight = activity.obtainStyledAttributes( + typedValue.data, new int[] { android.R.attr.colorControlHighlight }); + final int colorControlHighlightInt = color != null && !color.isEmpty() + ? TiConvert.toColor(color) : colorControlHighlight.getColor(0, 0); + final int[] rippleColors = new int[] { colorControlHighlightInt }; + final ColorStateList colorStateList = new ColorStateList(rippleStates, rippleColors); + final ShapeDrawable maskDrawable = drawable == null ? new ShapeDrawable() : null; + + // Create the RippleDrawable. + drawable = new RippleDrawable(colorStateList, drawable, maskDrawable); + + return drawable; + } + + /** + * Generate selected background from proxy properties. + * + * @param properties Dictionary containing selected background properties. + * @return Drawable + */ + protected Drawable generateSelectedDrawable(KrollDict properties, Drawable drawable) + { + if (properties.containsKeyAndNotNull(TiC.PROPERTY_SELECTED_BACKGROUND_COLOR) + || properties.containsKeyAndNotNull(TiC.PROPERTY_SELECTED_BACKGROUND_IMAGE)) { + + final StateListDrawable stateDrawable = new StateListDrawable(); + final Drawable selectedBackgroundDrawable = TiUIHelper.buildBackgroundDrawable( + properties.getString(TiC.PROPERTY_SELECTED_BACKGROUND_COLOR), + properties.getString(TiC.PROPERTY_SELECTED_BACKGROUND_IMAGE), + TiConvert.toBoolean(properties.get(TiC.PROPERTY_BACKGROUND_REPEAT), false), + null + ); + + stateDrawable.addState( + new int[] { android.R.attr.state_activated }, selectedBackgroundDrawable); + stateDrawable.addState(new int[] {}, drawable); + + return stateDrawable; + } + + return drawable; + } + /** * Get current proxy assigned to holder. * diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TableViewHolder.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TableViewHolder.java index 0ca14dc3a68..17dd6a521c3 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TableViewHolder.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TableViewHolder.java @@ -8,13 +8,13 @@ import org.appcelerator.kroll.KrollDict; import org.appcelerator.titanium.R; -import org.appcelerator.titanium.TiApplication; import org.appcelerator.titanium.TiC; import org.appcelerator.titanium.TiDimension; import org.appcelerator.titanium.proxy.TiViewProxy; import org.appcelerator.titanium.util.TiConvert; import org.appcelerator.titanium.util.TiRHelper; import org.appcelerator.titanium.util.TiUIHelper; +import org.appcelerator.titanium.view.TiBackgroundDrawable; import org.appcelerator.titanium.view.TiBorderWrapperView; import org.appcelerator.titanium.view.TiCompositeLayout; import org.appcelerator.titanium.view.TiUIView; @@ -23,11 +23,10 @@ import android.content.Context; import android.content.res.ColorStateList; import android.content.res.Resources; -import android.content.res.TypedArray; import android.graphics.Color; +import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; -import android.graphics.drawable.RippleDrawable; -import android.graphics.drawable.StateListDrawable; +import android.graphics.drawable.PaintDrawable; import android.os.Build; import android.util.TypedValue; import android.view.View; @@ -263,13 +262,40 @@ public void bind(final TableViewRowProxy proxy, final boolean selected) parentView.removeView(nativeRowView); } + // Obtain background drawable. Drawable backgroundDrawable = rowView.getBackground(); + if (backgroundDrawable instanceof TiBackgroundDrawable) { + final TiBackgroundDrawable drawable = (TiBackgroundDrawable) backgroundDrawable; - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { + backgroundDrawable = drawable.getBackground(); + } + + // Parse background color to determine transparency. + int backgroundColor = -1; + if (backgroundDrawable instanceof PaintDrawable) { + final PaintDrawable drawable = (PaintDrawable) backgroundDrawable; + + backgroundColor = drawable.getPaint().getColor(); + } else if (backgroundDrawable instanceof ColorDrawable) { + final ColorDrawable drawable = (ColorDrawable) backgroundDrawable; + + backgroundColor = drawable.getColor(); + } + if (Color.alpha(backgroundColor) <= 0) { + + // Do not use drawable for transparent backgrounds. + backgroundDrawable = null; + } + + final boolean touchFeedback = tableViewProperties.optBoolean(TiC.PROPERTY_TOUCH_FEEDBACK, + properties.optBoolean(TiC.PROPERTY_TOUCH_FEEDBACK, true)); + final String touchFeedbackColor = + tableViewProperties.optString(TiC.PROPERTY_TOUCH_FEEDBACK_COLOR, + properties.optString(TiC.PROPERTY_TOUCH_FEEDBACK_COLOR, null)); - // To enable the ripple effect, we set the foreground to `selectableItemBackgroundBorderless`. - // However, this is not supported below Android 7.0 so we set the background instead. - backgroundDrawable = generateRippleDrawable(backgroundDrawable); + // Set ripple background. + if (touchFeedback) { + backgroundDrawable = generateRippleDrawable(backgroundDrawable, touchFeedbackColor); } // Set container background. @@ -277,7 +303,7 @@ public void bind(final TableViewRowProxy proxy, final boolean selected) this.container.setActivated(selected); // Remove original background as it has been set on `container`. - nativeRowView.setBackgroundColor(Color.TRANSPARENT); + nativeRowView.setBackground(null); // Allow states to bubble up for ripple effect. nativeRowView.setAddStatesFromChildren(true); @@ -351,61 +377,6 @@ public void bind(final TableViewRowProxy proxy, final boolean selected) proxy.setHolder(this); } - /** - * Generate ripple effect drawable from specified drawable. - * TODO: Move into a utility class? - * - * @param drawable Drawable to apply ripple effect. - * @return Drawable - */ - protected Drawable generateRippleDrawable(Drawable drawable) - { - if (!(drawable instanceof RippleDrawable)) { - final int[][] rippleStates = new int[][] { new int[] { android.R.attr.state_pressed } }; - final TypedValue typedValue = new TypedValue(); - final Activity activity = TiApplication.getAppRootOrCurrentActivity(); - final TypedArray colorControlHighlight = activity.obtainStyledAttributes( - typedValue.data, new int[] { android.R.attr.colorControlHighlight }); - final int colorControlHighlightInt = colorControlHighlight.getColor(0, 0); - final int[] rippleColors = new int[] { colorControlHighlightInt }; - final ColorStateList colorStateList = new ColorStateList(rippleStates, rippleColors); - - // Create the RippleDrawable. - drawable = new RippleDrawable(colorStateList, drawable, null); - } - return drawable; - } - - /** - * Generate selected background from proxy properties. - * TODO: Move into a utility class? - * - * @param properties Dictionary containing selected background properties. - * @return Drawable - */ - protected Drawable generateSelectedDrawable(KrollDict properties, Drawable drawable) - { - if (properties.containsKeyAndNotNull(TiC.PROPERTY_SELECTED_BACKGROUND_COLOR) - || properties.containsKeyAndNotNull(TiC.PROPERTY_SELECTED_BACKGROUND_IMAGE)) { - - final StateListDrawable stateDrawable = new StateListDrawable(); - final Drawable selectedBackgroundDrawable = TiUIHelper.buildBackgroundDrawable( - properties.getString(TiC.PROPERTY_SELECTED_BACKGROUND_COLOR), - properties.getString(TiC.PROPERTY_SELECTED_BACKGROUND_IMAGE), - TiConvert.toBoolean(properties.get(TiC.PROPERTY_BACKGROUND_REPEAT), false), - null - ); - - stateDrawable.addState( - new int[] { android.R.attr.state_activated }, selectedBackgroundDrawable); - stateDrawable.addState(new int[] {}, drawable); - - return stateDrawable; - } - - return drawable; - } - /** * Set header or footer title attribute values. * diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java b/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java index 2d89c0131d9..23b6d81b8fa 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java @@ -2009,6 +2009,12 @@ private void doSetClickable(View view, boolean clickable) setOnClickListener(view); setOnLongClickListener(view); } + if (view instanceof ViewGroup) { + + // Allow parent views to receive states from child views. + // This allows the touch feedback effect when clicking on child views. + ((ViewGroup) view).setAddStatesFromChildren(clickable); + } } private void doSetClickable(boolean clickable) diff --git a/apidoc/Titanium/UI/ListView.yml b/apidoc/Titanium/UI/ListView.yml index ea087e69166..cc955ee7e10 100644 --- a/apidoc/Titanium/UI/ListView.yml +++ b/apidoc/Titanium/UI/ListView.yml @@ -1024,6 +1024,16 @@ properties: osver: {ios: {min: "7.0"}} platforms: [iphone, ipad, macos] + - name: touchFeedback + summary: A material design visual construct that provides an instantaneous visual confirmation of touch point. + description: | + Touch feedback is only applied to a view's background. + type: Boolean + default: true + platforms: [android] + osver: {android: {min: "5.0"}} + since: "10.0.0" + - name: listSeparatorInsets summary: The insets for the list view header and footer. description: | diff --git a/apidoc/Titanium/UI/TableView.yml b/apidoc/Titanium/UI/TableView.yml index a829735d8d5..a92b1ffbd9e 100644 --- a/apidoc/Titanium/UI/TableView.yml +++ b/apidoc/Titanium/UI/TableView.yml @@ -1485,6 +1485,16 @@ properties: osver: {ios: {min: "7.0"}} platforms: [iphone, ipad, macos] + - name: touchFeedback + summary: A material design visual construct that provides an instantaneous visual confirmation of touch point. + description: | + Touch feedback is only applied to a view's background. + type: Boolean + default: true + platforms: [android] + osver: {android: {min: "5.0"}} + since: "10.0.0" + - name: tableSeparatorInsets summary: The insets for the table view header and footer. description: |