ripple

Android Ripple Effect Overridden by Selected State

旧街凉风 提交于 2019-11-30 19:46:47
After having been looking for a while I've not been able to find an answer to this... I have a recycler view with items which when selected have a red background and white text (beforehand the background is white and text is black). To do this I am using a selector. I have recently tried to add a ripple effect to this, but unless I long click on the item the background of the item goes straight to red without the ripple. I am assuming this is because the selector state state_selected overrides the ripple on sate_pressed? Does anyone know if there is a way around this? Here is the selector code

RIpple effect on RecyclerView not working on light tap

两盒软妹~` 提交于 2019-11-30 10:28:30
I have tried to implement the ripple effect on my RecyclerView. Here's my layout for it : <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" android:id="@+id/card" android:layout_marginTop="7dp" android:layout_marginLeft="16dp" android:layout_marginRight="16dp" android:layout_width="match_parent" android:layout_height="wrap_content" card_view:cardCornerRadius="5dp" android:clickable="true" card_view:cardElevation="5dp" android:focusable="true" android:foreground="?android:attr

Android Ripple Effect Overridden by Selected State

一个人想着一个人 提交于 2019-11-30 04:06:20
问题 After having been looking for a while I've not been able to find an answer to this... I have a recycler view with items which when selected have a red background and white text (beforehand the background is white and text is black). To do this I am using a selector. I have recently tried to add a ripple effect to this, but unless I long click on the item the background of the item goes straight to red without the ripple. I am assuming this is because the selector state state_selected

How to use Ripple Emulator for Windows to test PhoneGap application?

不羁岁月 提交于 2019-11-29 21:35:12
Can Ripple emulator be used to test PhoneGap application under Windows? Either I'm doing something really bad or Ripple is not working at all in such environment. I have installed Ripple Emulator extension for Chrome from Chrome Store. I navigated Chrome to my mobile app (served locally via XAMPP). I clicked Ripple icon next to Chrome omnibar and clicked Enable in opened window. I've selected proper platform ( Cordova 2.0 ). My application was reloaded in mobile-like look, simulating mobile device. Ripple was unable to read my configuration from config.xml file, but that is a well known bug

Lollipop RippleDrawable vs Selector for Pre-Lollipop

你说的曾经没有我的故事 提交于 2019-11-29 19:55:42
I have buttons with different draw9patch png as background. Currently the buttons are controlled by selector which look something like this: <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/pressed" android:state_pressed="true"/> <item android:drawable="@drawable/disabled" android:state_enabled="false"/> <item android:drawable="@drawable/focused" android:state_focused="true"/> <item android:drawable="@drawable/default"/> </selector> For the Android Lollipop they have a RippleDrawable for the touch effect, which goes something like this:

RIpple effect on RecyclerView not working on light tap

烈酒焚心 提交于 2019-11-29 15:31:01
问题 I have tried to implement the ripple effect on my RecyclerView. Here's my layout for it : <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" android:id="@+id/card" android:layout_marginTop="7dp" android:layout_marginLeft="16dp" android:layout_marginRight="16dp" android:layout_width="match_parent" android:layout_height="wrap_content" card_view:cardCornerRadius="5dp" android:clickable="true"

PhoneGap application not working on Google Ripple

时光总嘲笑我的痴心妄想 提交于 2019-11-29 09:50:47
I'm developing a phoneGap application. When I test my application in the browser there is no problem. Everythings works well. But when I am try it in ripple, my javascript does not work. In detail: The user can login the system and if it successfully redirects to another page (used jquery mobile) it works well in chrome, internet explorer, and firefox. But does not work in ripple. My code is shown below: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name=

Create a ripple drawable without transparency

核能气质少年 提交于 2019-11-29 01:58:29
I'm a bit lost about how to properly use Ripple Drawable. Let's say I have this drawable : <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android" > <item android:state_pressed="false" android:state_focused="true" android:drawable="@color/accent_color_light" /> <item android:state_pressed="true" android:drawable="@color/accent_color_light" /> <item android:drawable="@android:color/white" /> </selector> So it is a plain white background which changes to a light blue when it is focused or pressed. How can I get the same colors but with a ripple

How to use Ripple Emulator for Windows to test PhoneGap application?

拈花ヽ惹草 提交于 2019-11-28 19:03:55
问题 Can Ripple emulator be used to test PhoneGap application under Windows? Either I'm doing something really bad or Ripple is not working at all in such environment. I have installed Ripple Emulator extension for Chrome from Chrome Store. I navigated Chrome to my mobile app (served locally via XAMPP). I clicked Ripple icon next to Chrome omnibar and clicked Enable in opened window. I've selected proper platform ( Cordova 2.0 ). My application was reloaded in mobile-like look, simulating mobile

Ripple effect over a RecyclerView item containing ImageView

不打扰是莪最后的温柔 提交于 2019-11-28 16:39:44
I have a RecyclerView that expands the following grid item : <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/children_tile_border" android:layout_marginTop="@dimen/children_tile_border" android:clickable="true" android:focusable="true" android:background="?selectableItemBackground" tools:ignore="RtlHardcoded"> <com.example.app.ui.widget.SquareImageView android:id="@+id/child_picture" android:layout_width="match